Top "Ansible" questions

Red Hat Ansible is a model-driven, configuration management, multi-node deployment/orchestration and remote task execution system.

How to get an arbitrary remote user's home directory in Ansible?

I can do that with shell using combination of getent and awk like this: getent passwd $user | awk -F: '{ …

ansible ansible-facts
Ansible - Print message - debug: msg="line1 \n {{ var2 }} \n line3 with var3 = {{ var3 }}"

In Ansible (1.9.4) or 2.0.0 I ran the following action: - debug: msg="line1 \n {{ var2 }} \n line3 with var3 = {{ var3 }}" $ cat …

action newline ansible roles ansible-playbook
Register Variables in Loop in an Ansible Playbook

I have two ansible tasks as follows tasks: - shell: ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d' register: var1 - …

linux scripting automation ansible
How to make Ansible execute a shell script if a package is not installed

How can I make Ansible execute a shell script if a (rpm) package is not installed? Is it somehow possible …

ansible
In ansible, how do I get a variable with the name of the user running ansible?

I'm scripting a deployment process that takes the name of the user running the ansible script (e.g. tlau) and …

variables username ansible ansible-playbook
How do I set register a variable to persist between plays in ansible?

I have an ansible playbook, where I'd like a variable I register on one machine to be available on another. …

deployment ansible
Only check whether a line present in a file (ansible)

In ansible, I need to check whether a particular line present in a file or not. Basically, I need to …

ansible
Ansible - accessing local environment variables

I wonder if there is a way for Ansible to access local environment variables. The documentation references accessing variable on …

ansible
How to specify ansible pretasks for a role?

How should one go about defining a pretask for role dependencies. I currently have an apache role that has a …

dependencies ansible role
ansible if else construct

Heres my if else Ansible logic .. - name: Check certs exist stat: path=/etc/letsencrypt/live/{{ rootDomain }}/fullchain.pem register: …

ansible ansible-2.x