Questions tagged [ansible-inventory]
Use this tag if a question is about ansible-inventory
17
questions
0
votes
0answers
12 views
update Ansible files located under host_vars
I am using Dynamic inventory to get the latest Ec2 IP addresses.
I have parameter files under host_vars folder. Each parameter file will have placements for ENI's attached to a particular EC2 machine.
...
0
votes
0answers
141 views
Ansible/AWS dynamic inventory — How to create groups based on tags?
I am trying to create custom groups, based on tags. I am using this doc as a reference: https://docs.ansible.com/ansible/latest/plugins/inventory.html#inventory-plugins
As a baseline, in my aws_ec2....
1
vote
2answers
48 views
Ansible - merging inventories to share variables across?
Is it possible to merge inventories so I can share variables across them? Let's say I have two inventory files. Inventory A and Inventory B. They are both in a directory called inventories.
Variables ...
1
vote
0answers
29 views
Ansible dynamic inventory using AWS plugin — how to obtain internal DNS records or private IP?
Seeking help from those who've worked with dynamic inventory in Ansible.
I have Ansible set up with the aws_ec2 plugin (not using the python script as it's been too problematic). Currently, I'm only ...
0
votes
1answer
1k views
ansible error: skipping: no hosts matched
I've tried a few variations on running ansible locally as a test case:
nicholas $
nicholas $ ls
ansible.cfg ansible.cfg.orig first_playbook.yml inventory.txt playbook.yml
nicholas $
nicholas $ ...
0
votes
2answers
147 views
network ansible command error: “msg”: “network os centos is not supported”
How do I get the ansible config for rolly below?
remote:
[nsaunders@rolly ~]$
[nsaunders@rolly ~]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: ...
3
votes
2answers
46 views
Can we use Ansible for monitoring configuration?
I understand how Ansible works and what it is used for.
However, I was wondering if there is a way or feature (in open-source or enterprise edition) in Ansible using which, we can make sure that the ...
2
votes
2answers
2k 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
27 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:
...
1
vote
0answers
61 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
738 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....
3
votes
1answer
647 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
374 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
155 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
749 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 ...