Top "Ansible-playbook" questions

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

How can I pass variable to ansible playbook in the command line?

I'm new to ansible and wonder how to do so as the following didn't work ansible-playbook -i '10.0.0.1,' yada-yada.…

variables command-line command-line-arguments ansible ansible-playbook
Safely limiting Ansible playbooks to a single machine?

I'm using Ansible for some simple user management tasks with a small group of computers. Currently, I have my playbooks …

ansible ansible-playbook
How to run a task when variable is undefined in ansible?

I am looking for a way to perform a task when ansible variable is not registers /undefined e.g -- …

ansible ansible-playbook
Ansible: Store command's stdout in new variable?

Inside my playbook I'd like to create a variable holding the output of an external command. Afterwards I want to …

ansible ansible-playbook
Run an Ansible task only when the variable contains a specific string

I have multiple tasks depend from the value of variable1. I want to check if the value is in {{variable1}} …

linux conditional ansible ansible-playbook ansible-2.x
Write variable to a file in Ansible

I am pulling JSON via the URI module and want to write the received content out to a file. I …

file ansible-playbook
How can I write variables inside the tasks file in ansible

I have this play.yml --- - hosts: 127.0.0.1 connection: local sudo: false tasks: - include: apache.yml My Apache look …

ansible ansible-playbook
How to write dynamic variable in Ansible playbook

Based on extra vars parameter I Need to write variable value in ansible playbook ansible-playbook playbook.yml -e "param1=value1 …

jinja2 ansible ansible-playbook
Ansible: Set variable to file content

I'm using the ec2 module with ansible-playbook I want to set a variable to the contents of a file. Here's …

ansible ansible-playbook
Override hosts variable of Ansible playbook from the command line

This is a fragment of a playbook that I'm using (server.yml): - name: Determine Remote User hosts: web gather_…

ansible ansible-playbook