Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 323

Use this tag for questions about Ansible, an open-source automation engine, related to using Ansible for topics such as cloud provisioning, configuration management, application deployment, etc.

34 votes
4 answers
71k views

Can I bypass host key checking in Ansible?

I'm running an Ansible playbook with a subtle hack to work on an arbitrary port forwarded port (so I can use one machine with no direct access to lots of machines). …
8 votes
3 answers
4k views

Using SSH to open interactive session in ansible

Is there a semi-easy way to use Ansible to open an interactive session? I've spent a good amount of time making use of keys and other credentials stores to make a stellar ansible inventory file. … It's almost easier for me just to run adhoc commands with ansible instead of logging in via ssh. Is there a way to pause ansible with a running interactive session so I can get a command prompt? …
33 votes
3 answers
48k views

Is there a way to run with_items loops in parallel in Ansible?

I'm running Ansible 2.2, but can upgrade if it helps. I saw this and was pretty excited, but it doesn't seem to be in this (or any) version of Ansible documentation. … But it seems like I should be able to do all this faster in Ansible. This is what I want to run in parallel, host_authorizations is a list of usernames and other data. …
0 votes
2 answers
2k views

How are ansible playbooks supposed to be imported into a collection?

want to share duplicate code between containers and I don't want to have containers that run multiple playbooks so what I'd like do develop is something where I have a playbooks/doit.yml file and a .ansible … running ansible 2.9, I suppose I could import the playbook given the full path, but that seems like not what they're wanting me to do. …
10 votes
2 answers
19k views

How to run Ansible with sudo no password commands with become syntax

When I run ansible against a host machine that has some commands I need to run as root, I can't run these with "become" because it runs the commands as root instead of just running them with sudo. …
18 votes
2 answers
7k views

How do I run ansible on one host at a time and break on a failure

I've got an Ansible playbook where I want to update a number of flaky devices in sequence. … Currently using Ansible v2.0, but can also switch to a newer version if that sort of a feature is only available in newer versions. …
6 votes
2 answers
2k views

What is the best strategy for running an ansible playbook within an ansible playbook?

Because of that, I don't see the output of this task in my ansible playbook. … - name: update other machines command: "/usr/bin/ansible-playbook /etc/ansible/playbooks/other-machines.yml -e 'ansible_user={{ item.ansible_user }}' -l {{ item.ansible_hostname }}" with_items: "{{ …
5 votes
2 answers
566 views

Discovering extra args needed for running ansible playbooks

I know there's a list-tags, list-hosts and list-tasks option baked into the ansible-playbook command, there's no list-args, which would be super useful, but maybe it means I'm using ansible wrong? … | grep -v "ansible" | grep -v "item" only better. …
5 votes
2 answers
658 views

Running Ansible no-op's faster with a dynamic inventory and cached facts files

But, even so, ansible still takes a fairly onerous amount of time to do nothing. … (running ansible 2.0) …
1 vote
1 answer
3k views

Why is ansible not sending the correct sudo password?

What does it mean when this: EXEC sshpass -d29 ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no\ - … o Port=58030 -o User=em7admin -o ConnectTimeout=30 127.0.0.1 /bin/sh -c 'sudo -H -p "[sudo via ansible, key=mxraphooaxhpruunceorxkcelobceggf] password: " -S -u root /bin/sh -c '"'"'echo …