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
1answer
13 views

Ansible run ends up with MODULE FAILURE?

I am unable to figure out anymore on this as there's no way that I know of to get a "real" error message out of ansible. I run the below $ ansible -i /opt/ansible/ec2.py ...
3
votes
0answers
7 views

How can I reduce the verbosity of certain Ansible tasks to not leak passwords into syslog?

Sometimes I would like to use Ansible's lineinfile or blockinfile modules to write a password into some configuration file. If I do so, the whole line or block, password included, ends up in my ...
9
votes
2answers
1k 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 ...
20
votes
4answers
7k 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 ...
1
vote
0answers
22 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. ...
0
votes
0answers
20 views

Truly dynamic configuration files [closed]

There is this nice feature in Ansible, which runs a dynamic inventory script Upon detecting the execute permission on the file. Is it possible to create similar solution for other configuration files ...
0
votes
0answers
31 views

SSH ProxyCommand not working with ansible_ssh_common_args

I'm using a jump box (server A) to access server B. As per the ansible docs here, I have the following: ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q ec2-user@A.A.A.A"' Server B is, ...
0
votes
1answer
1k views

Issues with ssh and Ansible

When running an ansible task (with a script action), I'm getting this error message: stderr: OpenSSH_6.0p1 Debian-4+deb7u2, OpenSSL 1.0.1e 11 Feb 2013 debug1: Reading configuration data ...
10
votes
6answers
4k views

Ansible stuck on gathering facts

I'm having some odd issues with my ansible box(vagrant). Everything worked yesterday and my playbook worked fine. Today, ansible hangs on "gathering facts"? Here is the verbose output: ...
1
vote
3answers
202 views

Can i use my roles from Ansible in Ansible Tower?

I have created about 30 roles in ansible. Do i have to manually convert those in single playbooks to use them in Ansible Tower?
1
vote
1answer
29 views

Best practice for creating Ansible users

What is the best practice for handling local and remote users in ansible? My current understand is we have a local and remote machine with a default local user and default admin user on the remote ...
3
votes
2answers
1k views

Where do I find the latest ansible error log

I used an ansible script to bring a server configuration up. I was running the script from inside the server and doing everything at the localhost inventory. Now the ssh connection I had to the ...
1
vote
0answers
25 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": ...
0
votes
2answers
90 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 ...
-1
votes
0answers
20 views

Ansible hanging forever on a host specified using IP address that I can SSH to just fine otherwise?

As the title says ansible is hanging up on one of my hosts and I cannot figure out why for the life of me. It is using an IP address so FQDN resolution shouldn't even come into play here. Here is what ...
0
votes
0answers
26 views

How to run multiple playbooks in order with Ansible

I'm working on several Ansible playbooks to spin up a new server instance. There are approximately 15 different playbooks I need to run in a specific order to successfully spin up a server. My ...
1
vote
1answer
84 views

How to use Ansible to manage remote lxc containers?

How can I use Ansible to execute tasks on lxc containers on a remote server? We use Ansible to deploy our code on several servers (physical and virtual machines). Until now, every instance had a ...
2
votes
1answer
54 views

Ansible - include statement

I have something like this: ... - name: Include TEST ENV tasks include: test_env.yml when: test_env tags: - test ... as part of a role. The thing is it does not behave as I ...
54
votes
5answers
13k 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 ...
1
vote
1answer
125 views

Forcing an integer type in Ansible Jinja2 filters

I have the following YAML in an Ansible playbook: offset: "{{ publicip | regex_replace('^.*\\.([0-9]+)$', '\\\\1') | int % (step-1) + 1 }}" cron_minute_list: "{% for i in range(offset, 60, step) %}{{ ...
0
votes
1answer
58 views

Ansible playbook running ad-hoc command

could somebody please help, I am trying to create an Ansible playbook for our VMWare virtual hosts but the playbook will not work. If I run the same command on its own, it succeeds. Single command ...
0
votes
1answer
44 views

Ansible: Permission denied (publickey, password)

I'm not able to connect to a host in Ansible. This is the error: 192.168.1.12 | UNREACHABLE! => { "changed": false, "msg": "ERROR! SSH encountered an unknown error during the ...
-1
votes
0answers
21 views

Docker, vagrant and ansible multi questions [closed]

I have multiple questions about this but based on single problem. I want to create server stack that i can easely clone. so when i purchase another vps with fresh os, i need to have my stack easily ...
1
vote
2answers
158 views

Add extra module to ansible

I have installed ansible to make automation deploy my system and i need some extra module to work with it. I downloaded module yumrepo.py on ansible github and add it to my library directory. But when ...
5
votes
0answers
663 views

Why doesn't ansible have an archive module?

Googling for Ansible create tar doesn't yield any good results and while there is an unarchive module, there's no archive module. I'll probably solve it with the command module, but being new in ...
1
vote
1answer
375 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 ...
9
votes
1answer
3k 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.
13
votes
4answers
7k views

Ansible: Excecute task only when a tag is specified

Ansible tags can be used to run only a subset of tasks/roles. This means that by default all tasks are executed and we can only prevent some tasks to execute. Can we limit a task to be exectued only ...
0
votes
1answer
36 views

