Most viewed questions in Ansible

0 votes
1 answer

When conditional not working in Ansible

Your identation is wrong and when is ...READ MORE

Apr 27, 2018 in Ansible by ajs3033
• 7,300 points
5,176 views
0 votes
1 answer

Execute shell commands using Ansible

You can use a playbook for this ...READ MORE

Jan 24, 2019 in Ansible by Ayaan
5,141 views
0 votes
1 answer

Pass sudo password while executing Ansible playbook

Hey @Bob, try something like this: ansible-playbook playbook.yml ...READ MORE

Jul 22, 2019 in Ansible by Akash
5,128 views
0 votes
1 answer

How to regex replace nested values in Ansible

I'm not aware of any built-in method ...READ MORE

Jun 17, 2018 in Ansible by shubham
• 7,340 points
5,126 views
0 votes
1 answer

Print multiple env variables using ansible playbook

Hey @Tom, you can use the lookup ...READ MORE

Jan 24, 2019 in Ansible by Rick
5,124 views
0 votes
1 answer

Execute a command using ansible playbook

Hey @Reshma, You can use the URI ...READ MORE

Jan 17, 2019 in Ansible by Sameer
5,039 views
0 votes
1 answer

Errors when executing - ansible -m ping all - kubespray

Hey @Ananya, make sure of these following ...READ MORE

Jan 24, 2019 in Ansible by Yesha
4,870 views
0 votes
1 answer

how can we unarchive multiple different files using ansible-playbook? i tried this yml file its getting error

RAR file is used to store other ...READ MORE

Oct 9, 2020 in Ansible by jack miller
4,851 views
0 votes
1 answer

Can we run parallel jobs in Ansible

Running parallel tasks in Ansible is not ...READ MORE

Aug 5, 2019 in Ansible by Kalgi
• 52,360 points
4,694 views
0 votes
1 answer
0 votes
1 answer

Is it possible to run a playbook with a crontab?

Ofcourse you can run ansible playbook with ...READ MORE

Jan 17, 2019 in Ansible by Yesha
4,570 views
0 votes
1 answer

Remote host throwing error saying "Permission Denied" - Ansible

Hey @Patrick, Change the path of Ansible's remote_tmp ...READ MORE

Jan 16, 2019 in Ansible by Cerci
4,543 views
0 votes
1 answer

Error saying "Timeout (12s) waiting for privilege escalation prompt: or Connection to 127.0.0.1 closed.\r\n"

Hey @Sinha, add these parameters in your ...READ MORE

Feb 9, 2019 in Ansible by Monish
4,533 views
0 votes
1 answer

How to increase aws ebs volume using ansible ?

Hey, I am unaware of any specific ...READ MORE

Sep 9, 2019 in Ansible by Kalgi
• 52,360 points
4,502 views
0 votes
1 answer

How to remove duplicate entries from a file using Ansible?

Hi@akhtar, You can use the shell module to do your ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,440 points
4,428 views
0 votes
2 answers

Error saying "Extraneous options or arguments" when trying to run an ansible playbook

ERROR! Extraneous options or arguments READ MORE

May 30, 2019 in Ansible by anonymous
4,351 views
0 votes
1 answer

Ansible Error "ERROR! 'vars_files' is not a valid attribute for a PlaybookInclude"

vars_files is not supported for included playbooks ...READ MORE

Jun 3, 2019 in Ansible by Tara
4,292 views
0 votes
1 answer

Error saying "One or more undefined variables: 'ansible_facts' is undefined"

The command you've executed basically means run ...READ MORE

Jan 17, 2019 in Ansible by Karen
4,222 views
0 votes
1 answer

copy multiple files to multiple systems - Ansible

You can use /usr/bin/ansible command line. Ansible can SCP ...READ MORE

Mar 6, 2019 in Ansible by Yogesh
4,197 views
0 votes
1 answer

How to remove cron using Ansible

Hey @Likhit, You could use something like ...READ MORE

Jan 29, 2019 in Ansible by Kavya
4,177 views
0 votes
1 answer

Error saying "ImportError: No module named ansible.playbook" when installing ansible on aws

Hey @Niana, I don't think you have ...READ MORE

Feb 4, 2019 in Ansible by Anushri

edited Feb 6, 2019 4,155 views
0 votes
1 answer

Syntax error while using block in ansible role

block should be on the same indentation level ...READ MORE

Mar 13, 2019 in Ansible by Kim
4,117 views
0 votes
1 answer

How to use get_url on windows - Ansible

Hey @Biji, you could use the win_get_url ...READ MORE

Jan 24, 2019 in Ansible by Olly
4,117 views
0 votes
1 answer
0 votes
1 answer

How to create a user using Ansible Playbook?

Hi@akhtar, You can use the user module in ...READ MORE

Sep 1, 2020 in Ansible by MD
• 95,440 points
4,071 views
0 votes
1 answer

How to create a docker container using Ansible playbook?

