variables

The run_once statement in Ansible

Introduction Ansible is a powerful automation tool that makes managing IT infrastructure easier.

Continue reading

Write a Variable to a File - Ansible module copy vs template

How to write a variable to file with Ansible? From a simple value or the result of complex command execution on the target node often we have the need to write the result to a file.

Continue reading

Difference Between ansible_hostname and inventory_hostname Explained

What is the difference between ansible_hostname vs inventory_hostname? These two ansible internal variables sometimes confuse one for another but they’re fundamentally different.

Continue reading

Set System-Wide Environment Variables on Linux with Ansible

How to permanently set system-wide environment variables on remote Linux with Ansible?

Continue reading

Download a file using an HTTPS proxy via environment variables - Ansible get_url and environment

How to download a file using an HTTPS proxy via environment variables with Ansible?

Continue reading

Set remote environment per task or play - Ansible environment statement

How to set remote environment per Ansible task or play? I’m going to show you a live Playbook with some simple Ansible code.

Continue reading

Break Strings Across Lines in YAML and Ansible

How to Break a string over multiple lines with Ansible? And in general with YAML language.

Continue reading

Print text or variable during execution - Ansible module debug

How to print a text or a variable during the execution with Ansible?

Continue reading