From f9dcdfd75e0e9d78b9cda7e5cc1b82d42e51ea74 Mon Sep 17 00:00:00 2001 From: Wes Hayutin Date: Wed, 16 Sep 2020 14:17:51 -0600 Subject: [PATCH] dump vars to yaml, and loose become yaml should work fine now lets try w/o become Change-Id: If745f27f0263bbea7e33745d845539c8d3b6e352 --- roles/dump_vars/tasks/main.yml | 16 +++++----------- .../templates/dump_variables_environment.j2 | 2 +- .../templates/dump_variables_group_names.j2 | 2 +- .../dump_vars/templates/dump_variables_groups.j2 | 2 +- .../templates/dump_variables_hostvars.j2 | 2 +- roles/dump_vars/templates/dump_variables_vars.j2 | 2 +- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/roles/dump_vars/tasks/main.yml b/roles/dump_vars/tasks/main.yml index e861e8361..3144f1f08 100644 --- a/roles/dump_vars/tasks/main.yml +++ b/roles/dump_vars/tasks/main.yml @@ -1,34 +1,28 @@ --- - name: Prepare directory with extra logs file: dest={{ dump_vars_log_dir }} state=directory - become: true - name: generate dump_variables_vars script template: src: dump_variables_vars.j2 - dest: "{{ dump_vars_log_dir }}/dump_variables_vars.json" - become: true + dest: "{{ dump_vars_log_dir }}/dump_variables_vars.yaml" - name: generate dump_variables_environment script template: src: dump_variables_environment.j2 - dest: "{{ dump_vars_log_dir }}/dump_variables_environment.json" - become: true + dest: "{{ dump_vars_log_dir }}/dump_variables_environment.yaml" - name: generate dump_variables_group_names script template: src: dump_variables_group_names.j2 - dest: "{{ dump_vars_log_dir }}/dump_variables_group_names.json" - become: true + dest: "{{ dump_vars_log_dir }}/dump_variables_group_names.yaml" - name: generate dump_variables_groups script template: src: dump_variables_groups.j2 - dest: "{{ dump_vars_log_dir }}/dump_variables_groups.json" - become: true + dest: "{{ dump_vars_log_dir }}/dump_variables_groups.yaml" - name: generate dump_variables_hostvars script template: src: dump_variables_hostvars.j2 - dest: "{{ dump_vars_log_dir }}/dump_variables_hostvars.json" - become: true + dest: "{{ dump_vars_log_dir }}/dump_variables_hostvars.yaml" diff --git a/roles/dump_vars/templates/dump_variables_environment.j2 b/roles/dump_vars/templates/dump_variables_environment.j2 index 97e126e13..ade376253 100644 --- a/roles/dump_vars/templates/dump_variables_environment.j2 +++ b/roles/dump_vars/templates/dump_variables_environment.j2 @@ -1 +1 @@ -{{ environment | to_nice_json }} +{{ environment | to_nice_yaml }} diff --git a/roles/dump_vars/templates/dump_variables_group_names.j2 b/roles/dump_vars/templates/dump_variables_group_names.j2 index a95a8caa5..b4614df46 100644 --- a/roles/dump_vars/templates/dump_variables_group_names.j2 +++ b/roles/dump_vars/templates/dump_variables_group_names.j2 @@ -1 +1 @@ -{{ group_names | to_nice_json }} +{{ group_names | to_nice_yaml }} diff --git a/roles/dump_vars/templates/dump_variables_groups.j2 b/roles/dump_vars/templates/dump_variables_groups.j2 index 5dc076890..d723fdc48 100644 --- a/roles/dump_vars/templates/dump_variables_groups.j2 +++ b/roles/dump_vars/templates/dump_variables_groups.j2 @@ -1 +1 @@ -{{ groups | to_nice_json }} +{{ groups | to_nice_yaml }} diff --git a/roles/dump_vars/templates/dump_variables_hostvars.j2 b/roles/dump_vars/templates/dump_variables_hostvars.j2 index 3e8e3951a..55ec8e922 100644 --- a/roles/dump_vars/templates/dump_variables_hostvars.j2 +++ b/roles/dump_vars/templates/dump_variables_hostvars.j2 @@ -1 +1 @@ -{{ hostvars | to_nice_json }} +{{ hostvars | to_nice_yaml }} diff --git a/roles/dump_vars/templates/dump_variables_vars.j2 b/roles/dump_vars/templates/dump_variables_vars.j2 index 93ef887e2..ed21a941a 100644 --- a/roles/dump_vars/templates/dump_variables_vars.j2 +++ b/roles/dump_vars/templates/dump_variables_vars.j2 @@ -1 +1 @@ -{{ vars | to_nice_json }} +{{ vars | to_nice_yaml }}