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
6 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
2answers
23 views

Can I directly register the output of a command in ansible as a boolean?

I have some code checking for the existence of something. If it has 2 lines it means the post exists. Can I register the variable from the check into a boolean immediately in the first task, rather ...
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
33 views

Ansible, Vagrant, sudo and ssh-agent

So I've seen this question and added the Defaults env_keep+=SSH_AUTH_SOCK into my /etc/sudoers file but I am still unable to clone from github on my Vagrant box using sudo: true and sudo_user: ...
0
votes
1answer
22 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 ...
2
votes
2answers
58 views

Nginx not loading css/js/images in https - Blocked loading mixed active content

I am running ubuntu 14.04 with Nginx 1.8.0. While opening the web pages in https the pages appear to be broken as the css/js/images don't load. I get this error "Blocked loading mixed active content" ...
1
vote
2answers
36 views

Ansible conditional statement based on other roles?

I've got the following scenario with an Ansible deployment: hostX has the role common-mta and a few other roles hostY has the role common-mta as well as the role package-postfix The common-mta ...
3
votes
1answer
63 views

Ansible change default value according to a condition

Is it possible to change a role variable default value according to some condition (i.e. the value of another variable)? Details I have two related variables for a command, env and composer_opts. ...
1
vote
1answer
25 views

Copying ansible keypair public key to existing AWS instances

We have around 10 instances already running on AWS using my personal AWS keypair justin.pem. I am setting up an Ansible box, and generated a new AWS keypair called ansible.pem. I copied ansible.pem ...
1
vote
0answers
32 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 ...
0
votes
0answers
63 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
1answer
43 views

Ansible + why yum not install the latest version

I am installed successfully the Ansible tool from yum repository as yum install Ansible Ansible is great tool even more then puppet From site - ...
5
votes
1answer
216 views

Puppet VS Ansible + what is the best auto remote task tool [closed]

there are many remote tools for automation tasks as puppet or ansible my target is to perform many remote tasks on Linux machine as: run block of Linux command , copy files from master machine to ...
0
votes
1answer
27 views

Change variable of which users to create based on group in Ansible

I have the following task - name: Create users user: uid: "{{ item.uid }}" name: "{{ item.username }}" comment: "{{ item.comment }}" shell: /bin/bash groups: "{{ item.groups }}" ...
1
vote
1answer
24 views

Automating computing docker images on AWS E2C machines [closed]

I would like to distribute some of my computing programs on multiple machines when a specific process is started from a web gui. For this, I need to start several aws e2c machines, deploy my software ...
-2
votes
1answer
51 views

SSH via terminal succeeds, but same SSH connection via Ansible is failing [closed]

I am able to connect to remote host from terminal using below command. ssh {username}@{hostname} However, the Ansible play command fails. I copied ~/.ssh/id_rsa.pub to the remote hosts to which I ...
0
votes
1answer
39 views

What benefit is there to using Vagrant for AWS resource management when using Ansible for provisioning?

I understand that Vagrant is a tool to create and manage virtual machines; and that Ansible is a tool to configure one's machines (virtual or otherwise). However, Ansible's AWS modules are capable of ...
1
vote
1answer
12 views

Ansible incorrectly removes IP ranges from Security Group

I've done an Ansible run this morning to change firewall rules for an AWS Security Group. I was surprised to see that instead of adding 2 IP ranges, running the ec2_group module removed 10 out of the ...
1
vote
1answer
25 views

Ansible Wants Vault Password for Unnecessary File

In my hosts file, I have GroupA and GroupB. Configuration for GroupB includes some sensitive data, and therefore I created group_vars/GroupB.yml and encrypted it with Ansible Vault. I have a playbook ...
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 ...
2
votes
2answers
59 views

Is it possible combine remote results to local a register in Ansible?

I'm trying to gather information on a mysql cluster in order to then use in some local logic. My trouble is if I run my command on the remote hosts I won't have access to those results - name: get ...
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
1answer
25 views

Non-ssh password for Ansible

I am setting up my ansible playbook to configure my servers to authenticate through Windows AD rather than the local authentication system. I everything is working except when I run net ads join ...
-2
votes
1answer
99 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 ...
2
votes
2answers
109 views

Ansible, concatenating files

