Questions tagged [ansible]

Ansible is an open-source software platform for configuring and managing computers. It combines multi-node software deployment, ad-hoc task execution, and configuration management.

Ansible is an open-source software platform for configuring and managing computers. It combines multi-node software deployment, ad-hoc task execution, and configuration management. It manages nodes over SSH and does not require any additional remote software to be installed on them. Modules work over JSON and standard output and can be written in any programming language. The system uses YAML to express reusable descriptions of systems.

The platform was created by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Func framework for remote administration. It is included as part of the Fedora distribution of Linux, owned by Red Hat inc., and is also available for Red Hat Enterprise Linux, CentOS and Scientific Linux via Extra Packages for Enterprise Linux (EPEL) as well as other operating systems. Ansible was commercially supported and sponsored by AnsibleWorks. Since October 2015 Ansible is owned by RedHat.

It was named by DeHaan after the fictional instantaneous hyperspace communication system featured in Orson Scott Card's Ender's Game.

1762 questions
0
votes
1 answer

sudo and --ask-sudo-pass on CentOS 6.6

I'm running command: [kamil@server.com ]# ansible example.com -a "sudo id" --ask-sudo-pass sudo password: example.com | FAILED >> { "failed": true, "msg": "[sudo] password for kamil: \r\n{\"changed\": true, \"end\": \"2015-02-05 12:06:16.612869\",…
0
votes
1 answer

Issues with Ansible's default/error handling in a playbook

I'm having some issues with Ansible and the way it defaults to values. What I'm trying to accomplish is to bind a Docker container to on eth1, if it exists, otherwise use lo. My initial approach was to use the defaulting undefined variables as…
vpetersson
  • 861
  • 1
  • 11
  • 22
0
votes
1 answer

How to make sudo -u not require password

I'm using ansible with vagrant and ansible is trying to sudo as postgres user to run some postgres commands. Ansible running as vagrant user seems to run something like sudo -u postgres psql This fails with error message Missing sudo password I ssh…
Max
  • 167
  • 2
  • 5
0
votes
1 answer

Ansible error when unpacking some archives into /usr/local/lib

I'm running an ansible playbook on my machine, and every task completes successfully except for several steps that involve unpacking various zip and tar.gz archives into /usr/local/lib. Here's an example of such an error message: TASK: [sd_dev |…
jonderry
  • 197
  • 4
  • 13
0
votes
2 answers

Is it possible to get host groups from nagios config to ansible?

We have already nice preconfigured nagios with hosts, host groups etc... Is it possible to get host groups from nagios to ansible? are there some plug-in/module which may allow us to do: ansible -m ping hostgroup-from-nagios-config-files
Arman
  • 575
  • 2
  • 8
  • 18
0
votes
1 answer

MySQL installation with Ansible on Debian Wheezy

As the title suggests, I am trying to install MySQL Server 5.5 on Debian with Ansible. Since this needs to be a silent installation, I provide the root password before the installation with debconf module. Here's the output for this: changed:…
Deniz Acay
  • 111
  • 4
0
votes
1 answer

How to notify a handler at the end of execution?

I have a Rackspace instance that I use for testing. I am using a seperate user for running Ansible, and due to my SSH configuration update tasks, if I notify the "restart ssh" task when needed, later tasks are failed due to a SSH connection…
Deniz Acay
  • 111
  • 4
0
votes
2 answers

how to provide username and password for ansible mail module

How to provide username and password of email account while using ansible mail module. I'm using gmail smtp server. In documentation of mail module nothing is mentioned about it. I also came across an issue where username and password support was…
Aniket
  • 1
  • 1
0
votes
1 answer

use file from host as input for lineinfile module

I'm currently setting up a system with ansible and want to automate it as much as possible. So I'm creating the public keys on my ansible machine and copy them to the hosts so that I can control the hosts as much as possible from the outside. Now I…
soupdiver
  • 807
  • 2
  • 9
  • 26
0
votes
1 answer

Why chef, puppet, ansible, salt, etc.?

The devops tools ecosystem is puzzling to me. Instead of shell scripts that work everywhere everyone in the server orchestration/management space is bolting on their own proprietary formats. Ansible has their YAML playbooks, Puppet has its…
user48335
0
votes
1 answer

Ansible in windows

I have a problem with the implementation of script.sh as me failing to recognize the "ansible-playbook" command. /tmp/vagrant-shell: line 25: ansible-playbook: command not found P.D: Here is the link about script.sh Is it possible to execute the…
0
votes
1 answer

Ansible playbook hostvars undefined variables

Folks, The following code is producing errors. code: {% for v in hostvars.iteritems() %} {{ v['ansible_all_ipv4_addresses'][0] }} {{ v['ansible_hostname'] }} {% endfor %} error: {'msg': "One or more undefined variables: 'tuple object' has no…
CMag
  • 707
  • 2
  • 11
  • 32
0
votes
1 answer

Why doesn't nginx serve my 404 page under vagrant?

I have a static HTML site with a 404 page at /404/index.html. Vagrant is mapping port 80 to 9000 so I access my site at http://localhost:9000. The site is browsable, but if I try to force a 404 error I'm seeing /index.html instead. I've tried…
Brian Lyttle
  • 1,757
  • 1
  • 17
  • 17
0
votes
0 answers

Ansible provider for Terraform roles support

I have an Ansible playbook with roles that I want to execute from Terraform. site.yaml --- - hosts: cluster gather_facts: yes become: yes roles: - role: prereq roles/prereq/tasks/main.yml contains the tasks. With Ansible, first I create…
sctx
  • 13
  • 3
0
votes
0 answers

Ansible winrm Warning but ssh is used

I tested the last few days OpenSSH as connection method for windows hosts in Ansible, because we are a mixed environment and I want a similar approach for linux and windows. I tested for windows 10 and 11 hosts and it is working mostly as expected.…
MaKaNu
  • 101
  • 1