Cleanup syntax issues for Ansible 2 compatibility
This patch fixes a few syntax issues required for Ansible 2 compatibility that Ansible 1.x was more lenient with. When a 'when' clause is combined with a 'with_*' statement, the clause is processed separately for each item. Tasks with 'when' clauses which depended on an item variable being defined have either applied a default empty value to the item or a new task individual task has been created for each item in the loop. Tasks within the os-cinder-install playboook have been updated to loop through cinder_backends as a hash. Change-Id: I9b53eb5dd709a6bed1797961015aa3dd328340f3
This commit is contained in:
parent
58ee392dd5
commit
fab2ceeced
@ -13,17 +13,27 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Drop user provided ssl cert and key
|
||||
- name: Drop user provided ssl cert
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
src: "{{ keystone_user_ssl_cert }}"
|
||||
dest: "{{ keystone_ssl_cert }}"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "{{ item.mode }}"
|
||||
with_items:
|
||||
- { src: "{{ keystone_user_ssl_cert }}", dest: "{{ keystone_ssl_cert }}", mode: "0644" }
|
||||
- { src: "{{ keystone_user_ssl_key }}", dest: "{{ keystone_ssl_key }}", mode: "0640" }
|
||||
when: keystone_user_ssl_cert is defined and keystone_user_ssl_key is defined
|
||||
mode: "0644"
|
||||
when: keystone_user_ssl_cert is defined
|
||||
notify: Restart Apache
|
||||
tags:
|
||||
- keystone-configs
|
||||
- keystone-ssl
|
||||
|
||||
- name: Drop user provided ssl key
|
||||
copy:
|
||||
src: "{{ keystone_user_ssl_key }}"
|
||||
dest: "{{ keystone_ssl_key }}"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0640"
|
||||
when: keystone_user_ssl_key is defined
|
||||
notify: Restart Apache
|
||||
tags:
|
||||
- keystone-configs
|
||||
|
Loading…
Reference in New Issue
Block a user