How to do proper error handling in ansible?

From what I can tell, ansible only does error handling at the level of tasks, which is really not enough for what I want it to be able to do. Specifically, my use case is a run-of-the-mill ...
0
votes
2answers
86 views

How can I have ansible restart the ssh session after installing nvm?

nvm requires that a user logs out / back in after installation for the changes to take effect. How can I allow for this in an ansible task running via vagrant. here's what I tried: - name : Install ...
0
votes
1answer
14 views

Pass ethernet interface to iptables rule in ansible playbook

I'm writing a pretty simple ansible playbook for setting up our iptables firewall in centos. Here is the playbook I wrote: --- - hosts: test remote_user: deploy sudo: True tasks: - name: Get ...
-1
votes
1answer
27 views

What is the best way to limit an ansible install task to only install if the package is not already present

While creating a playbook for a vagrant box, I want to skip install steps if the package is already installed. This seems like such a common scenario but is not expliclity mentioned in the conditional ...
0
votes
1answer
45 views

How can I use stdout within an ansible conditional correctly?

tasks: - name: check if rpmforge installed shell: rpm -q rpmforge-release-0.5.3-1.el6.rf.i686 register: shell_output - name: Enable repo for htop shell: "{{ item }}" ...
2
votes
3answers
87 views

Error while creating EC2 Dynamic Inventory in Ansible

I am new to Ansible. I had been using the following tutorial to set up dynamic inventory- https://aws.amazon.com/blogs/apn/getting-started-with-ansible-and-dynamic-amazon-ec2-inventory-management/ ...
26
votes
5answers
8k 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 ...
0
votes
1answer
30 views

How can I install Development Tools via vagrant and ansible on Centos 6.7

I get this error when running my first ansible playbook (i.e. I am not familiar with ansible yet) TASK: [Install packages] ****************************************************** failed: [default] ...
1
vote
1answer
50 views

Can ansible tasks be used as dependencies?

I currently have three ansible tasks: create vhosts test config reload nginx I now registered the last two as handlers, but the forward notifications of ansible feel wrong for what i am doing: ...
1
vote
2answers
55 views

Using IAM roles to generate a dynamic inventory for Ansible

I'm looking at setting up a deploy server within our VPC and am trying to use an IAM role instead of keys for Ansibles dynamic ec2.py inventory script. An answer at Can I use IAM Roles for Ansible ...
3
votes
2answers
157 views

ansible and reloading AWS dynamic inventory

See also: http://stackoverflow.com/questions/29003420/reload-ansibles-dynamic-inventory. My question: is there a better way of doing what's below? I have an ansible role that provisions AWS ...
1
vote
1answer
388 views

Ansible with Github: Permission denied (Publickey)

I'm trying to understand the GitHub ssh configuration with Ansible (I'm working on the Ansible: Up & Running book). I'm running into two issues. Permission denied (publickey) - When I first ran ...
1
vote
1answer
498 views

Ansible role post tasks

Is it possible to have "post tasks" in a role? i.e tasks defined in a role, that would run at the end of the play? For example, I have a common role, which most other roles depend on. The common role ...
0
votes
1answer
49 views

Is it assumed that if you use Ansible, you'll use Vagrant too?

I'm building a multi-server e-commerce website using Django and PostgreSQL. I'll be utilizing multiple servers (app, database, static, etc.) from Linode. Currently I configure my servers using a ...
0
votes
1answer
26 views

Find a program that could be in several different places with Ansible

I'm ansibilizing a couple servers for a python application, some of which are CentOS, others are debian. Is there a convenient way to locate a program that could be installed in various places, ...
0
votes
0answers
31 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 ...
4
votes
1answer
56 views

Ansible: error when trying to unarchive a .tar.gz retrieved via the “get_url” module

I'm using Ansible 1.9.4 on a Debian (Jessie 8.2) virtual machine. I have a file that is stocked on Google Cloud Platform that I retrieve on the remote via the "get_url" module. But when I try to ...
0
votes
0answers
31 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 ...
2
votes
1answer
28 views

How to configure auto-scaling with Bamboo Agents?

We are able to launch new Bamboo agents and register them with the Bamboo server by using AWS auto scaling groups and using the user data, but scaling down is an issue. A Bamboo agent is like a ...
1
vote
1answer
30 views

ansible user variable overwritten by local machine user

so I am getting ansible setup and have a host configuration successfully setup via my ansible_hosts file: 104.236.59.171 ansible_connection=ssh ansible_user=root checking the configuration status ...
0
votes
1answer
179 views

Ansible not found in PATH after installation on Vagrant box

The Problem For a test, I set up a very simple Vagrant file. This is just to test how working with Ansible is. Sadly I am stuck at step number 2 with the following error during vagrant up --provision ...
3
votes
1answer
59 views

How to refer to an existing uid and gid in Ansible?

In my playbook I install the amavis package. Later in a task I use the mount module to setup a ramdisk (tmpfs). In order to let the tmpfs-ramdisk be owned by the uid and gid created during amavis ...