From 2bf14e21224714cdac7a23b4dfabc9c2a976cb35 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 27 Jul 2018 13:41:28 +0100 Subject: [PATCH] Remove unnecessary MQ vhost/user creation tasks/vars There is no record for why we implement the MQ vhost/user creation outside of the role in the playbook, when we could do it inside the role. Implementing it inside the role allows us to reduce the quantity of group_vars duplicated from the role, and allows us to better document the required variables in the role. The delegation can still be done as it is done in the playbook too. In this patch we remove the test vars and tasks which were duplicated as they are no longer required. Change-Id: Ibc217400d16ce06f9943d69e2305e46762ec2662 --- examples/playbook.yml | 12 ++++-------- tests/os_magnum-overrides.yml | 8 +------- tests/test-install-magnum.yml | 12 ++---------- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/examples/playbook.yml b/examples/playbook.yml index 0a76a34..c0a61e0 100644 --- a/examples/playbook.yml +++ b/examples/playbook.yml @@ -5,11 +5,7 @@ - { role: "os_magnum", tags: [ "os-magnum" ] } vars: magnum_galera_address: "{{ internal_lb_vip_address }}" - magnum_galera_database_name: magnum_service - magnum_galera_user: magnum - magnum_oslomsg_rpc_userid: magnum - magnum_oslomsg_rpc_vhost: /magnum - magnum_oslomsg_notify_userid: magnum - magnum_oslomsg_notify_vhost: /magnum - ansible_hostname: "{{ container_name }}" - is_metal: "{{ properties.is_metal|default(false) }}" + magnum_galera_password: secrete + magnum_service_password: secrete + magnum_oslomsg_rpc_password: secrete + magnum_trustee_password: secrete diff --git a/tests/os_magnum-overrides.yml b/tests/os_magnum-overrides.yml index f9a1365..6cf0fbe 100644 --- a/tests/os_magnum-overrides.yml +++ b/tests/os_magnum-overrides.yml @@ -1,16 +1,10 @@ --- magnum_developer_mode: true magnum_galera_password: secrete -magnum_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}" +magnum_galera_address: "{{ test_galera_host }}" magnum_service_password: secrete magnum_oslomsg_rpc_password: secrete -magnum_oslomsg_notify_password: secrete magnum_trustee_password: secrete -magnum_oslomsg_rpc_servers: "{{ rabbitmq_servers }}" -magnum_oslomsg_rpc_userid: magnum -magnum_oslomsg_rpc_vhost: /magnum -magnum_galera_database_name: magnum_service -magnum_galera_user: magnum # TODO: Install and use barbican for certificate management # Make sure we use x509keypair for now diff --git a/tests/test-install-magnum.yml b/tests/test-install-magnum.yml index 1fe1287..8536535 100644 --- a/tests/test-install-magnum.yml +++ b/tests/test-install-magnum.yml @@ -16,15 +16,7 @@ - name: Install magnum server hosts: magnum_all user: root - pre_tasks: - - include: common/ensure-oslomsg.yml - rpc_vhost: "{{ magnum_oslomsg_rpc_vhost }}" - rpc_user: "{{ magnum_oslomsg_rpc_userid }}" - rpc_password: "{{ magnum_oslomsg_rpc_password }}" - notify_vhost: "{{ magnum_oslomsg_notify_vhost }}" - notify_user: "{{ magnum_oslomsg_notify_userid }}" - notify_password: "{{ magnum_oslomsg_notify_password }}" - roles: - - role: "os_magnum" vars_files: - common/test-vars.yml + roles: + - role: "os_magnum"