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

0
votes
2answers
516 views

Ansible AWS dynamic inventory: `./ec2.py --list` unauthorized

I'm trying to use Ansible's ./ec2.py --list --refresh-cache to list my AWS EC2 instances. Via documentation, I've run through this checklist: AWS (docs via Amazon's Controlling Access to Amazon EC2 ...
6
votes
1answer
936 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 ...
3
votes
1answer
52 views

Programatically chaning ansible_ssh_user during a play

I'm currently creating a common ansible playbook for Ubuntu. During the hardening process I disable the root user and create a new sudo user for running future playbooks (called ansible). The first ...
2
votes
1answer
416 views

Ansible: setting hostname over inventory

I am new to Ansible, but a long time programmer, also worked with puppet a bit. Here is the situation, I need to initialize some network appliances, they don't talk bash so I'm using the raw module ...
2
votes
1answer
181 views

How can I run a delegated task for an offline host using Ansible?

I have Ansible tasks for enabling and disabling Nagios checking for some hosts. They use "delegate_to" the Nagios server. However, I can't use them when the host in question is offline, because ...
1
vote
1answer
54 views

ansible lineinfile escaped quotes go missing

Using ansible 1.5.4, the command lineinfile: dest=/etc/bash.bashrc line="bind '\"\e[B\"':history-search-forward" added the line bind '"\e[B"':history-search-forward to /etc/bash.bashrc perfectly ...
1
vote
1answer
168 views

Callbacks or hooks, and reusable series of tasks, in Ansible roles

I'm struggling with making my Ansible roles somewhat composeable and re-usable. I have a role that performs several series of steps. Depending on the other roles being applied to a host, other roles ...
1
vote
1answer
205 views

Ansible :: advanced nested looping

