Skip to content
This repository was archived by the owner on Jun 1, 2021. It is now read-only.
/ ansible-role-debug Public archive

Ansible role for managing a debug user, debug tools and debugging ansible variables.

License

Notifications You must be signed in to change notification settings

GROG/ansible-role-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debug

Ansible Galaxy Build Status Latest tag Gitter chat

A role for managing a debug user, debug tools and debugging ansible variables.

It is strongly recommended to only use this role on development systems! Using it in a production environment could result in serious security risks.

Requirements

  • Hosts should be bootstrapped for ansible usage (have python,...)
  • Root privileges, eg become: yes
  • useradd, userdel and usermod should be available on the host
  • sudo should be available (attention: this role will enable sudoers.d if not enabled)

Role Variables

Variable Description Default value
debug Enable debug role no
debug_user Manage debug user? yes
debug_user_settings Settings for the debug user (see details!) see details
debug_user_key SSH key for the default user settings ~/.ssh/id_rsa.pub
debug_tools Manage debug tools? yes
debug_tools_list List of debug tools (see details!) []
debug_tools_list_host List of debug tools (see details!) []
debug_tools_list_group List of debug tools (see details!) []
debug_tools_state State of the debug tools present
debug_tools_update_cache Update package cache? yes
debug_tools_cache_valid_time Valid time for package cache 3600
debug_variables Dump ansible variables for debugging? yes
debug_variables_dump_location File to dump variables to '/tmp/ansible.dump'

debug_user_settings details

By default a user with following data will be created;

debug_user_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"

debug_user_settings:
  name: debug
  comment: Ansible
  shell: '/bin/bash'
  authorized_keys:
    - key: "{{ debug_user_key }}"
    - exclusive: yes
  sudo:
    hosts: ALL
    as: ALL
    commands: ALL
    nopasswd: yes

When using the default settings, the ssh key can be overridden using the debug_user_key variable.

It is however recomended to use your own custom user settings. More information about the available attributes can be found in the documentation of the GROG management-user role.

debug_tools_list details

debug_tools_list, debug_tools_list_host and debug_tools_list_group are merged when managing the tools. You can use the host and group lists to specify tools per host or group off hosts.

More information about the possible package attributes can be found in the documentation of the GROG package role.

Dependencies

Example Playbook

---
- hosts: debug
  roles:
  - { role: GROG.debug, become: yes, debug: yes }

Contributing

All assistance, changes or ideas welcome!

Author

By G. Roggemans

License

MIT

About

Ansible role for managing a debug user, debug tools and debugging ansible variables.

Resources

License

Stars

Watchers

Forks

Packages

No packages published