Top "Ansible-2.x" questions

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy.

Ansible: copy a directory content to another directory

I am trying to copy the content of dist directory to nginx directory. - name: copy html file copy: src=/…

ansible ansible-2.x
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
Accessing inventory host variable in Ansible playbook

In Ansible 2.1, I have a role being called by a playbook that needs access to a host file variable. Any …

ansible ansible-2.x ansible-inventory
Ansible - Use default if a variable is not defined

I'm customizing linux users creation inside my role. I need to let users of my role customize home_directory, group_…

ansible ansible-2.x
Using True False with Ansible When Clause

I'm running into the silliest issue. I cannot figure out how to test for boolean in an Ansible 2.2 task file. …

boolean ansible ansible-playbook ansible-2.x
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
Difference between become and become_user in Ansible

Recently I started digging into Ansible and writing my own playbooks. However, I have a troubles with understanding difference between …

ansible ansible-playbook ansible-2.x
Running Python script via ansible

I'm trying to run a python script from an ansible script. I would think this would be an easy thing …

ansible ansible-2.x
How to disable gathering facts for subplays not included within given tag

Several of my playbooks have sub-plays structure like this: - hosts: sites user: root tags: - configuration tasks: (...) - hosts: …

ansible ansible-playbook ansible-2.x
Execute curl -X with ansible playbook

I want to execute the next command using ansible playbook: curl -X POST [email protected] -H "Content-Type: application/json" …

ansible ansible-playbook ansible-2.x