I have to process output from CloudFormation Outputs that is: Ansible code that produces this output: - debug: var: stack.stack_outputs Output: ok: [localhost] => { "stack.stack_outputs": ...
1
vote
1answer
383 views

Prevent rsync from deleting excluded directories

I'm using rsync through Ansible's synchronize-module with the following task definition: synchronize: src='{{ local_app_path }}/.' dest='{{ remote_app_path }}/' perms=no owner=yes ...
1
vote
1answer
314 views

Ansible/Capistrano with fixed sudo command (“sudo su -”)

I have to administer some half-managed servers (monstly CentOS 6), where we are only allowed to login as a regular user, then do "sudo su -" and type the regular user password, and then run the ...
0
votes
1answer
34 views

Ansible synchronize hangs when executing inside ssh with delegate_to

The following task works fine when run directly from my machine. When I run it from a remote machine through SSH it hangs forever. This is the task: - name: deploy public directory ...
0
votes
1answer
21 views

Ansible sudo error while building on Atlas

I've been trying to build my Vagrant configuration on Atlas. Also I'm using ansible for provisioning and i have some sudo issues. After setting up VM while trying to run ansible playbook on Atlas I ...
0
votes
1answer
36 views

Azure, internet facing load balancer without using cloud services

Is it possible to have load balancing between virtual machines without placing the machines in the same cloud service? We want to use Ansible to configure our machines and setup RabbitMQ but I can't ...
0
votes
1answer
115 views

Ansible EC2 Hosts Script Missing Instance

For some reason, ansible's ec2 hosts is missing instances. ec2-describe-instances returns the correct instances, but /etc/ansible/hosts does not: [root@or-manage ec2-user]# ec2-describe-instances | ...
0
votes
1answer
101 views

Hudson GUI cannot run a job with same command that runs fine from the shell

I get this error while trying to run a job in hudson here is the log Started by user anonymous [workspace] $ /bin/bash -x /tmp/hudson3189813701500418318.sh + date Thu Feb 19 17:02:03 EST 2015 + fab ...
0
votes
1answer
359 views

Using an Ansible Do-Until loop to manage outdated directories

I have a directory that will have a series of subdirectories added to it, and I want to maintain only the most recent 5. Here are the two tasks that I think should accomplish this: - name: Get ...
0
votes
1answer
79 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
202 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 ...
2
votes
0answers
165 views

Ansible local_action: stat doesnt find my file

I want to copy a file to remote nodes, but only if the file exists. I copied it into /tmp/webapps/partner.war My Task is: - local_action: stat path="/tmp/webapps/{{ application }}.war" register: ...
2
votes
0answers
75 views

Centralized ubuntu update server

I am in the process of configuring a Central Update Server so we can better manage the security updates on our ubuntu based cloud servers. Here is my plan so far Install apt-mirror on cloud instance ...
1
vote
0answers
30 views

Obtain Kerberos ticket automatically (on boot) in CentOS 7?

I'm using Ansible to administer a group of Windows servers, with my control machine running CentOS 7.1. I've set up my /etc/krb5.conf file to authenticate to a domain controller so I can use one ...
1
vote
0answers
28 views

How to pass raw Ansible params to Windows cmd without any encoding/decoding?

I'm trying to set permissions to some windows directory like this # ansible example.com -m raw -a 'icacls D:\somedir\ /grant "! ЗАО. Руководство":F' -vvvvv and get windows error about invalid ...
1
vote
0answers
86 views

Immediate handler, or flushing just one handler, in Ansible

(Related to Callbacks or hooks, and reusable series of tasks, in Ansible roles): Does Ansible provide a way to flush notifications for just one handler? Like meta: flush_handlers, but for a single ...
1
vote
0answers
134 views

Ansible 'include' statements and autopath

My ansible's 'include' statement was working fine, but recently after including ymls in subfolder, it somehow brokes the role's path. Here's the tree of my role: . ├── site.yml ├── inventory.ini ...
1
vote
0answers
275 views

error creating database using ansible on centos 7

I am trying to install mysql AND setup database using ANSIBLE on CentOS7(i have no idea why every documention in the world now ONLY talks about Ubuntu and NO CentOS anymore...really SAD!) here is my ...
1
vote
0answers
284 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> ...
0
votes
0answers
5 views

Can I get ansible bower with path run as quickly as chdir and command bower?

This is really slow, it takes tens of seconds: - name: Install bower.json for the plugins. sudo: no become_user: www-data bower: ...
0
votes
0answers
60 views

yum + what is the message - No package ansible available

I am try to install the ansible tool on my linux red-hat version - 5.7 yum install ansible Loaded plugins: security Setting up Install Process No package ansible available. Nothing to do ansible ...
0
votes
0answers
20 views

Ansible whitelist directory contents?

In conf.d-style application configurations, it's useful (for security, auditing, and version control) to be able to say that "only the templates listed are present in the directory". There are a few ...
0
votes
0answers
17 views

Deploying latest snort release with ansible

I'm like to be able to automatically deploy snort with ansible, but snort removes old RPMs when new ones are released so I have to adjust my playbook with each new release. I'd really like to be ...
0
votes
0answers
56 views

git module fails to interpret bool parameter (assumes Unicode) - 1.9.2

I'm opening this as a more general case of previous question and after doing more extensive troubleshooting. I have been testing with Ansible 1.9.2 on ubuntu 14.04. I'll try to explain how to ...
0
votes
0answers
42 views

Does coreos' cloud-init have something similar to ansible's vault?

I'm trying to setup ssl keys and certs onto a coreos machine, on the previous ubuntu machine I was using, I had ansible's vault encrypt the key and cert for source control and decrypt it when adding ...
0
votes
0answers
29 views

Ansible mercurial clone hangs on deploy, runs fine on subsequent runs

I have an Anisble playbook that does the following: Launches an EC2 Instance Switches to that instance in a second play within the playbook, and configures the instance for our specific purpose ...
0
votes
0answers
121 views

Fire multiple instances of a handler in Ansible

(Related to Callbacks or hooks, and reusable series of tasks, in Ansible roles): Is there any way to have one notification in Ansible fire multiple handlers? Consider a webserver where each app ...
0
votes
0answers
112 views

Ansible fails to create Amazon EBS-ctorage

I have a problem - trying to automate the purchase of new EC2 instances. Here's my playbook: --- - name: Provision new EC2 instance hosts: local connection: ...
0
votes
0answers
25 views

Python in the debian-installer context

My broader question is about using Ansible to perform the late_command in a preseeded Debian/Ubuntu install. The specific question is, is there some straightforward or documented way to get a working ...
0
votes
0answers
96 views

How to set scp_if_ssh = True for a group?

It's simple to set this variable in an ansible.cfg but it makes sense only for hosts that do not have sftp (and most likely python as well). So I have a group for routers – is it possible to set this ...
0
votes
0answers
498 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 ...