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
0answers
18 views

Config management for NFS root cluster

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 ...
0
votes
2answers
16 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: ...
5
votes
0answers
58 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
18 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 [on hold]

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
23 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
26 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.
1
vote
1answer
38 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
69 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
40 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 ...
0
votes
1answer
133 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
votes
1answer
52 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
37 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 ...
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
50 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 *************************************************************** ...
0
votes
2answers
66 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 ...
0
votes
0answers
24 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 ...
1
vote
1answer
40 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
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 ...
1
vote
1answer
49 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 ...
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 ...
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 ...
7
votes
1answer
71 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 ...
0
votes
1answer
37 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
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 ...
1
vote
2answers
51 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 ...
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 ...
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 ...
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 ...
1
vote
0answers
60 views

Ansible using role template vs copying static configuration file [closed]

I have been using ansible to manage the haproxy configurations for a few servers and I really like the tool. It makes deploying new servers and keeping the configurations in sync a breeze. One ...
2
votes
0answers
41 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 ...
2
votes
0answers
41 views

How do I make Ansible actually compile a config file having changed my debconf settings for an application?

I'm using Ansible to try to configure all of the workstations involved with a particular project to be able to use BitTorrent sync with a standard configuration (this is actually just an example of ...
0
votes
1answer
23 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
232 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
0answers
233 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 ...
0
votes
2answers
21 views

Automatic retrieval of current mapping debian stable -> released name

I'm automating my customary debian setup using ansible. The playbook is supposed to treat testing/unstable and stable differently: the former are to be maintained "clean", while the latte is to ...
0
votes
1answer
40 views

Sharing simple tasks across roles in ansible?

I have a couple of different machine types that all need to have the official postgres APT repo defined for them in order to be able to apt-get install the right version of tools. These different ...
0
votes
1answer
40 views

Correct way to model so that execution order is correct - Ansible

I wish to do 4 tasks on all machines in a group. Once complete in all machines fully, task 5 must be run on one machine (Assume this is a DB instance). Once task 5 completes, tasks 6 to 10 are run on ...
0
votes
1answer
58 views

Ansible failing on condition check for role. What is a proper one?

I'm trying to do an advanced version of your script where ansible running a role basing on a result of "when" condition. In my scenario ansible connects as root, creates ansible_bot user, grants him ...
3
votes
1answer
89 views

Validate nginx.conf during ansible deploy

I have a single Ansible-provisioned server running a number of sites. My Ansible tasks look roughly like: - name: site nginx config template: src="nginx-site.conf.j2" ...
1
vote
1answer
185 views

ansible-vault encrypt credentials

I have an inventory file with one host: 10.1.32.123 ansible_ssh_user=vagrant ansible_ssh_pass=vagrant My yaml file: - hosts: all sudo: yes gather_facts: yes serial: 20 roles: It's ...
3
votes
0answers
107 views

Need to check whether you need to reboot for a kernel update?

I'm using Ansible to check hosts if they need to be rebooted if the /vmlinuz kernel doesn't resolve to uname -r. The if condition is although always identifing a reboot even though the test machine ...
2
votes
1answer
226 views

Ansible: restart service only if it was running

In an Ansible playbook, I'd like to restart a service after updating config file, but only if it was already running. I do not want to control the state of the service with ansible, only restart it ...
0
votes
0answers
42 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
1answer
55 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 ...
1
vote
0answers
94 views

Managing OpenVZ containers with Ansible

Is there any elegant way to manipulate OpenVZ containers with Ansible? Sure I can install an SSH daemon on each and put my public keys, but as soon as there is a vzcl enter command maybe there is a ...