debug

Debug Ansible variables

pipeline status

Generate a debugging file per host with as many Ansible variables as possible, this role will, by default, write variables to a /root/servername.example.org.yml file on the server.

Variable name Default value Comment
debug true Set debug to false to prevent any tasks in this role being run
debug_dir /root The directory to write the variable file into
debug_file "{{ inventory_hostname }}.yml" The file to write the variables into
debug_mode 0640 The mode of the variables file
debug_owner root The owner of the variables file
debug_group root The group of the variables file
debug_fetch false Set this variable to True to download the results to debug_local_dir
debug_email false Set this variable to True to email the results to debug_email_address
debug_email_address root@localhost Set this variable to the email address to send results to
debug_email_subject "Ansible variables for {{ inventory_hostname }}" Subject line for the email with the results
debug_local_dir /tmp Local directory to download the results to

This role requires a recent version of the community.mysql collection, in order to generate MariaDB variables, this can be installed into ~/.ansible/collections/ansible_collections like this:

ansible-galaxy collection install community.mysql

The primary URL of this repo is https://git.coop/webarch/debug and this is where the release notes are, it is also mirrored to GitHub and available via Ansible Galaxy.

The localhost repo can be used to run this role on the localhost.

This role was inspired by dumpall role.

About

Webarchitects Ansible role for debugging Ansible variables on Debian and Ubuntu

Install
ansible-galaxy install webarch-coop/ansible-role-debug
GitHub repository
License
gpl-3.0
Downloads
18
Owner
Multi-stakeholder co-operative which provides ethical & green, web hosting, virtual servers and GNU/Linux sysadmin & devop services, code at git.coop/webarch