Questions tagged [ansible]

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.

From the Ansible Documentation:

Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.

From Ansible on GitHub:

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.

447 questions
57
votes
5 answers

How is Ansible different from simply running a provisioning bash shell in Vagrant?

A team of IT sysadmins that have exprience using shell scripting to solve their problems, are contemplating to start using Ansible instead. Are there substantial differences and good reasons to start using Ansible vs. to continue writing shell…
Evgeny Zislis
  • 9,023
  • 5
  • 39
  • 72
37
votes
6 answers

How to test provisioning and configuration in Ansible setup?

Looking at trying to build some resilience into our Ansible setup which deals with provisioning and configuration. I understand a few methods of testing on the configuration side of things but I'm wondering how best to implement testing on the…
Naphta
  • 627
  • 6
  • 9
34
votes
4 answers

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). I've got a pre-task to change the ansible_port variable, so then when I start…
Peter Turner
  • 1,482
  • 4
  • 18
  • 39
34
votes
3 answers

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. The problem I'm trying to solve is I've got 1000 users that I need to manage on a…
Peter Turner
  • 1,482
  • 4
  • 18
  • 39
34
votes
5 answers

Where to put ansible-vault password

We are planning to use ansible vault in our project to prevent leaking passwords or keys in git. The idea is to put all our sensitive data into a plain file then encrypt this file with ansible-vault using a password before pushing to git. To…
storm
  • 1,759
  • 3
  • 16
  • 34
26
votes
1 answer

Ansible: What's the difference between task, role, play and playbook?

Ansible has tasks, roles, plays and playbooks. Are those just names for different levels in a playbook organization? If not, how, exactly, do they differ from and relate to each other?
caxcaxcoatl
  • 833
  • 1
  • 8
  • 12
26
votes
4 answers

Ansible: Other option available for telnet check of open ports?

I'm new to Ansible. Here's my task ... I have 400+ hosts, and I need to verify if 5 different ports are open from their end to our web server. Individually, I could log in and run: telnet mywebserver.com 443 telnet mywebserver.com 80 telnet…
AWhitaker
  • 371
  • 1
  • 3
  • 5
23
votes
1 answer

Git clean/smudge filters for ansible vault secrets

I am trying to setup clean/smudge filter in git to have automatic encrypting and decrypting of files containing secrets thru ansible-vault command. Peculiarity of the ansible-vault command is that it is not idempotent (it creates a different binary…
ᴳᵁᴵᴰᴼ
  • 1,173
  • 10
  • 22
22
votes
2 answers

What is Ansible's config equivalent of `--vault-password-file`?

According the help of ansible-playbook one could use --user=REMOTE_USER to define the ssh user, but one could also define ansible_ssh_user: REMOTE_USER in either the host- or group_vars. Question What variable need to be defined in either the group-…
030
  • 13,383
  • 17
  • 76
  • 178
22
votes
3 answers

Execute multiple Ansible tasks with the same list of items

I am using an ansible playbook to configure Apache for a list of sites. The playbook has to copy the virtual host configuration template for each site into place, and then enable each site using a2ensite: - name: Install apache site conf …
Stephen Ostermiller
  • 392
  • 1
  • 3
  • 13
21
votes
3 answers

What are the limitations of Puppet in comparison to Ansible?

I would like to understand the differences between Puppet and Ansible, especially what kind of Puppet limitations has in comparison to Ansible. Are there any things you cannot do it in Puppet, but you can in Ansible? In other words, why some people…
kenorb
  • 8,011
  • 14
  • 43
  • 80
18
votes
1 answer

How to keep configuration files automatically during apt-get upgrade or install?

When performing and apt-get update; apt-get upgrade -y on a server I encountered the message: Setting up sudo (1.8.16-0ubuntu1.5) ... Configuration file '/etc/sudoers' ==> Modified (by you or by a script) since installation. ==> Package distributor…
Steven K7FAQ
  • 666
  • 1
  • 5
  • 13
18
votes
2 answers

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. I can use serial:1, but I want to stop the playbook altogether if I get a failure so I can fix it before proceeding instead of accumulating errors. I'd also…
Peter Turner
  • 1,482
  • 4
  • 18
  • 39
17
votes
4 answers

How do I configure SSH keys in a Vagrant multi-machine setup?

I have 4 VMs in my Vagrantfile - 3 application servers and an Ansible control host. I only use Vagrant to create the VMs as I provision them manually from the ansible control host because I am still creating/editing the ansible scripts. I can do…
opticyclic
  • 489
  • 2
  • 4
  • 12
15
votes
2 answers

What is ansible-runner about?

I've read the README file from the github repository as well as the documentation site of ansible-runner (from the official ansible project) but I don't understand what is ansible-runner about and in which case can it be useful ? Is it a project…
1
2 3
29 30