Lookup Gnocchi service before proxy is configured

We were seeing the configuration adjusted on a random swift host
which may not be a proxy node in all cases. This change performs the
lookup earlier, and on the proxy hosts where it is needed.

Change-Id: Iaf21679d847b3ee1ecc461bb1528c3139737d163
This commit is contained in:
Steve Lewis 2016-09-17 08:10:08 -07:00
parent 620edb7a2d
commit 05d6c6fd52
2 changed files with 23 additions and 24 deletions

View File

@ -13,6 +13,29 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Get Gnocchi project id
keystone:
command: get_project
tenant_name: "{{ gnocchi_service_project_name }}"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: get_gnocchi_project
until: get_gnocchi_project|success
retries: 5
delay: 10
when:
- swift_gnocchi_enabled | bool
- name: Store Gnocchi project id
set_fact:
swift_gnocchi_service_project_id: "{{ keystone_facts.id }}"
when:
- swift_gnocchi_enabled | bool
- get_gnocchi_project | success
- include: swift_init_common.yml
vars:
program_name: "swift-proxy-server"

View File

@ -168,27 +168,3 @@
until: add_service|success
retries: 5
delay: 10
- name: Get Gnocchi project id
keystone:
command: get_project
tenant_name: "{{ gnocchi_service_project_name }}"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: get_gnocchi_project
until: get_gnocchi_project|success
retries: 5
delay: 10
when:
- swift_gnocchi_enabled | bool
- swift_gnocchi_service_project_id is not defined
- name: Store Gnocchi project id
set_fact:
swift_gnocchi_service_project_id: "{{ keystone_facts.id }}"
when:
- swift_gnocchi_enabled | bool
- get_gnocchi_project | success