From 31bfdb88c1389ad26b03d950cac114da42ef8872 Mon Sep 17 00:00:00 2001 From: Patrick Toal Date: Tue, 25 Sep 2018 07:54:51 -0400 Subject: [PATCH] Added simple debugging playbook --- debug.yml | 29 ++++++++++++++++++++++++++ {files => toal-common/files}/hello.txt | 0 toal-common/tasks/main.yml | 8 +++---- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 debug.yml rename {files => toal-common/files}/hello.txt (100%) diff --git a/debug.yml b/debug.yml new file mode 100644 index 0000000..2ec0bc3 --- /dev/null +++ b/debug.yml @@ -0,0 +1,29 @@ +- name: Show Some Debugging + hosts: localhost + tasks: + - name: Print Debugging info + vars: + msg: | + Module Variables ("vars"): + -------------------------- + {{ vars | to_nice_json }} + + Environment Variables ("environment"): + -------------------------------------- + {{ environment | to_nice_json }} + + GROUP NAMES Variables ("group_names"): + ------------------------------------- + {{ group_names | to_nice_json }} + + GROUPS Variables ("groups"): + ---------------------------- + {{ groups | to_nice_json }} + + HOST Variables ("hostvars"): + ---------------------------- + {{ hostvars | to_nice_json }} + + debug: + msg: "{{ msg.split('\n') }}" + tags: debug_info diff --git a/files/hello.txt b/toal-common/files/hello.txt similarity index 100% rename from files/hello.txt rename to toal-common/files/hello.txt diff --git a/toal-common/tasks/main.yml b/toal-common/tasks/main.yml index ec50d35..28a3816 100644 --- a/toal-common/tasks/main.yml +++ b/toal-common/tasks/main.yml @@ -3,13 +3,13 @@ - name: Install ovirt-guest-agent on RHV Guests yum: name: ovirt-guest-agent - state: latest - when: ansible_virtualization_type == "RHEV" + state: present + when: ansible_virtualization_type == "RHEV" - name: ovirt-guest-agent service is running - service: + service: name: ovirt-guest-agent state: running - when: ansible_virtualization_type == "RHEV" + when: ansible_virtualization_type == "RHEV"