Top "Ansible-inventory" questions

Use this tag for questions regarding the Ansible inventory defined either as a static file (aka hosts file), or dynamically through external scripts (for example AWS EC2 inventory).

Ansible: compare variables

I am trying to compare some variables so here is my case: pg_master_ip is an ip obviously. ansible …

ansible ansible-2.x ansible-inventory
How to make Ansible playbook run on first host in the group?

How can I run a playbook only on first host in the group? I am expecting something like this: --- …

ansible ansible-inventory
get a particular host name's ip with ansible

I have a host file that looks roughly like this: [kibanamaster] efk host_ip host user passwd [elasticnode] esnode host_…

ansible ansible-2.x ansible-inventory
Ansible - get variables from group_vars and host_vars together into a list

I am trying to get from an inventory group a list of IP addresses instead of host names. These IP …

ansible ansible-2.x ansible-inventory
group_names variable in ansible

I am running some issues when I execute this playbook: - hosts: all connection: local tasks: - template: src=/etc/…

ansible ansible-inventory
ansible output printing unwanted things. how to format and display only specific data's

I am using ansible 2.4 in centos, trying to run the below script in remote servers and getting the output. Here …

ansible ansible-2.x ansible-inventory ansible-facts ansible-template
Ansible: how to call module `add_host` for all hosts of the play

I'm creating a playbook with this play: On hosts hypervisors: retrieve list of virtual machines from all hosts use module …

ansible ansible-inventory
Ansible - start tomcat on host

I've been working on ansible playbook to download and start tomcat in a host. This is my inventory host file: […

ansible ansible-inventory
Using --become for ansible_connection=local

With a personal user account (userx) I run the ansible playbook on all my specified hosts. In ansible.cfg the …

ansible ansible-inventory
Ansible: [WARNING]: Found both group and host with same name

Using the ec2.py inventory script to query against my EC2 instances. I keep getting the following warning signs. How …

ansible ansible-inventory