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

5
votes
0answers
75 views

Ansible - Access through Bastion w/ MFA

In my current environment, I have all my Linux servers only accessible through a bastion host, which has MFA enabled. I've managed to get Ansible to successfully talk to servers through the bastion, ...
3
votes
0answers
815 views

Running service with systemd as default user via ansible in ec2 (requests password)

I'm trying to employ the following Ansible script (part of a playbook) to run unicorn via systemd for a rails app on EC2 (micro) instance: --- - name: restart unicorn command: psql -h {{ db_host }}...
3
votes
0answers
296 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 ...
2
votes
0answers
2k views

Ansible: Failed to connect to the host via ssh

Anyone know why this isn't working? I'm using Ansible on Cygwin using a compiled version of sshpass. I followed the instructions at http://www.jeffgeerling.com/blog/running-ansible-within-windows ...
2
votes
0answers
30 views

Passing parameters to ansible callbacks

I have recently been alerted to the existence of ansible callbacks, which appear to be a way to modify some of the defaults under given conditions. However, I have scoured the ansible documentation ...
2
votes
0answers
36 views

Cannot install from ansible-galaxy on an FC22 machine

Ansible is installed from github, as per ansible site's instructions, and appears to work OK. But galaxy fails thusly: # ansible-galaxy -vvv install goozbach.epel Using /etc/ansible/ansible.cfg as ...
2
votes
0answers
139 views

Forward Kerberos Authentication on Ansible

I have an ansible control machine (host-A) that need to talk with host-C, an Windows machine that doesn't have local users (It's an Active Directory). host-A doesn't have network access to host-C, ...
2
votes
0answers
33 views

Capture template output on the fly

I need to run a command on the target server that accepts data through stdin only. The data I'm feeding it comes from a template file and contains sensitive data, so I'd rather not have it sitting in ...
2
votes
0answers
631 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 ...
2
votes
0answers
194 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
25 views

How to run Ansible's gce.py script from inside an instance running in the cloud?

My goal is to create a compute engine instance in Google cloud from which I can run ansible scripts to further create additional instances that will run containers via GKE. I've figured out a number ...
1
vote
0answers
43 views

Ansible variable precedence

I'm trying to understand variable precedence in Ansible - more exactly the part about host_vars and group_vars in inventory or playbook. My layout looks like this: production/ ├── inventory (alfa, ...
1
vote
0answers
23 views

Ansible work with large variables locally

I am trying to develop a local configuration management application working with ansible(2.0.1) under the hood. I have large selection of variables (about 1000 entries per var file) to be used which ...
1
vote
0answers
32 views

How do I get the ec2 tag Name from my ec2 hosts?

I'm wanting to extract the "Name" tag from ec2 instances. How do I do that? It doesn't seem to be part of ec2_facts
1
vote
0answers
51 views

How do I extend the timeout value for long-duration playbooks ran against Windows servers?

I have Ansible playbooks that can transfer files to Windows servers. I have Ansible playbooks that can run small PowerShell scripts. But I cannot get an Ansible playbook to run a long-running ...
1
vote
0answers
27 views

Ansible: a host appears in more than one group with a shared parent. A play is run for the parent, can it run multiple times?

I have this: [child1] host [child2] host [parent:children] child1 child2 and a play: - host: parent task: some_task Since "child1" and "child2" have the same host the play is only run once. ...
1
vote
0answers
145 views

Ansible sudo actions on Azure VM's

