diff --git a/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml b/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml index 19be22b26..cfa2b6066 100644 --- a/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml +++ b/ansible/oooq/baremetal-virt-undercloud-tripleo-browbeat.yml @@ -19,6 +19,7 @@ - browbeat/common - browbeat/browbeat - browbeat/browbeat-network + - browbeat/template-configs - browbeat/statsd-ironic - name: Disable sshd dns diff --git a/ansible/oooq/quickstart-browbeat.yml b/ansible/oooq/quickstart-browbeat.yml index 882199a17..c82fadffb 100644 --- a/ansible/oooq/quickstart-browbeat.yml +++ b/ansible/oooq/quickstart-browbeat.yml @@ -16,6 +16,7 @@ - browbeat/common - browbeat/browbeat - browbeat/browbeat-network + - browbeat/template-configs - name: Run Browbeat hosts: undercloud diff --git a/ansible/oooq/roles/pre-install-setup/tasks/main.yml b/ansible/oooq/roles/pre-install-setup/tasks/main.yml index 8a3146dfc..ca7868a18 100644 --- a/ansible/oooq/roles/pre-install-setup/tasks/main.yml +++ b/ansible/oooq/roles/pre-install-setup/tasks/main.yml @@ -22,11 +22,6 @@ - name: Load CI vars include_vars: "{{ lookup('env','HW_ENV_DIR') }}/all.yml" -- name: Template Browbeat configuration - template: - "src={{ browbeat_config_file }} \ - dest={{ ansible_env.HOME }}/browbeat/browbeat-config.yaml" - - name: Install Pip retries: 10 delay: 60 diff --git a/ansible/oooq/roles/template-configs/tasks/main.yml b/ansible/oooq/roles/template-configs/tasks/main.yml new file mode 100644 index 000000000..dd1b5d935 --- /dev/null +++ b/ansible/oooq/roles/template-configs/tasks/main.yml @@ -0,0 +1,9 @@ +--- +- name: Get Network ID + shell: "source {{ ansible_env.HOME }}/overcloudrc; neutron net-list | grep {{ browbeat_pri_net_name }} | cut -f 2 -d'|'" + register: nova_test_net_name + +- name: Template Browbeat configuration + template: + "src={{ browbeat_config_file }} \ + dest={{ ansible_env.HOME }}/browbeat/browbeat-config.yaml" diff --git a/ansible/oooq/roles/pre-install-setup/templates/browbeat-api-ci.yaml.j2 b/ansible/oooq/roles/template-configs/templates/browbeat-api-ci.yaml.j2 similarity index 97% rename from ansible/oooq/roles/pre-install-setup/templates/browbeat-api-ci.yaml.j2 rename to ansible/oooq/roles/template-configs/templates/browbeat-api-ci.yaml.j2 index 95f6da911..74edeea29 100644 --- a/ansible/oooq/roles/pre-install-setup/templates/browbeat-api-ci.yaml.j2 +++ b/ansible/oooq/roles/template-configs/templates/browbeat-api-ci.yaml.j2 @@ -101,13 +101,13 @@ rally: file: rally/nova/nova-boot-snapshot-cc.yml image_name: cirros flavor_name: m1.tiny - net_id: browbeat-private + net_id: {{ nova_test_net_name.stdout }} - name: boot-list enabled: true file: rally/nova/nova-boot-list-cc.yml image_name: cirros flavor_name: m1.tiny - net_id: browbeat-private + net_id: {{ nova_test_net_name.stdout }} - name: glance enabled: true concurrency: diff --git a/ansible/oooq/roles/pre-install-setup/templates/browbeat-basic.yaml.j2 b/ansible/oooq/roles/template-configs/templates/browbeat-basic.yaml.j2 similarity index 98% rename from ansible/oooq/roles/pre-install-setup/templates/browbeat-basic.yaml.j2 rename to ansible/oooq/roles/template-configs/templates/browbeat-basic.yaml.j2 index 4af309694..19064409b 100644 --- a/ansible/oooq/roles/pre-install-setup/templates/browbeat-basic.yaml.j2 +++ b/ansible/oooq/roles/template-configs/templates/browbeat-basic.yaml.j2 @@ -51,7 +51,7 @@ perfkit: os_type: rhel openstack_image_username: centos openstack_floating_ip_pool: browbeat_public - openstack_network: browbeat_private + openstack_network: nova_test_net_name.stdout benchmarks: - name: fio-centos-m1-small enabled: false @@ -128,7 +128,7 @@ rally: file: rally/nova/nova-boot-snapshot-cc.yml image_name: cirros flavor_name: m1.tiny - net_id: browbeat-private + net_id: {{ nova_test_net_name.stdout }} - name: plugins enabled: true concurrency: diff --git a/ansible/oooq/roles/pre-install-setup/vars/main.yml b/ansible/oooq/roles/template-configs/vars/main.yml similarity index 100% rename from ansible/oooq/roles/pre-install-setup/vars/main.yml rename to ansible/oooq/roles/template-configs/vars/main.yml