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.

learn more… | top users | synonyms

1
vote
2answers
23 views

How to clean up stuff from roles that aren't used any more on a server?

Suppose I have a host that is, among other things, a web server, where the related Ansible role installs nginx, performs some essential configuration in /etc/nginx, and opens up ports 80 and 443 in ...
3
votes
1answer
27 views

Ansible iterate a dictionary with lists

I have the following variable loaded via include_vars: access: username-foo: - path: / permissions: rwX recursive: true username-bar: - path: / ...
2
votes
1answer
15 views

Ansible: copy template only when destination file does not exist

I'm using Ansible 1.6.6 to provision my machine. There is a template task in my playbook that creates destination file from Jinja2 template: tasks: - template: src=somefile.j2 ...
0
votes
1answer
20 views

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 ...
0
votes
1answer
24 views

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 ...
2
votes
0answers
64 views

Running Ansible locally inside a Dockerfile SSH authentication issue

I'm unable to run my ansible playbook inside a Dockerfile due to authentication issues. Here's my dockerfile: FROM ubuntu:14.04 MAINTAINER hyperfocus # Update system and install ansible RUN apt-get ...
4
votes
1answer
80 views

Distribute ssh public keys among hosts

I'm setting up some machines with Ansible and need to enable password less connections between them. I've got a database master and several slaves. For initial replication the slaves need to ssh into ...
0
votes
2answers
45 views

Looking for a way to get team public keys to EC2 instance autonomously

