Questions tagged [ansible-inventory]

Use this tag if a question is about ansible-inventory

Filter by
Sorted by
Tagged with
1
vote
2answers
607 views

Custom inventory file failing to parse properly

I've got the following production inventory file (playbooks/production.yaml) for Ansible: all: children: control: moriarty.server.com toby.server.com managed: sherlock....
1
vote
1answer
26 views

Ansible: Backing up variable value doesn't work as expected

Attempting to save a variable's value for backup before modifying it doesn't work. I have the following inventory file (note the custom ansible_port and user): all: hosts: test: ...
0
votes
0answers
35 views

How to use the consul_io.py dynamic inventory script for grouping and for proper labelling in prometheus?

I've configured service-discovery in Consul for on-premiss servers in the company I work for and I'm using consul_io.py as a dynamic inventory script for Ansible. When I run the script, I get the ...
1
vote
0answers
55 views

Per machine credentials for privileges escalation using AWX [duplicate]

I have an inventory with a lot of hosts in it using the same credentials, but one host needs a different approach. For the ssh connection a different user is used, after the connection is established, ...
0
votes
1answer
509 views

Ansible - stop when host is success, exit with IP

Basically, my use case is that I want to run on list of hosts (group from inventory). It will run one by one, until it finds machine answer my standards, when it find the one with free RAM as I say e....
2
votes
1answer
453 views

Unable to run playbooks using Ansible best practices layout

I am very new to ansible and I think I am lacking something basic that I am not finding in the examples or on github as to the directory structure and its use. I have set up my directory structure ...
1
vote
2answers
229 views

Ansible authorized copy from remote source to remote destination

How to use ansible authorized_key to authorize a ServerA (not the controller machine) to access Server B. Scenario: Need a playbook to execute from a ansible controller that should append id_rsa.pub ...
1
vote
1answer
94 views

Can I check whether ansible is on last batch of rolling update (serial: 25%)?

I'm using Ansible to update a pool of EC2 servers with a rolling update, in batches of 25%. In between batches, I'm pausing long enough for the server health checks to start to pass again (since they'...
2
votes
1answer
1k views

Ansible YAML inventory - Groups that are allways members of other groups

Situation: I have a group "webservers" where I put all webservers in. As well as a group "mysqlservers" for the database servers respectively. Now I do also manage some LAMP servers and I want them ...
1
vote
1answer
661 views

How to write logs for certain tasks only?

I am using Ansible and created a Playbook for deployment. I defined log_path in ansible.cfg and now tasks output are going to this log file. I want to send only few task's log into this log file. How ...
7
votes
1answer
2k views

How to notate ipv6 addresses in inventory file?

I have a machine, that is accessible via ipv6 only. It is setup for ssh with rsa key. Now I'd like to manage it with ansible. Unfortunately, this is not covered in the inventory documentation. So I ...