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
17 views

setting up asg with Ansible and not able to use ec2.py for inventory

I have created local configuration and Amazon Auto-scaling group. By using this code. --- - local_action: image_id: ami-61f9324 instance_type: t2.micro module: ec2_lc name: ...
-1
votes
0answers
21 views

Config management for NFS root cluster [on hold]

I'm running a Linux cluster where each node PXE boots from a NFS share (read only). Configuration on system boot is done by scripts within initrd and in /etc/rc.d/ (manually created). System updates ...
5
votes
0answers
67 views

Multi-datacenter Ansible load balancer template

I am migrating the management of an existing multi-datacenter setup to Ansible, but I am not sure what is the best way to model it, as I am new to it. I have three data centers D1, D2 and D3. In ...
0
votes
0answers
13 views

Ansible roles licensed A/L/GPL: infects entire playbook? [duplicate]

Curious your thoughts. There are some great Ansible roles for a project I'm working on that are licensed using the GPL family, but I'm concerned that it'll infect the whole project if I use the one ...
2
votes
1answer
16 views

Run ansible task on other members of a group, but not the current member

So I have a group of nginx server: [nginx_internal_servers] n01.local n02.local n03.local And I have a pre deploy task to run. I'm running in serial:1 mode, and I only want this pre deploy task to ...
0
votes
1answer
25 views

rename VMware vCenter guest name via Ansible

I'm trying to find a way to rename guest vm name (not the OS ) in vsphere (vcenter Env). I've managed to create a VM using the vsphere_guest module but I cant find a way to rename the guest VM the ...
0
votes
1answer
20 views

Shouldn't ansible-playbook -e “sudo=no” override sudo: true in my playbook?

When I auth with a non-sudo user I want to override playbook sudo. --- name: test hosts: foo sudo: yes If I do: ansible-playbook test.yml -e "sudo=no" It doesn't get properly override, instead ...
-5
votes
1answer
31 views

init system vs configuration management [closed]

Best practice: What tasks would you give to an init system like systemd vs a configuration management system like ansible? What I like about starting up services with a CM is portability across ...
0
votes
2answers
24 views

RabbitMQ auto-configuration of cluster

The RabbitMQ clustering document https://www.rabbitmq.com/clustering.html describes a process whereby you can deploy a configuration file for clustering so that a cluster is automatically created ...
0
votes
1answer
27 views

Can I use IAM Roles for Ansible

Apparently the AWS Access Key and Secret Key are optional parameters for the AWS Cloud Modules, however the places where the ansible would pick up those values are from Environment variables. Can we ...
0
votes
2answers
20 views

ansible tower reports : stdout capture is missing

How to fix the error of stdout capture being missing. I am scheduling couple of tasks, initially they are running fine after couple of iteration it is throwing this error.
4
votes
1answer
1k 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
1answer
39 views

Use Ansible task name as variable

I have some task in a playbook. I need send a message for each task. - name: Upload kubernetes config template: src=kubernetes-config.j2 dest=/etc/kubernetes/config backup=yes ...
1
vote
1answer
71 views

Migration from ansible to saltstack

We have a large AWS infrastructure which we manage and configure using ansible. I want to try and move our configuration management to saltstack. I've setup a server to be the salt-master and ...
1
vote
1answer
41 views

How to fetch multiple files from remote machine to local with Ansible

