X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docker%2Fansible%2Froles%2Fconfig_files%2Ftasks%2Fnetwork.yml;h=52902d4c8306047c479bdd586b088c860fed8c2c;hb=720f19cbcb2c03140d1359c11c78b6a1c34cb4d0;hp=dca0c235233d56ae0b42d4b9eb83a97dcac80543;hpb=e3813237e62a6b8b5d37f93b974f170fd83de28b;p=barometer.git diff --git a/docker/ansible/roles/config_files/tasks/network.yml b/docker/ansible/roles/config_files/tasks/network.yml index dca0c235..52902d4c 100644 --- a/docker/ansible/roles/config_files/tasks/network.yml +++ b/docker/ansible/roles/config_files/tasks/network.yml @@ -13,9 +13,28 @@ # limitations under the License. --- -- name: enable network plugin +- name: Enable network plugin template: src: network.conf.j2 dest: "{{ config_file_dir }}/network.conf" tags: - network + +- name: Add network port if defined + lineinfile: + dest: "{{ config_file_dir }}/network.conf" + insertafter: Plugin network + line: " Server \"{{ network_ip_addr }}\" \"{{ network_port }}\"" + when: network_ip_addr is defined + tags: + - network + +- name: Modify network.conf to add influxdb_hosts + lineinfile: + dest: "{{ config_file_dir }}/network.conf" + insertafter: Plugin network + line: " Server \"{{ item }}\" \"{{ influx_network_port }}\"" + with_items: "{{ groups['influxdb_hosts'] }}" + tags: + - network +