Skip to main content

Questions tagged [ansible]

Ansible is an IT automation tool. Use this tag for questions regarding the Ansible IT automation tools.

3 votes
2 answers
33k views

Ansible error “ Could not find or access on Ansible Controller”

I am trying to write an ansible playbook to send certificates to my client machines from my local machine. The error message I get is: msg": "Could not find or access '/etc/icinga2/pki/...
0 votes
1 answer
1k views

Why do tabs in YAML work some but not at all times?

We've used tab-characters in some of YAML-files here: host: "foo" port: 8011 p: "bar" For some reason, the same version of Ansible running the same playbook works just fine with these files ...
0 votes
0 answers
527 views

Vagrant ansible provisioning not working

I have a vagrantfile and am trying to instantiate a final provisioner of type ansible where I intend to do the bulk of the work configuring the vm. The Vagrantfile works fine without the ansible ...
1 vote
1 answer
1k views

Ansible Json Query

I got an dictionary output as below from one of the Ansible Task " msg": { "vSwitch0": { "failback": true, "failover_active": [ ...
2 votes
0 answers
5k views

Ansible automatic ssh authentication using passphrase protected private key

I can't seem to get ansible to automatically pick up the SSH identity that I've added, and if I am prompted for the passphrase on my private key my passphrase seems to not be accepted, while the same ...
2 votes
0 answers
436 views

Vagrant - Ansible - Install PostgreSQL and Postgis

I'm trying to install PostgreSQL and Postgis with Ansible on a Vagrant VM. The VM is only use locally for local development, so that's why I grant access to databases. But I'm reaching some issues to ...
9 votes
5 answers
27k views

ansible: silently skip unreachable hosts

We use ansible to configure some hosts, including IP configuration. We do not want to use a DHCP server. Sometimes we add new hosts to the network. Those new hosts are in one ip address range and the ...
0 votes
2 answers
12k views

I want to search for string in a file using ansible

- name: extract a word ansible.builtin.lineinfile: path: /file/to/path/file.log regexp: '^nodeagent stopped: (.*)' line: '...
1 vote
1 answer
3k views

Ansible hosts not working using specified inventory

I have two files inventory.yaml: servers: hosts: nas: ansible_host: 10.10.10.27 router: ansible_host: 10.10.10.1 and playbook.yaml - name: pylonl playbook hosts: all tasks: ...
0 votes
2 answers
1k views

Upgrade mongodb replicaset docker container using ansible

Trying to update mongodb in my docker container from 3.6 to 4.2 using ansible, but docker container keeps restarting. The reason it restarting is because the compatibility level is set to 3.6. More ...
0 votes
1 answer
4k views

to hide password from the output

I'm passing the password to my sudo in ansible playbook like: echo <password> | sudo -S su - <username> It's working fine. But the problem here is in my output the password is visible. ...
0 votes
1 answer
548 views

How could I do a list from an AWS account listing all running instances?

I'm using AWSCLI at Windows 10 Professional with GitBash. I need to have a list of all running AWS instances by account. Will start doing in an account to make a list to populate the public keys from ...
1 vote
0 answers
45 views

configure subnet based on LLDP neighbour

I am looking for some help to configure subnets between the routers please refer to the diagram1 Diagram: Router Identification comes from the host variable file eg. ansible_host: 10.10.10.1 ID: 1 ...
2 votes
1 answer
5k views

Does ansible gather facts about local host OS (not a remote one)

I am writing the role which includes some tasks to be executed on local machine using dedicate_to: localhost statements. When gathering facts, ansible registers some variables about the remote host (...
1 vote
0 answers
106 views

Implementing the right conditions for a yum command for centos5 in Ansible

I'm currently working with a centos5 host and I have to install some packages with yum.. unfortunately, as far as I know, centos5 doesn't support Ansible's yum module so I have to use the 'command' or ...

15 30 50 per page
1 2 3
4
5
18