Use proper with_items and include syntax
This commit is contained in:
parent
f1cefadfd5
commit
7c7f52cb51
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Setup database facts
|
- name: Run database setup tasks
|
||||||
|
block:
|
||||||
|
- name: Set database facts
|
||||||
set_fact:
|
set_fact:
|
||||||
mount_map:
|
mount_map:
|
||||||
mariadb: /var/lib/mysql
|
mariadb: /var/lib/mysql
|
||||||
|
|
||||||
- name: Run database setup tasks
|
|
||||||
block:
|
|
||||||
- name: "Create {{ item.type }} database"
|
- name: "Create {{ item.type }} database"
|
||||||
no_log: true
|
no_log: true
|
||||||
shell: "
|
shell: "
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Load unencrypted deployment variables
|
- name: Load unencrypted variables
|
||||||
no_log: true
|
no_log: true
|
||||||
include_vars:
|
include_vars:
|
||||||
ignore_unknown_extensions: true
|
ignore_unknown_extensions: true
|
||||||
@ -16,7 +16,7 @@
|
|||||||
path: "{{ app_config_root }}/vault"
|
path: "{{ app_config_root }}/vault"
|
||||||
register: vault_dir
|
register: vault_dir
|
||||||
|
|
||||||
- name: Load all deployment variables
|
- name: Load encrypted variables
|
||||||
no_log: true
|
no_log: true
|
||||||
when: vault_dir.stat.exists
|
when: vault_dir.stat.exists
|
||||||
include_vars:
|
include_vars:
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
# that
|
# that
|
||||||
- name: Include database tasks
|
- name: Include database tasks
|
||||||
no_log: true
|
no_log: true
|
||||||
include: ./lib/database.yml
|
include: ./lib/database.yml datastore={{ item }}
|
||||||
with_items: "{{ db }}"
|
with_items: "{{ db }}"
|
||||||
when: db is defined
|
when: db is defined
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user