From b5806d770693a3d115358161da6e28008227b614 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Mon, 26 Sep 2016 14:06:51 +0100 Subject: [PATCH] Remove swift_repl|storage_address calculation We have moved the calculation of the swift_repl and storage addresses to the swift role itself, to ensure uniformity: https://review.openstack.org/#/c/375528/ As a result, this PR removes these steps from the playbook as these are now redundant. Change-Id: I65a547603e4b44a4b943b17f6c8969b7c6012922 --- ansible-role-requirements.yml | 2 +- playbooks/os-swift-install.yml | 90 ---------------------------------- 2 files changed, 1 insertion(+), 91 deletions(-) diff --git a/ansible-role-requirements.yml b/ansible-role-requirements.yml index 33bda952c7..f2ec8679a2 100644 --- a/ansible-role-requirements.yml +++ b/ansible-role-requirements.yml @@ -109,7 +109,7 @@ - name: os_swift scm: git src: https://git.openstack.org/openstack/openstack-ansible-os_swift - version: c6dd7711982551d6bae0a21bf7ab223e31284c6e + version: 3840b3807ef6feea30a9768de21c0c943d3171fe - name: os_tempest scm: git src: https://git.openstack.org/openstack/openstack-ansible-os_tempest diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index 42eae805b9..eb6230af06 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -29,94 +29,6 @@ group: "syslog" - include: common-tasks/package-cache-proxy.yml - - name: Set swift storage bridge (is_metal) - set_fact: - storage_bridge: "{{ 'ansible_' + swift.storage_network | replace('-', '_') }}" - when: - - inventory_hostname in groups['swift_all'] - - swift.storage_network is defined - - is_metal | bool - tags: - - always - - name: Set swift storage address (is_metal) - set_fact: - storage_address: "{{ hostvars[inventory_hostname][storage_bridge]['ipv4']['address'] }}" - when: - - inventory_hostname in groups['swift_all'] - - swift.storage_network is defined - - is_metal | bool - tags: - - always - - name: Set swift storage address (is_metal no storage network) - set_fact: - storage_address: "{{ ansible_ssh_host }}" - when: - - inventory_hostname in groups['swift_all'] - - swift.storage_network is undefined - - is_metal | bool - tags: - - always - - name: Set swift storage address (container) - set_fact: - storage_address: "{{ hostvars[inventory_hostname]['container_networks']['storage_address']['address'] }}" - when: - - inventory_hostname in groups['swift_all'] - - hostvars[inventory_hostname]['container_networks']['storage_address']['address'] is defined - - not is_metal | bool - tags: - - always - - name: Set swift storage address (container no storage network) - set_fact: - storage_address: "{{ ansible_ssh_host }}" - when: - - inventory_hostname in groups['swift_all'] - - hostvars[inventory_hostname]['container_networks']['storage_address']['address'] is undefined - - not is_metal | bool - tags: - - always - - name: Set swift replication bridge (is_metal) - set_fact: - replication_bridge: "{{ 'ansible_' + swift.replication_network | replace('-', '_') }}" - when: - - inventory_hostname in groups['swift_all'] - - swift.replication_network is defined - - is_metal | bool - tags: - - always - - name: Set swift replication address (is_metal) - set_fact: - replication_address: "{{ hostvars[inventory_hostname][replication_bridge]['ipv4']['address'] }}" - when: - - inventory_hostname in groups['swift_all'] - - swift.replication_network is defined - - is_metal | bool - tags: - - always - - name: Set swift replication address (is_metal no replication network) - set_fact: - replication_address: "{{ storage_address }}" - when: - - inventory_hostname in groups['swift_all'] - - swift.replication_network is undefined - - is_metal | bool - tags: - - always - - name: Set swift replication address (container) - set_fact: - replication_address: "{{ hostvars[inventory_hostname]['container_networks']['replication_address']['address'] }}" - when: - - inventory_hostname in groups['swift_all'] - - hostvars[inventory_hostname]['container_networks']['replication_address']['address'] is defined - - not is_metal | bool - tags: - - always - - name: Set swift replication address (container no replication network) - set_fact: - replication_address: "{{ storage_address }}" - when: - - inventory_hostname in groups['swift_all'] - - hostvars[inventory_hostname]['container_networks']['replication_address']['address'] is undefined - - not is_metal | bool # If we're using ceilometer then swift needs a rabbitmq/vhost & usera - include: common-tasks/rabbitmq-vhost-user.yml static: no @@ -134,8 +46,6 @@ - role: "os_swift" swift_venv_tag: "{{ openstack_release }}" swift_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/swift-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz" - swift_storage_address: "{{ storage_address }}" - swift_replication_address: "{{ replication_address }}" swift_do_setup: True swift_do_sync: True vars: