ansible-inventory Questions

2

TL; DR With Ansible I am trying to define some kind of default variable at playbook level - let's call it playbook defaults - which have precedence over roles defaults but can be overridden by the ...
Prana asked 14/3, 2018 at 15:44

6

Ansible is reading /etc/ansible/hosts file and giving errors that I don't understand. ARNING]: * Failed to parse /etc/ansible/hosts with yaml plugin: Syntax Error while loading YAML. did not find e...
Felten asked 10/10, 2019 at 6:29

6

I'm finding it difficult to run a simple playbook. I already ping target and it was successful. When i run the playbook i get this error: PLAY [install httpd and start services] *******************...
Empiricism asked 31/3, 2022 at 14:19

3

Using the ec2.py inventory script to query against my EC2 instances. I keep getting the following warning signs. How can i suppress them by fixing what's causing the issue? [WARNING]: Found both g...
Martinsen asked 30/5, 2017 at 16:6

6

Solved

I am running myserver in ubuntu: + sudo cat /etc/os-release NAME="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.6 LTS" VERSION_ID="16.04" HOME_URL...
Heterologous asked 18/12, 2019 at 2:36

3

I am looking to run the same task on multiple inventory groups, for eg: [big_group] greenhat localhost redhat linux [small_group] localhost [redhat_group] redhat From my playbook I need to run a...
Bonheur asked 11/5, 2020 at 5:43

5

Solved

As the topic says, my question is if its possible to add tags to the hosts described inside the inventory? My goal is to be able to run the ansible-playbook on specific host/group of hosts which ...
Auntie asked 31/12, 2018 at 14:59

1

Solved

Can someone please assist how to fix this issue, why i am getting this error while running the Ansible playbook 2023-03-31 11:47:39,902 p=57332 u=NI40153964 n=ansible | An exception occurred durin...
Hagerman asked 31/3, 2023 at 6:27

2

Solved

Consider if I want to check something quickly. Something that doesn't really need connecting to a host (to check how ansible itself works, like, including of handlers or something). Or localhost wi...
Lyndes asked 4/7, 2016 at 14:55

4

Solved

I hava an inventory file in INI format: for example: [db] 8.8.8.8 ansible_user=root ansible_ssh_private_key_file=/keys/root-id_rsa.pem .... I'm looking for a way to automatically load my invent...
Eighteen asked 7/11, 2017 at 13:46

8

Solved

I would like to provision with my three nodes from the last one by using Ansible. My host machine is Windows 10. My Vagrantfile looks like: Vagrant.configure("2") do |config| (1..3).each do |i...
Continuous asked 25/2, 2017 at 22:40

2

Solved

Here is inventory file. [abc] host1 host2 [123] host3 And main.yml #play1 - hosts: abc roles: - { role: abc } tasks: ... #play2 - hosts: 123 roles: - { role: 123 } tasks: debug: msg...

2

Solved

I am trying to get started using Ansible and the aws_ec2 plugin. I have the following in my ./ansible.cfg file: [inventory] enable_plugins = aws_ec2 and the following in my ./inventory.yml file...
Aboral asked 6/2, 2019 at 22:16

5

I am running Ansible Tower v3.4.1 with Ansible v2.7.6 on an ubuntu 16.04 VM running on VirtualBox. I run a playbook that works when I run it from the command line using "ansible-playbook" but fails...
Garrik asked 11/2, 2019 at 23:28

2

Solved

For a backup I need to iterate over all hosts in my inventory file to be sure that the backup destination exists. My structure looks like /var/backups/ example.com/ sub.example.com/ So I need ...
Lonnylonslesaunier asked 29/12, 2013 at 18:39

1

Solved

Right now my inventory file looks like this: (using password-based authentication) [testvm] 104.231.213.32 ansible_user=worker ansible_password=Worker@12345 52.176.22.203 ansible_user=worker2 ansib...

3

How can I declare global variable within Ansible playbook. I have searched in google and found the below solution, but its not working as expected. - hosts: all vars: prod-servers: - x.x.x.x -...
Retrace asked 20/11, 2017 at 13:4

5

Solved

I want to write a bootstrapper playbook for new machines in Ansible which will reconfigure the network settings. At the time of the first execution target machines will have DHCP-assigned address. ...
Pierre asked 14/10, 2015 at 7:23

7

Question: This scenario is used to explain the usage of modules in Ansible. For this you have to stop and start a service named ssh. Tasks to be done:- Write a task in main.yml file present in fre...
Frink asked 19/6, 2020 at 9:51

2

Solved

In Ansible, there are several places where variables can be defined: in the inventory, in a playbook, in variable files, etc. Can anyone explain the following observations that I have made? When ...
Disconcerted asked 18/12, 2017 at 22:38

4

Solved

Has someone figured out the minimum IAM policies required to run the EC2 dynamic inventory script (ec2.py) on ansible via an IAM role? So far, I haven't seen a concrete reference in this matter ot...
Yep asked 29/5, 2015 at 0:57

7

Solved

I'm using Ansible to setup EC2 instances and deploy an application. There's a hosts script which gathers tags related servers and groups info. I'd like to run these actions as a single playbook, so...
Afflictive asked 12/3, 2015 at 6:45

3

I am trying to use the following json file as input to ansible host inventory but I get error when I run the playbook. JSON File: { "instances":{ "host": 10.66.70.33 } } Playbook: hosts: "...
Vacant asked 8/2, 2018 at 8:2

4

I have a set of hosts named vm2-prod through vm14-prod. These are grouped in the Ansible hosts inventory as vmware_hosts. I want to exclude a subset of hosts like this: - name: testing play hosts:...
Misti asked 3/12, 2020 at 15:35

1

Solved

I'm looking for a way to specify multiple default groups as hosts in an Ansible playbook. I've been using this method: - name: Do things on hosts hosts: "{{ specific_hosts | default('developm...
Maxilliped asked 14/12, 2020 at 19:3

© 2022 - 2024 — McMap. All rights reserved.