Provide Ansible with sudo passwords

0 votes
How do I provide Ansible with sudo passwords or pre-host passwords?
Jan 10, 2019 in Ansible by Nisha
545 views

1 answer to this question.

0 votes

These are the exact situations where we need to use pass. Using pass, each password is stored inside a gpg encrypted file. 

For example:

If you're trying to use passwords stored as servers/foo for server foo using Ansible, you can use it using pass like this:

servers]
foo ansible_sudo=True \
    ansible_sudo_pass="{{ lookup('pipe', 'pass servers/foo') }}"
answered Jan 10, 2019 by Noor

Related Questions In Ansible

0 votes
2 answers

Issue creating AWS VPC with Ansible

You can use the details given in ...READ MORE

answered Aug 16, 2018 in Ansible by Priyaj
• 58,020 points
1,293 views
0 votes
1 answer

How to use Ansible git module pull a branch with local changes?

You cannot achieve it using the git ...READ MORE

answered Jul 9, 2018 in Ansible by Atul
• 10,240 points
7,109 views
0 votes
1 answer

Ansible iterate over hash with condition

Your when statement is wrong. you either split ...READ MORE

answered Jul 23, 2018 in Ansible by Kalgi
• 52,350 points
1,382 views
0 votes
1 answer

Testing server response with timeout using ansible

Got it working using wait_for and until ...READ MORE

answered Aug 7, 2018 in Ansible by Atul
• 10,240 points
2,876 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,060 views
+2 votes
1 answer
0 votes
1 answer

Why is my output sometimes replaced with ********* ? - Ansible

Any string marked no-log, including passwords, are ...READ MORE

answered Feb 1, 2019 in Ansible by Anisha
1,175 views
0 votes
1 answer

Considerations when dealing with backup and restoration - Ansible

Hey @Ruth, keep these following factors in ...READ MORE

answered Feb 4, 2019 in Ansible by Anushri
844 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP