Use proper with_items and include syntax

This commit is contained in:
Luke Murphy 2020-04-13 19:52:52 +02:00
parent f1cefadfd5
commit 7c7f52cb51
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 8 additions and 8 deletions

View File

@ -1,11 +1,11 @@
--- ---
- name: Setup database facts
set_fact:
mount_map:
mariadb: /var/lib/mysql
- name: Run database setup tasks - name: Run database setup tasks
block: block:
- name: Set database facts
set_fact:
mount_map:
mariadb: /var/lib/mysql
- name: "Create {{ item.type }} database" - name: "Create {{ item.type }} database"
no_log: true no_log: true
shell: " shell: "

View File

@ -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:

View File

@ -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