I would like to copy files from remote directory to local directory with Ansible but fetch module allows me to copy only one file. I have many servers from which I need files (same directory each ...
2
votes
3answers
2k views

Always trigger handler execution in Ansible

I'm using Ansible to provision my development server. I want it to always start some services for me. I have handlers for this purpose but what is the best way to trigger handler execution without ...
3
votes
2answers
3k 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: / ...
0
votes
1answer
137 views

What does “localhost | FAILED => Missing become password” mean? How do I get past it?

I have a Ubuntu 14.04 virtual machine set up in virtualbox and I am trying to follow these instructions. https://serversforhackers.com/an-ansible-tutorial When I get to the module section and try to ...
1
vote
1answer
51 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 ...
5
votes
3answers
2k 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 ...
2
votes
1answer
247 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 ...
-1
votes
1answer
53 views

Need help configuring Ansible for the first time [closed]

Summary: I'm trying to install Ansible on an Ubuntu 14.x server. I'm trying to follow these steps: http://docs.ansible.com/intro_installation.html I have a problem with this command when I issued it ...
0
votes
0answers
39 views

Error installing Python related packages for Ansible on an AWS Ubuntu server

I am trying to install the Ansible control server on Ubuntu 14.x (an AWS instance). When trying to install the dependencies, I saw an error. I'm not sure what I need to do. Is this an ignorable ...
4
votes
1answer
2k views

how to access host variable of a different host with Ansible?

Let's say a have a host that collects some data and it's in a group [collectors]. I also have hosts in group [reporters]. So I want to set a variable on reporters from groups['collectors'][0] ip ...
0
votes
2answers
69 views

Ansible command line retriving ssh password from vault

I am trying to setup Ansible to manage Linux boxes from different customers and here are what we have to work with. No Pub key authentication - I wanted it as much as you do but it won't happen any ...
1
vote
1answer
32 views

ansible to create vpc asking for hosts

I'm pretty new to ansible and from reading things what I'm doing should work. I have the following file called aws.yml --- - hosts: localhost connection: local gather_facts: no vars: ...
0
votes
1answer
20 views

How should I check an existing system value with Ansible?

I have an Ansible task where I set the version of Ruby used globally on my system. - name: Set Ruby global version shell: /usr/local/bin/rbenv global 2.2.1 The problem is that this task always ...
0
votes
1answer
235 views

Convert value of an Ansible variable from lower case to upper case

I am working on a playbook to join linux systems to Active Directory. I can't seem to find a way to convert the value of ansible_hostname to uppercase. One of the commands I need to run requires the ...
0
votes
1answer
52 views

Stuck on gathering facts

I'm trying to run an Ansible playbook, but it seems to be freezing on 'Gathering facts'. This is the output: GATHERING FACTS *************************************************************** ...
1
vote
1answer
44 views

Appending to lists or adding keys to dictionaries in Ansible

(Related to Callbacks or hooks, and reusable series of tasks, in Ansible roles): Is there any better way to append to a list or add a key to a dictionary in Ansible than (ab)using a jina2 template ...
0
votes
0answers
25 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
17 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
1answer
25 views

Ansible Playbook With Inventory-based Tasks

Is it possible to use the content of the inventory file (or a dynamic inventory) to create tasks? For instance, let's say I wanted to configure a monit server dynamically to remotely monitor N ...
7
votes
1answer
73 views

Configure SSH credentials per environment

I'm trying to figure out how to configure the SSH credentials separately for a production and staging environment with Ansible. I understand that you can configure the server IP addresses and ...
1
vote
0answers
56 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 ...
4
votes
2answers
757 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
38 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
460 views

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 ...
3
votes
1answer
483 views

Vagrant: I need a provisioning system with no dependecies

Getting off the ground with a vagrant config. Host is Windows. I have a really simple config, so I wanted to use Ansible, but got this: [default] Running provisioner: ansible... The executable ...
-6
votes
1answer
107 views

Does a tool like ansible make it possibly to get a secure server, without knowing a lot about security? [closed]

If I modified something like this into a server similar to the one described here with a minimal set of services (what you need for ssh, basically) would it be reasonably secure? sovereign: A set ...
4
votes
7answers
3k views

Install RVM with ansible

I am attempting to install rvm with ansible on a centos-based vagrant box. The command I am running is: vars: user: "foo" - name: install rvm action: command sudo -u $user bash ...
0
votes
2answers
150 views

How to see stdin of ansible commands

This is basically the same question as how to see ansible stdout only I wanted to see the commands generated and passed in by ansible. Is it possible?
1
vote
2answers
117 views

Display output with Ansible

I have a Ansible play for PGBouncer that displays some output from a stats module built into PGBouncer. My issue is that when Ansible prints the output to the terminal it mangles the newlines. ...
1
vote
2answers
52 views

How can I stop ansible from writing passwords to the logfiles?

I am setting up a MySQL server and want Ansible to set the mysql-root password during installation. With the help of the internet I came up with this solution: - name: Set MySQL root password before ...
1
vote
2answers
659 views

Using ansible to add users' public keys to one user's authorized_keys file

Trying to add two people's Github public keys to a user's authorized users file. I am able to successfully retrieve the SSH keys: --- - hosts: 127.0.0.1 connection: local vars: my_users: ...
4
votes
2answers
931 views

Running apt-get autoremove with ansible

I maintain a flock of EC2 servers with ansible. The servers are regularly updates and upgraded using the apt module. When I manually tried to upgrade a server, I received the following message: $ ...
0
votes
2answers
58 views

Managing thousands of machines with approval controls [closed]

We are a startup that is just getting up to speed and running into the problem of managing hundreds of machines, and having to do nightly and weekly releases to all of them as well as managing their ...
17
votes
5answers
1k views

When is it appropriate to use a configuration manager (eg Puppet / Chef / Ansible)?

At my current workplace, I look after two VMware host machines, an OpenBSD physical machine, three Debian VM's, and six Windows Server VM's (2008/2012). I'm considering implementing a configuration ...
0
votes
3answers
68 views

Ansible repeating roles

I use Ansible to manage some web- and database servers which run websites for multiple vhosts. For each website I need to assign a database role to the dbservers group and a website role to the ...
5
votes
1answer
85 views

Can't install PM2 services via Ansible on an Ubuntu EC2 instance

I'm using Ansible to create a pm2 service on a EC2 / Ubuntu instance. Below is the script. When I run it, PM2 is installed and the service is enabled. When I run pm2 list, I don't the see the ...