diff options
author | Aaron Smith <aasmith@redhat.com> | 2018-11-09 13:12:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-11-09 13:12:55 +0000 |
commit | 6aa65eb04de48fc6f284f3251c37bf9626f1ec07 (patch) | |
tree | 26e34fb0be3d39832c99f28d4bdc53dd24c40e2e /docker/ansible/roles/config_files/tasks/network.yml | |
parent | 8f2f6a2086a52e29b4e936417f78021abbac1e58 (diff) | |
parent | d9c7551a005494c025c03b3fd363acb0e5c74f9f (diff) |
Merge "Add support for multi influx hosts"
Diffstat (limited to 'docker/ansible/roles/config_files/tasks/network.yml')
-rw-r--r-- | docker/ansible/roles/config_files/tasks/network.yml | 21 |
1 files changed, 20 insertions, 1 deletions
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 + |