Hi@akhtar, You can use the docker_container module in ...READ MORE

Aug 8, 2020 in Ansible by MD
• 95,440 points
4,049 views
0 votes
1 answer

Using multiple config files using same template in a role in ansible

Go through this include_role module: tasks: - ...READ MORE

Jun 5, 2018 in Ansible by DareDev
• 6,890 points
4,004 views
0 votes
1 answer

How to install python package using Ansible playbook?

Hi@akhtar, Ansible has a pip module to install ...READ MORE

Dec 2, 2020 in Ansible by MD
• 95,440 points
3,965 views
0 votes
1 answer

Can I use something like if statement to check for conditions in my playbook?

Hey @Kashish, you could use something like ...READ MORE

Feb 11, 2019 in Ansible by Kyra
3,942 views
0 votes
1 answer

How to validate the sudoers file before changing the file in Ansible?

Hi@akhtar, You can do this using lineinfile module ...READ MORE

Sep 2, 2020 in Ansible by MD
• 95,440 points
3,914 views
0 votes
1 answer

Ansible task to copy file to S3 bucket

Hey @Adarsh, try this task definition: --- - hosts: ...READ MORE

Aug 1, 2019 in Ansible by Vish
3,907 views
0 votes
1 answer

Get ansible commands return value

Hey @Hina, you can add the following ...READ MORE

Feb 4, 2019 in Ansible by Diana
3,902 views
0 votes
1 answer

Ansible playbook to copy database dump file to remote host and restore it to another database

Hey @Pavan, you can use the following ...READ MORE

Aug 8, 2019 in Ansible by Kalgi
• 52,360 points
3,876 views
0 votes
1 answer

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

Jan 24, 2019 in Ansible by Anushri
3,862 views
0 votes
1 answer

How do I disable cowsay?

You can uninstall cowsay by setting nocows=1 in ansible.cfg, or ...READ MORE

Jan 31, 2019 in Ansible by Mahir
3,835 views
0 votes
1 answer

Ansible playbbok to copy files from one node to another remote node

You can create a playbook for copying ...READ MORE

Jan 16, 2019 in Ansible by Danica
3,819 views
0 votes
1 answer

Error message “Failed to connect to the host via ssh” while running ping command on host machines through Ansible

Just go through the error message: Ansible can't ...READ MORE

Apr 25, 2018 in Ansible by shubham
• 7,340 points
3,768 views
0 votes
1 answer

How to configure fact caching in Ansible?

There are two cache plugins: redis and jsonfile. To ...READ MORE

Jan 24, 2019 in Ansible by Kennedy
3,751 views
0 votes
1 answer

Installing mongodb using ansible

Your mongodb role should look something like this: - ...READ MORE

Mar 15, 2019 in Ansible by Purva
3,746 views
0 votes
1 answer

How to launch MySQL docker container using Ansible playbook?

Hi@akhtar, You can use docker_container module in your ...READ MORE

Sep 21, 2020 in Ansible by MD
• 95,440 points
3,724 views
0 votes
1 answer

Permission denied while running the playbook

Hey @Hari, try executing your playbook using ...READ MORE

Feb 9, 2019 in Ansible by Monish
3,711 views
0 votes
1 answer

fatal: [localhost]: FAILED! => {"changed": false, "msg": "boto required for this module"}

Hi@akhtar, As ansible use the python library in ...READ MORE

Aug 12, 2020 in Ansible by MD
• 95,440 points
3,695 views
0 votes
1 answer

How to ignore ansible SSH authenticity checking?

Hi@akhtar, To avoid this you need to set ...READ MORE

Aug 10, 2020 in Ansible by MD
• 95,440 points
3,694 views
0 votes
1 answer

How to create a directory using Ansible?

Hi@akhtar, You can use the file module. To ...READ MORE

Aug 10, 2020 in Ansible by MD
• 95,440 points
3,691 views
0 votes
1 answer

How to remove yum repository using Ansible playbook?

Hi@akhtar, You can use the yum_repository module in ...READ MORE

Aug 4, 2020 in Ansible by MD
• 95,440 points
3,668 views
0 votes
0 answers

How to create AMI from running instance using ansible?

Hi, I need to take AMI(amazon machine ...READ MORE

Sep 9, 2019 in Ansible by Lakshminarayanan
• 1,370 points

edited Sep 9, 2019 by Lakshminarayanan 3,658 views
0 votes
1 answer

Permission denied when running ansible playbook through jenkins

Jenkins uses it's own user to execute ...READ MORE

Jun 25, 2018 in Ansible by DareDev
• 6,890 points
3,657 views
0 votes
2 answers

How to create a directory in remote nodes using Ansible-Playbook?

You can read install and setup apache ...READ MORE

Aug 23, 2020 in Ansible by anonymous
• 160 points
3,620 views
0 votes
1 answer

How do I update CentOS using Ansible?

You can use the yum module in the ...READ MORE

Feb 4, 2019 in Ansible by Diana
3,618 views