Fix warning during Panko bootstrap task
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ 'already' not in mongodb_panko_database.stdout }} [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ mongodb_panko_database.stdout.split()[4] != 'connecting' }} Reason: Ansible 2.3.0 does not like delimiters in when statement. Change-Id: If34130ccf03c0fbadd17eb24fa8e71fbbf2bcd70 Closes-Bug: #1714340
This commit is contained in:
parent
9a520e0906
commit
5b02908a9f
@ -3,8 +3,8 @@
|
||||
command: docker exec -t mongodb mongo --host {{ panko_database_mongodb_address }} --eval 'db = db.getSiblingDB("{{ panko_database_name }}"); db.createUser({user':' "{{ panko_database_user }}", pwd':' "{{ panko_database_password }}", roles':' [ "readWrite", "dbAdmin" ]})'
|
||||
register: mongodb_panko_database
|
||||
run_once: true
|
||||
changed_when: "{{ 'already' not in mongodb_panko_database.stdout }}"
|
||||
failed_when: "{{ mongodb_panko_database.stdout.split()[4] != 'connecting' }}"
|
||||
changed_when: mongodb_panko_database.stdout.find('already') == -1
|
||||
failed_when: mongodb_panko_database.stdout.split()[4] != 'connecting'
|
||||
delegate_to: "{{ groups['mongodb'][0] }}"
|
||||
when:
|
||||
- panko_database_type == "mongodb"
|
||||
|
Loading…
Reference in New Issue
Block a user