summaryrefslogtreecommitdiffstats
path: root/roles/nuage_node/tasks/main.yaml
blob: 1f1bd1653f9e8766ab0ad9726813a2f6724271b0 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
- name: Set the Nuage plugin openshift directory fact for Atomic hosts
  set_fact:
    vsp_openshift_dir: /var/usr/share/vsp-openshift
  when: openshift_is_atomic | bool

- name: Set the Nuage CNI binary directory fact for Atomic hosts
  set_fact:
    cni_bin_dir: /var/opt/cni/bin/
  when: openshift_is_atomic | bool

- name: Set the Nuage plugin certs directory fact for Atomic hosts
  set_fact:
    nuage_plugin_crt_dir: /var/usr/share/vsp-openshift
  when: openshift_is_atomic | bool

- name: Assure CNI conf dir exists
  become: yes
  file: path="{{ cni_conf_dir }}" state=directory

- name: Assures Openshift CNI bin dir exists
  become: yes
  file: path="{{ cni_bin_dir }}" state=directory

- name: Copy the certificates and keys
  become: yes
  copy: src="/tmp/{{ item }}" dest="{{ vsp_openshift_dir }}/{{ item }}"
  with_items:
    - ca.crt
    - nuage.crt
    - nuage.key
    - nuage.kubeconfig

- include_tasks: certificates.yml

- name: Add additional Docker mounts for Nuage for atomic hosts
  become: yes
  lineinfile: dest="{{ openshift_atomic_node_config_file }}" line="{{ nuage_atomic_docker_additional_mounts }}"
  when: openshift_is_atomic | bool

- name: Restart node services
  command: /bin/true
  notify:
    - restart node
  ignore_errors: true

- include_tasks: iptables.yml

- name: setup firewall
  import_tasks: firewall.yml