From 7c7f52cb51f79b412713967d32e5361a95dcedd7 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Mon, 13 Apr 2020 19:52:52 +0200 Subject: [PATCH] Use proper with_items and include syntax --- plays/lib/database.yml | 10 +++++----- plays/lib/vars.yml | 4 ++-- plays/pre_deploy.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plays/lib/database.yml b/plays/lib/database.yml index 70c9fa0..a335434 100644 --- a/plays/lib/database.yml +++ b/plays/lib/database.yml @@ -1,11 +1,11 @@ --- -- name: Setup database facts - set_fact: - mount_map: - mariadb: /var/lib/mysql - - name: Run database setup tasks block: + - name: Set database facts + set_fact: + mount_map: + mariadb: /var/lib/mysql + - name: "Create {{ item.type }} database" no_log: true shell: " diff --git a/plays/lib/vars.yml b/plays/lib/vars.yml index ef53aa4..728e64f 100644 --- a/plays/lib/vars.yml +++ b/plays/lib/vars.yml @@ -1,5 +1,5 @@ --- -- name: Load unencrypted deployment variables +- name: Load unencrypted variables no_log: true include_vars: ignore_unknown_extensions: true @@ -16,7 +16,7 @@ path: "{{ app_config_root }}/vault" register: vault_dir -- name: Load all deployment variables +- name: Load encrypted variables no_log: true when: vault_dir.stat.exists include_vars: diff --git a/plays/pre_deploy.yml b/plays/pre_deploy.yml index 4dcf156..b6961e7 100644 --- a/plays/pre_deploy.yml +++ b/plays/pre_deploy.yml @@ -23,7 +23,7 @@ # that - name: Include database tasks no_log: true - include: ./lib/database.yml + include: ./lib/database.yml datastore={{ item }} with_items: "{{ db }}" when: db is defined