summaryrefslogtreecommitdiffstats
path: root/roles/contiv/tasks/aci.yml
blob: 30d2eb33963f776ada9fbecd93b6fabf1db906ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- name: ACI | Check aci-gw container image
  command: "docker inspect contiv/aci-gw"
  register: docker_aci_inspect_result
  ignore_errors: yes

- name: ACI | Pull aci-gw container
  command: "docker pull contiv/aci-gw"
  when: "'No such image' in docker_aci_inspect_result.stderr"

- name: ACI | Copy shell script used by aci-gw service
  template:
    src: aci_gw.j2
    dest: "{{ bin_dir }}/aci_gw.sh"
    mode: u=rwx,g=rx,o=rx

- name: ACI | Copy systemd units for aci-gw
  template:
    src: aci-gw.service
    dest: /etc/systemd/system/aci-gw.service
  notify: reload systemd

- name: ACI | Enable aci-gw service
  service:
    name: aci-gw
    enabled: yes

- name: ACI | Start aci-gw service
  service:
    name: aci-gw
    state: started
  register: aci-gw_started