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

ansible 2.4 (python 2.7.5) and ansible 2.6 (python 3.6.3) dictionary syntax difference?

On server 1 i have ansible 2.4.2.0 with python version = 2.7.5 : On server 2 i have ansible 2.6.0 with python version = 3.6.3 : on Server 1, this works fine , by calling a dictionary roles/webapp/defaults/main.yml inside…
Omar BISTAMI
  • 770
  • 2
  • 11
  • 19
0
votes
0 answers

Configuring Lambda as Target Type for ALB using Ansible

AWS ALB has three target types - Instance, IP and Lambda. If I want create Target group using Ansible playbook, there are only two options you can use - Instance and IP. Link Here So, how to create target group for Lambda using Ansible ?
Dinesh Pundkar
  • 4,160
  • 1
  • 23
  • 37
0
votes
0 answers

How to instruct Ansible for remote node command to find a text resource file on remote node

I am trying to upgrade some Jboss servers for my application running on remote nodes using Ansible. Through Ansible I can invoke a jboss server start script which has to upgrade and start my server on remote node. Problem is that the script…
Mayank
  • 13
  • 4
0
votes
2 answers

Limit groups a play is run on from the playbook source code

The goal is to limit the group of hosts a play inside a playbook is run on. The below code doesn't limit the groups to group cluster and sometimes the below playbook is run on localhost - hosts: all:!localhost gather_facts: no tasks: ...…
rok
  • 9,403
  • 17
  • 70
  • 126
0
votes
2 answers

Ansible playbook for getting an attribute from returned json data

I am new to Ansible and this my first attempt to it. I have a task to retrieve an attribute Address from a consul nodes end point. My play looks like below - hosts: localhost connection: local tasks: - name: "Get the addresses" block: …
DDStackoverflow
  • 505
  • 1
  • 11
  • 26
0
votes
2 answers

Ansible register fails when there is no output from shell

So basically i want to check somehow if the /dev/xvdb1 is mounted to /var If answer is yes: don't create dir don't copy files don't mount /var etc If the answer is no: proceed with everything - name: check if /var is mounted shell: df -hT |…
Dejan Bodiroga
  • 143
  • 2
  • 12
0
votes
1 answer

Can't run enable in playbook

I am currently running ansible 2.7 and I have the following playbook info.yaml --- - hosts: routers gather_facts: true tasks: - name: show run ios_command: commands: - show running-config register: config I…
Mr39
  • 51
  • 1
  • 10
0
votes
1 answer

Double entry in fstab using Ansible

I want to: mount /dev/xvdb1 to /mnt/newvar copy files from /var/ to /mnt/newvar mount /dev/xvdb1 to /var But when i do this with ansible i got double entries in fstab and it should replace the previous one, any solution for this…
Dejan Bodiroga
  • 143
  • 2
  • 12
0
votes
0 answers

Best practice: how to make a CI pipeline fail if there are deprecation warnings in Ansible playbooks?

Recent Ansible versions do not treat deprecation warnings as errors, so there is no obvious way to make a CI pipeline fail if there are deprecation warnings. One solution I can think of is to collect output from ansible-playbook --check to a file…
Alex
  • 907
  • 2
  • 8
  • 22
0
votes
1 answer

Ansible : sychronize files between two remote hosts given a specific group of hosts destination

i want to synchronize (copy) files between two remote hosts :. Under my playbook , i'm running my tasks on several groups relativley to every task case. My playbook looks like this : --- - hosts: myHosts gather_facts: true become: true …
firasKoubaa
  • 6,439
  • 25
  • 79
  • 148
0
votes
1 answer

Ansible dynamic inventory does not work for Azure Cloud

I am trying to play around with Ansible dynamic inventory to get software installed/perform configuration management. I have executed instructions as given by Microsoft…
learner
  • 2,480
  • 10
  • 50
  • 94
0
votes
3 answers

Ansible playbook only working with root user and failing when running with other sudo user

I had a working playbook in my test environment, where my user was root user itslef and didnt have any issue. When i moved my playbook to staging environment , there my login user account is "admin" which is sudo user. But all of my playbooks are…
saran
  • 139
  • 1
  • 2
  • 12
0
votes
1 answer

Ansible ask for password to ansible vault from other group vars

I have problem with ansible. I have couple of group_vars folders and in this folders there is files encrypted by ansible-vault with difference passwords between prod and test: ├── group_vars │   ├── app1_prod │   │   ├── application.yml <-…
0
votes
2 answers

how to get inventory_hostanme and ansible_ssh_hosts info by running playbook on localhost

I want to write hostname and ssh_host under a specific group from an inventory file to a file in my localhost. I have tried this: my_role set_fact: hosts: "{{ hosts_list|default({}) | combine( {inventory_hostname: ansible_ssh_host} ) }}" …
jass
  • 343
  • 3
  • 15
0
votes
1 answer

Ansible Git clone escape special charecter

I am trying to clone a git repo using git module. My below code perfectly works most of the time but fails when a password contains '#' character with it (My doubt it might fail with other charecter as well). Please help me to find a way to escape…
Shibankar
  • 806
  • 3
  • 16
  • 40
1 2 3
99
100