I have an ansible playbook with different roles. In each role I would like to add several lines to the same configuration file. For example, adding sections to a ini file: [section] param1=value1 ...
1
vote
0answers
61 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 ...
3
votes
1answer
55 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
2answers
53 views

Ansible template or lineinfile for Docker defaults?

We're hosting our own internal Docker registry and using Ansible to configure the Jenkins slave that will build/upload the containers. Because our registery is non-SSL, we have to add: "$DOCKER_OPTS ...
0
votes
0answers
43 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 ...
1
vote
0answers
33 views

Put a “config-test” step into an ansible playbook [closed]

While writing this, I solved my own problem. So I'll put the question and answer in case it helps someone else (and in case someone would like to point out a better way): I'm trying to get ansible ...
0
votes
0answers
31 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 ...
2
votes
1answer
65 views

ansible task does not trigger handlers

I'm having trouble getting a task within an ansible role to trigger handlers. Here are the files I'm using: roles/services/tasks/postgresql.yml shows - name: install postgresql packages apt: ...
0
votes
1answer
37 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
49 views

Launching an EC2 Instance with an IAM Role Using Ansible

I'm trying to launch an instance with an IAM Role using Ansible. But I don't find how to do it. Does anyone know if it is possible? If I can't use Ansible. I try it with boto
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 ...
2
votes
1answer
325 views

Executing commands on the Ansible host from a handler

I am trying to implement the following scenario in Ansible (v1.9.1): Ansible connects to remote host and uses su to become root. Ansible host fetches remote configuration file that it is about to ...
2
votes
0answers
166 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
1answer
167 views

Ansible fails to restart service - why?

I'm trying this on AWS EC2 instance running Ubuntu 14.04. I have a task that notifies a handler. When the handler is run I get an error. I'm having trouble understanding the error message and ...
0
votes
1answer
28 views

Pass hosts from master playbook to included playbook

How can I pass the hosts from a master playbook to an included playbook? I'm trying to create a master playbook for a type of server (e.g., a web server) which shares some common playbooks with other ...
1
vote
1answer
279 views

Is it possible to / how would one include vars files from other vars files?

I know it's possible to include tasks / handlers files in other similar files via lines like the following - name: Configure django include: django.yml - name: Configure nginx reverse proxy ...
2
votes
1answer
159 views

Easiest way to exit Ansible playbook while debugging

Say I'm debugging an Ansible playbook and want to quit after a given task (and not run through all of the following tasks). Is there any one-line magic command available, or do I have to manually ...
0
votes
2answers
44 views

Cannot put application back into ELB: Instance has not passed the configured HealthyThreshold number of health checks consecutively

Putting the EC2 instance back into the ELB used to work 90% of the time. Unfortunately lately the deployment regulary fails with the next error: 15:51:59 TASK: [Start the app] ...
1
vote
1answer
108 views

Using Ansible to provisioning users: Modify facts/expand hostvars?

First off, I apologize for the terrible title. I'm not entirely sure how to succinctly describe the problem. So here's my challenge. I'm working on provisioning database users and would like a ...
1
vote
2answers
639 views

ansible print debug msg variable

I try to print the previously registered mosh_version variable using the ansible debug msg command like this: - name: Print mosh version debug: msg="Mosh Version: {{ mosh_version.stdout }}" It ...
1
vote
1answer
296 views

ansible command with_items

In ansible 1.5.4 the following command worked flawlessly: - name: Generate postfix dhparams command: "{{ item }}" with_items: - openssl gendh -out /etc/postfix/dh_512.pem -2 512 ...
0
votes
1answer
66 views

Ansible ad-hoc bracket expansion

Is it possible to use bracket expansion in an ad-hoc command? I'm trying to do: ansible web3 -m shell -a "sudo gzip /var/opt/tomcat/logs/appname.log.2015-05-2{4..7}" -K But it's being interpreted ...
3
votes
2answers
190 views

Parametric ansible command based on facts, how to do it?

I am updating some of my ansible playbooks to run on the latest version of Fedora, that now uses dnf by default. Since most of my playbooks should run on CentOS as well, I would like my script to run ...
0
votes
1answer
293 views

Ansible shell command fails under sudo when it should succeed

I have an Ansible task based on https://github.com/al3x/sovereign/blob/master/roles/tarsnap/tasks/tarsnap.yml#L2 that keeps failing when it should succeed. I used to run the role with ...
1
vote
2answers
116 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?