I using the CentOS-2nics-lb-cluster azure template to create a test environment with two virtual machines. The default admin user is created with this blob. "osProfile": { "computerName": "[...
1
vote
0answers
320 views

Install yum module for Python 2.6

I am running a Red Hat Enterprise 5.11 Server and just installed Python 2.6 in addition to version 2.4, which is system default. Unfortunately, I don't have access to the yum module anymore which I ...
1
vote
0answers
181 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: path=/var/www/mortgage-calculator/src/mortgage-plugin-ember-...
1
vote
0answers
236 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
324 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
357 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 ...
1
vote
0answers
351 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
295 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> /bin/...
0
votes
0answers
14 views

Using ansible for multiple web apps on one server

So far, most of the ansible guides and documentation I have seen was about having one application that runs on multiple servers. But I would like to automate the opposite: I have several small rails ...
0
votes
0answers
24 views

How can I use variables in Ansible expect module questions?

I'm trying to use a variable in Ansible playbook using the expect module. It seems like I can use it for the answer, but not the question - is there some escaping I can do to make this work? ...
0
votes
0answers
36 views

Automate vm creation and configuration with ansible

I am looking at different ways to consistently, quickly and automatically provision and configure linux VMs. I am currently using ansible to configure all my servers. It really is the business. I ...
0
votes
0answers
25 views

Ansible fails on AWS domain name, but not on ip and other domain name

I have a machine which I am trying to ping via ansible to test my connection. Originally we were using the AWS domain name (note, not using the actual addresses): ec2-{ip}.address.compute.amazonaws....
0
votes
0answers
58 views

Ansible-galaxy not working with sudo

I'm having problems instaling plugins with ansible-galaxy. I've tried 3 things: Instaling without sudo: ansible-galaxy install sfromm.epel [WARNING]: - sfromm.epel was NOT installed successfully: ...
0
votes
0answers
28 views

looping using with_items while registering it

I am passing 3 variable values from inventory file. Now i want to confirm that all the 3 variables values are present in inventory file. I am registering the values with with_items but how to check ...
0
votes
0answers
58 views

How to use variables inside hostvars lookups in Ansible?

I'm using Ansible and dynamic inventory to provision servers in AWS. To initialize a clusterd service I need to lookup the private dns hostnames of other nodes in the cluster based on a variable. ...
0
votes
0answers
60 views

Ansible known_hosts task fails

I'm new with ansible and I created small ansible-playbook, that adds github ssh host key to known_hosts in each server: --- - hosts: all tasks: - name: Add github to ssh known-hosts ...
0
votes
0answers
30 views

Which local user accounts should I use for Ansible?

I can't find any official (ansible.com) doc where they suggest which user or class of user to use on the target machines, those machines that are to be managed. I suppose any local user would be OK ...
0
votes
0answers
32 views

Ansible conflicts with AppArmor

I am trying to run some Ansible playbooks on a fresh Ubuntu 14.04 install. But this hangs on the first task, whatever the task is. Even the ping module doesn't work. When I stop AppArmor on my target ...
0
votes
0answers
50 views

openstack-ansible stuck on ssh

I'm being brave on deploying OpenStack using Ansible. Finally stage of punching commands except I'm running into ssh error. This seems to be either forked or customized ansible for OpenStack. In the ...
0
votes
0answers
105 views

Passing an Ansible host fact as stdin to a command

Is there a core module in Ansible 2.0+ which allows to use a host fact as a standard input for a command? I want to run a program on remote hosts, passing passphrases to it, so echoing the variable ...
0
votes
0answers
48 views

Variables available within “hosts” key of ansible playbook?

For a few reasons (e.g. delegate_to is broken in the current available versions of ansible 2.0), I want to be able to do something like this within a playbook: - hosts: all tasks: - set_fact: ...
0
votes
0answers
188 views

Ansible log in as regular user and become root

using the new "become" syntax, how do you configure your playbook to log in to a host as a regular user, switch to the root user and ask for a password? I tried: --- - hosts: foo gather_facts: no ...
0
votes
0answers
63 views

Ansible and EC2: How to enumerate running instances by tag?

In a playbook, I want to spin up a bunch of Spot instances on EC2 and deploy some services on them. Since I want to re-use already running spot instances with a specific tag, I am using exact_count ...
0
votes
0answers
77 views

manage docker container on a several host from a remote server

I am trying to create a classroom environment for the many labs sessions i have for a networking classes. I am thinking of a docker container based architecture with ansible to orchestrate the ...
0
votes
0answers
53 views

Strategy to use Multiple Cloud Accounts for Ansible Tower Playbooks

The Ansible Tower for Job Templates accepts only one CLOUD Account Credentials. What would be the best way to handle situation like perform DR from AWS Account A to AWS Account B. We can think of ...
0
votes
0answers
51 views

Multiple ports for ssh in Ansible

We can set port for ssh connection for host: [api] 10.0.0.1 ansible_connection=ssh ansible_ssh_user=root ansible_ssh_port=22 But how can I set additional port for case when server uses another port ...
0
votes
0answers
64 views

How does ansible's service module handle conflicts in service name?

From Ansible doc: Supported init systems include BSD init, OpenRC, SysV, Solaris SMF, systemd, upstart. In what order does Ansible try to run the service? What if there's both a init.d script ...
0
votes
0answers
184 views

Remote backup with netcat and Ansible

I try to backup my servers with Ansible. My setup is like this: SERVER 1..n (my data I want to backup) ANSIBLE_HOST (on this server my Ansible backup playbook is executed by a cron job) ...
0
votes
0answers
82 views

Netscaler VPX CLI disable

When I SSH into the Netscaler VPX it forwards you to the CLI. To use bash you type shell which will forward you to the root user who is connected with the nsroot SSH user. I haven't managed to be able ...
0
votes
0answers
60 views

Debugging Ansible's support for compressed database imports?

The documentation for Ansible's mysql_db module says, "Uncompressed SQL files (.sql) as well as bzip2 (.bz2), gzip (.gz) and xz compressed files are supported." However, when I try to import a .gz ...
0
votes
0answers
14 views

Unable to use insert with Ansible ufw

I have the following in my playbook - name: Open 8443 ufw: rule=allow interface=eth0 direction=in proto=tcp src={{customer_network}} to_port=8443 insert=100 tags: api Running that causes the ...
0
votes
0answers
300 views

Ansible hangs when copying from a remote host to remote hosts

I wanted to copy a file generated on hostA to production severs and tried the task below but Ansible hangs. I set ssh_args=-i ForwardAgent=yes as is suggested in the previous post but this has not ...
0
votes
0answers
353 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
47 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 ...