Questions tagged [ansible-2.x]

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems

Ansible 2.x is a new backwards-incompatible version that involved a rewrite of the core, and a new API.

Ansible 2.x features new commands like ansible-vault, allowing you to store encrypted information in playbooks and have them decrypted on the fly. It also includes new concepts like Task Blocks, Dynamic Includes, Execution Strategy Plugins, and a suite of new "batteries included" modules. Most importantly, new releases are named after Led Zepplin songs, rather than Van Halen.

https://raw.githubusercontent.com/ansible/ansible/stable-2.0/CHANGELOG.md

Related Tags

1908 questions
0
votes
1 answer

Checkout the same branch for roles using requirements.yml in awx/ansible

I have a project git repository and a roles git repository both have branches with the same name, my project git repository has the requirements.yml similar to below --- - src: scm: git version: master path:…
Snipzwolf
  • 533
  • 1
  • 8
  • 22
0
votes
0 answers

How to transfer the files between remotes machines with ansible

With Ansible, I want to transfer a file from windows environment remote to linux environment remote without going through the controller machine.
0
votes
1 answer

What does it mean and how to fix Ansible error " 'NoneType' object has no attribute 'read' "?

I am trying to install MySql 5.7 version through Ansible, but it is saying fatal: [192.168.1.45]: FAILED! => {"changed": false, "failed": true, "msg": "Failure downloading http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm,…
Asad Ali
  • 389
  • 1
  • 10
  • 28
0
votes
2 answers

Need to refer from first register variable to second variable using only the index number

I have two register variables, I loop on the first one and I need to loop on the second using only the index number. I put this {{y.results[0].stdout}} but of course it only stay on the first array. I want to loop on register y the same as…
Ricky Vene
  • 105
  • 1
  • 11
0
votes
1 answer

Unable to execute Ansible script for fetching code from git and pushing it to multiple server

I want to fetch my RoR code from git, build it and then push it to multiple remote machine through Ansible script. I have mentioned my all machine details under hosts file of Ansible. I have created the ssh key and pushed it under ssh key section…
Asad Ali
  • 389
  • 1
  • 10
  • 28
0
votes
0 answers

Trying to execute ansible playbook on remote EC2 host. getting an error while executing command

I have a playbook file containing below simple commands. ansible version 2.8.1 is installed on remote host. Playbook file: --- - name: Deploy accounts on AWS staging gather_facts: False hosts: Project_stage roles: - { role: stageRole…
prkumk
  • 133
  • 1
  • 8
0
votes
1 answer

Variable with_items and hostvars

I need to pass a dynamic group name info with_items so that i can access a specific fact that is ran from another host. I cannot hard code the group name I tried to set a generic variable that is passed as 'GroupName' a few different ways. Including…
james
  • 157
  • 1
  • 2
  • 11
0
votes
0 answers

Ansible failing when being used async

Im using ansible to provision multiple instance over aws or other cloud provisioner. This is done with the python API ansible provide. If a run playbooks in a sequential manner it works fine. By sequential i mean, execute one at a time, only go to…
Radaeld
  • 175
  • 1
  • 2
  • 9
0
votes
2 answers

Is it possible to merge anisible group_vars, if possible can you hlep me how to solve

Actually I have group_vars, I need to merge those vars, can you help me. group_vars/eu/main.yaml mgmt_routes: Tok: - ip: 172.22.203.253 netmask: 255.255.255.255 group_vars/all/main.yaml mgmt_routes: all: - ip: 172.18.0.70 …
0
votes
2 answers

Make Ansible use the right IP

i'm currently having an odd problem with Ansible I used to change pretty often the IP address of my hosts in my hosts file. Didn't have any problem so far. But now, even though i changed the IP address in my hosts file, Ansible is still using a…
clmnt_sg
  • 15
  • 4
0
votes
1 answer

How to Loop multiple tasks based on the condition

I am trying to iterate multiple tasks based on the result from one of the tasks in the child yml file. Since, looping on blocks is not possible, I have included all the tasks in task file and including that child file from main…
prasanna kumar
  • 257
  • 3
  • 4
  • 17
0
votes
1 answer

How to access an ansible block variable in a file from the same block

I define a yml variable files for ansible with the following structure: appserver: root_directory: C:\app config_directory: '{{ root_directory }}\config' it seems the second variable config_directory cannot be interpreted correctly, I get a…
Joel
  • 669
  • 7
  • 25
0
votes
0 answers

Ansible Inventory Grouping

I have ansible filtering option defined with following playbook. But when executed with centos user it is not filtering by user to run. I have to run this playbook 3 times with 3 different user: 1. centos 2. ec2-user 3. admin This is how I am…
0
votes
1 answer

Using Ansible copy module for remote to remote file transfer (same remote host)

I'm trying to move all files under a specific remote directory to another remote directory - on the same remote host - using Ansible's copy module. The directory, and files, do exist on the remote host and I thought I'd use the Ansible copy module…
nauf
  • 124
  • 2
  • 12
0
votes
1 answer

Error running playbook with encrypted group_vars

I am trying to run a playbook with a file that has been encrypted using ansible-vault. However, I get the following error: ERROR! Syntax Error while loading YAML. could not find expected ':' The error appears to have been in…
TechFanDan
  • 3,329
  • 6
  • 46
  • 89