I am administering a single (now) ec2 instance which will provide some tools to our users. I am using Ansible to manage it. I have it set to create users using a mix of a Cron-job and Ansible (by ...
0
votes
1answer
43 views

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 ...
0
votes
1answer
112 views

Error compiling PHP 5.5.9 on CentOS 6.5 during make command

Here is the error message: cc: internal compiler error: Killed (program cc1) Please submit a full bug report, with preprocessed source if appropriate. See ...
3
votes
0answers
109 views

Kickoff Ansible Playbook after Cobbler install

I am working on implementing Cobbler and Ansible to do our server deploys and am having one final issue. My Ansible playbook works great, my Cobbler install works great, but the issue is in tying them ...
0
votes
0answers
112 views

Restarting redis after installing with Ansible hangs

I'm using the following playbook albeit slightly modified with a newer version of Redis: https://github.com/Kami/ansible-redis I removed the Disable obsolete init.d service and generate upstart ...
1
vote
0answers
115 views

pipework-mediated network configuration of docker container works from CLI, but not through ansible

When running the following from a shell (with pipework from https://github.com/jpetazzo/pipework in the path) all is good: #> docker run -i -t -d --expose=22 <DEBIAN_STABLE_IMAGE_ID> ...
1
vote
1answer
90 views

Use Ansible to create vagrant box ?

I am new to Ansible and I bit confused if I can better use Vagrant to create VM instances (on EC2 and local virtual boxes) and use Ansible only for provisioning or if I can/should use Ansible to ...
1
vote
1answer
95 views

Ansible: Can I use vars_files when some files do not exist

That's the part: vars_files: - vars/vars.default.yml - vars/vars.yml If a file vars/vars.yml does not exist - here is an error. ERROR: file could not read: /.../vars/vars.yml How can I ...
-1
votes
3answers
219 views

Can I administer Amazon RDS instances with, Chef? Salt? Puppet? Ansible?

On the face of it, it looks like I need to be able to install some software daemons on the target nodes for these things to work. If I can't do that (e.g. an Amazon RDS instance), what are my options? ...
1
vote
1answer
121 views

how to unify package installation tasks in ansible?

I am starting with ansible and will use it, among others, to install packages on several Linux distros. I see in the docs that the yum and apt commands are separated - what would be the easiest way ...
1
vote
1answer
130 views

How to initialize known_hosts/authorized_keys/public/private key pairs with ansible

I am using ansible to configure and deploy my app on several machines. The only problem I have now is that I am not sure how to properly initialize/automate the very first connection to this machines? ...
1
vote
2answers
596 views

Ansible not executing host specific playbook in Vagrant multi-machine provisioning

When provisioning with ansible in Vagrant, I am unable to get server/role specific playbooks to run. There is a common playbook run for all hosts, and that is working, but when trying to target a ...
4
votes
1answer
199 views

Passing free-form commands to Ansible using complex-args form

I'm using programatically generated Ansible playbooks. In general, because playbooks are just YAML, this is straightforward. However, when using the "simple" key=value form, playbooks aren't pure ...
1
vote
2answers
158 views

Is the SSH SFTP subsystem required on the managed nodes for Ansible to work?

When I run: ansible all -a "/bin/echo hello" -u myuser I get back: mydomain.myhost.com | FAILED => failed to open a SFTP connection (Channel closed.) The SFTP subsystem is disabled on the ...
-3
votes
1answer
371 views

Why chef, puppet, ansible, salt, etc.? [duplicate]

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 ...
0
votes
3answers
141 views

SSH aborts with Too many authentication failures

I'm attempting to run this simple provisioning script but I'm encountering errors when running vagrant up and then vagrant provision commands. I read that I needed to create a /etc/ansible/hosts file ...
3
votes
1answer
453 views

Deploying a folder of template files using ansible

Is there an easy way to deploy a folder full of template .j2 folder to a linux box, using the same name as the template, but without the .j2 extension, rather than using the template module for each ...
0
votes
1answer
209 views

How can I prepend to PATH while running Ansible's pip module?

I'm attempting to install psycopg2 into a Python virtualenv with Ansible's pip module, but I need to prepend an entry to PATH for it to build correctly (it needs to know the path to the directory ...
1
vote
1answer
134 views

Deployment and configuration of complex python application scheme

Challenge Our fresh application uses several services: custom build postgresql, redis, celery, rabbitmq, haproxy, nginx, uwsgi, about 4 our internal processes (mostly python), AngularJS ...
1
vote
1answer
90 views

Best practices for software configuration?

I'm configuring my AWS EC2 instances with Ansible, but I don't know what's the best way of storing my app configuration. Now I'm just sending a "app.properties" file to the server, using Ansible, but ...
1
vote
3answers
450 views

Running an Ansible ping on a remote host fails with an unknown SSH error

I'm attempting to do an Ansible ping ansible all -m ping --ask-pass but I get SSH failures. As the debug log is rather extensive, I've trimmed down the below quote to where I think the problem ...
4
votes
1answer
433 views

Ansible playbook not working trying to run make & configure with complex switches

This is a follow-on to this question. I'm trying to use Ansible to provision a Vagrant VM. The VM is running CentOS 6.4. I'm using the following (abbreviated) ansible playbook: - hosts: default ...
1
vote
2answers
459 views

Ansible playbook not working trying to run patch

I'm trying to use Ansible to provision a Vagrant VM. The VM is running CentOS 6.4. I'm using the following (abbreviated) ansible playbook: - hosts: default vars: home: '/home/vagrant' ...
1
vote
2answers
175 views

Run included ansible task as standalone task

I have many Ansible playbooks that will get included in much larger playbooks. For example: --- - name: Add user me user: name=me comment="Me" uid=9999 groups=somegroup - name: Add my ssh public ...
0
votes
0answers
89 views

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 ...
8
votes
1answer
614 views

Configuration management: push versus pull based topology

The more established configuration management (CM) systems like Puppet and Chef use a pull-based approach: clients poll a centralized master periodically for updates. Some of them offer a masterless ...
2
votes
2answers
272 views

How to install Python packages to (Homebrew) Ansible's site-packages folder

I have installed Ansible (v1.4.4) and Python (2.7.6) via Homebrew. I'm creating an Ansible playbook for setting up a local development machine on Mac (Mavericks). When I get to the step to import a ...
1
vote
2answers
549 views

How do I authenticate a user on specific tasks using Ansible?

I'm getting 'msg: Failed to lock apt for exclusive operation' when trying to install some dependencies in a playbook using apt, with the vagrant user. I'm suspecting it tells me this because it can't ...
3
votes
2answers
1k views

How do I add sudo permissions to a user created with Ansible?

What is the cleanest way of doing this? Tried adding the user to the sudo group with the users module but Ansible reports it can't find the sudo group.
3
votes
3answers
982 views

How can I add a user to multiple groups in Ansible?

I can't add a user to multiple groups, I keep getting msg: this module requires key=value arguments. This is the piece of code I'm trying: - name: make a new user user: name=user ...
0
votes
1answer
136 views

Ansible AWX AMI/EC2 default username and password

What is the default username/password on the AWX AMI for EC2? admin/password is not working.
2
votes
1answer
412 views

Reusing tasks in Ansible

In Ansible, is it possible to define a set of tasks in one files and then run selected tasks from other playbooks? The documentation describes how to include and reuse the task list, is there a way to ...
2
votes
2answers
1k views

Should I install Ansible with python pip or homebrew on Mac OSX Mavericks? [closed]

I recently moved to using OSX to administrate my linux box, so I'm very new to using linux programs on OSX. I want to use Vagrant with Ansible to bootstrap my development environment, so I need to ...
0
votes
1answer
442 views

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': ...
15
votes
3answers
1k views

How can I implement ansible with per-host passwords, securely?

I would like to use ansible to manage a group of existing servers. I have created an ansible_hosts file, and tested successfully (with the -K option) with commands that only target a single host ...
2
votes
2answers
483 views

Ansible : using different sudo user for different hosts

Recently started using ansible. We have servers where the application is setup under different users, like in server xyz.com, unix user is xyz_user and so on. So in case of xyz.com, ansible xyz.com ...
0
votes
1answer
195 views

Pass variables to ansible playbooks

I need to pull a build from S3 on my target machine. Therefore I need to pass the S3 key and secret to the ansible playbook somehow. I know that I could define them in the inventory the playbook ...
4
votes
1answer
228 views

How to make ansible use password if key was rejected?

My new server instances are configured to login on root via ssh with password. I want my playbook to reconfigure it to use keys instead and disable root login with password on first run, so I need ...
0
votes
1answer
246 views

Where is monitor configuration stored in Ubuntu 13.04 [closed]

I have an Ansible script that runs through and sets up a new install of Ubuntu 13.04. I would like to change configuration related to my monitors and switch mirror monitors off and configure dual ...
6
votes
2answers
1k views

How to handle SSH port changes with Ansible?

I'm trying to use Ansible for automating the setup process of new server instances. One of the setup tasks changes the default SSH port, therefore requiring me to update the hosts list. Is it ...
0
votes
2answers
755 views

Can't communicate with nginx from Vagrant host machine

I am using Ansible to compile and configure Nginx inside a Vagrant box. If I run curl http://localhost/ from inside the box I get the expected response (phpinfo()). If I access the URL ...
0
votes
1answer
97 views

Adding a user to an additional group using ansible

How can I add a user to extra groups in ansible? I don't want to existing set of groups to be replaced, only add the user to the sudo group.
1
vote
1answer
1k views

Is it possible to execute the Vagrant Ansible provisioner on a Windows host machine?

It seems that Vagrant doesn't let me automatically provision the Ansible provisioner on Windows using Vmware. I'm not really sure whether Ansible has to be installed on the host machine, (in my case ...