Top "Ansible" questions

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

Run task only if host does not belong to a group

I'd like to able to run an ansible task only if the host of the current playbook does not belong …

ansible
How to use template module with different set of variables?

My use case is the following : I have a template file, and I would like to create 2 different files from …

ansible ansible-template
What's the easy way to auto create non existing dir in ansible

In my Ansible playbook many times i need to create file there - name: Copy file template: src: code.conf.…

ansible
Using Ansible set_fact to create a dictionary from register results

In Ansible I've used register to save the results of a task in the variable people. Omitting the stuff I …

ansible
Ansible: filter a list by its attributes

I have variable named "network" registered in Ansible: { "addresses": { "private_ext": [ { "type": "fixed", "addr": "172.16.2.100" } ], "private_man": [ { "type": "fixed", "addr": "172.16.1.100" }, { "type": "…

jinja2 ansible
How to create an empty file with Ansible?

What is the easiest way to create an empty file using Ansible? I know I can save an empty file …

file ansible
Check if a list contains an item in Ansible

I'm trying to check if the version supplied is a valid supported version. I've set the list of acceptable versions …

yaml ansible
How to test that a registered variable is not empty?

How can I test that stderr is non empty:: - name: Check script shell: . {{ venv_name }}/bin/activate && …

ansible yaml
Displaying output of a remote command with Ansible

In an Ansible role I generate the user's SSH key. After that I want to print it to the screen …

command-line ssh configuration-management ansible
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