diff options
Diffstat (limited to 'roles/nuage_node/tasks/main.yaml')
-rw-r--r-- | roles/nuage_node/tasks/main.yaml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/roles/nuage_node/tasks/main.yaml b/roles/nuage_node/tasks/main.yaml new file mode 100644 index 000000000..9db9dbb6a --- /dev/null +++ b/roles/nuage_node/tasks/main.yaml @@ -0,0 +1,51 @@ +--- +- name: Set the Nuage plugin openshift directory fact for Atomic hosts + set_fact: + vsp_openshift_dir: /var/usr/share/vsp-openshift + when: openshift.common.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.common.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.common.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: 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.common.is_atomic | bool + +- name: Restart node services + command: /bin/true + notify: + - restart node + ignore_errors: true + +- include: iptables.yml + +- name: setup firewall + include: firewall.yml + static: yes |