Merge "Switch connection/become settings for cinder"

This commit is contained in:
Zuul 2018-07-17 12:06:44 +00:00 committed by Gerrit Code Review
commit 048d6ad922
1 changed files with 8 additions and 0 deletions

View File

@ -50,6 +50,14 @@
- name: Deploy the rest of cinder
hosts: "cinder_all:!cinder_api"
remote_user: root
# Some services run on localhost. For that to work,
# we need to sudo. Ideally it should rather be broken
# out into its own playbook and use 'connection: local'
# but to do that we'd have to know which service it is
# and every role's inventory is different. So instead,
# we use this rather horrible hack.
become: "{{ inventory_hostname == 'localhost' }}"
connection: "{{ (inventory_hostname == 'localhost') | ternary('local', 'ssh') }}"
gather_facts: true
any_errors_fatal: true
roles: