Pretty Print Ansible Inventory

Use the ansible-inventory command using the --graph: ansible-inventory -i inventory --graph

July 31, 2023

Pretty Print Ansible Output

In the same dir where your Ansible playbook is create a file named ansible.cfg. Paste the following content in the file: [defaults] stdout_callback = community.general.yaml You’are all set.

July 31, 2023

Use the Screen Command to Recover your SSH Session

What do you do if you lose your SSH connection to a server and you want to open the same session to continue the work your were doing? You use the command screen. Screen is usually pre-installed in modern Linux distros, but if it’s not you can install it using sudo apt install screen. Using screen Start the session you don’t want to lose: screen -S session_name Now you have a session where you can work and come back if your connecton is lost....

June 13, 2022