From 9544771e52a29be5431e50ca8487e1801c4da6c4 Mon Sep 17 00:00:00 2001 From: rcordier Date: Wed, 22 May 2024 04:05:56 -0400 Subject: [PATCH] change: make roles more verbose --- roles/configure_db/tasks/main.yml | 14 ++++++++++++++ roles/configure_web/tasks/main.yml | 16 +++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/roles/configure_db/tasks/main.yml b/roles/configure_db/tasks/main.yml index 4bcf9b3..bbfcb63 100644 --- a/roles/configure_db/tasks/main.yml +++ b/roles/configure_db/tasks/main.yml @@ -2,3 +2,17 @@ - name: This task configure the DB server debug: msg: The DB server has been configured + + +- name: Dump DB env + become: true + shell: |- + echo "Current hostname: $(hostname -f)" + echo "Current User=$(id -un) (uid:$(id -u))" + echo "Current PATH=$PATH" + register: output + +- name: Show DB output + debug: + msg: "{{ output}}" + diff --git a/roles/configure_web/tasks/main.yml b/roles/configure_web/tasks/main.yml index 3731cf3..11c5706 100644 --- a/roles/configure_web/tasks/main.yml +++ b/roles/configure_web/tasks/main.yml @@ -1,4 +1,18 @@ - name: This task configure the web server debug: - msg: The WEB server has been configured + msg: The WEB server has been configureds + +- name: Dump env + become: true + shell: |- + echo "Current hostname: $(hostname -f)" + echo "Current User=$(id -un) (uid:$(id -u))" + echo "Current PATH=$PATH" + env | sort + register: output + +- name: Show output + debug: + msg: "{{ output}}" +