Most viewed questions in Ansible

0 votes
1 answer

How to pull a docker image using Ansible playbook?

Did you try using this? https://docs.ansible.com/ansible/latest/colle ...READ MORE

Nov 5, 2020 in Ansible by undermink
10,109 views
0 votes
1 answer

How to run a playbook from a specific task in Ansible?

Hi@akhtar, The --start-at-task option allows you to start ...READ MORE

Sep 15, 2020 in Ansible by MD
• 95,440 points
10,005 views
0 votes
1 answer

How to run a cron job using Ansible Playbook?

Hi@akhtar, You can use a module named Cron ...READ MORE

Sep 29, 2020 in Ansible by MD
• 95,440 points
9,804 views
0 votes
1 answer

Merge/Append two files into single file and ensure no duplicate entries are found using Ansible

Hi@Jp, You need to create your own customized ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,440 points
9,433 views
0 votes
1 answer

Ansible playbook for moving files from one node to another remote node

The best way to do this is: copy ...READ MORE

Jan 16, 2019 in Ansible by Nigya

edited Jan 18, 2019 by Vardhan 9,295 views
0 votes
1 answer

How to remove a role from Ansible Galaxy?

Hi@akhtar, You need to log in to your ...READ MORE

Aug 28, 2020 in Ansible by MD
• 95,440 points
9,221 views
+1 vote
1 answer

Ansible-playbook to install and configure Nginx+Nodejs+Npm+PM2

Try thhis out: --- - hosts: hosts tasks: ...READ MORE

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

"module_stderr": "/bin/sh: 1: /usr/bin/python: not found\n", MODULE FAILURE\nSee stdout/stderr for the exact error",

Hi@akhtar, This is because your system does not ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,440 points
8,836 views
+1 vote
1 answer

How download artifactory(.tar.gz file) from jfrog artifactory using ansible playbook in linux servers?

Hey @Anil, download the artifactory(.tar.gz) file and ...READ MORE

Aug 13, 2019 in Ansible by Kamal
8,404 views
0 votes
1 answer

How to make a file executable with Ansible?

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

Sep 16, 2020 in Ansible by MD
• 95,440 points
8,275 views
0 votes
1 answer

How do I access environment variables in Ansible?

Yes @Nagray, you're right! You can access ...READ MORE

Jan 24, 2019 in Ansible by Tessie
8,138 views
0 votes
1 answer

Install Ansible using cygwin

Follow these steps to install ansible using ...READ MORE

Jan 10, 2019 in Ansible by Kush
8,090 views
0 votes
1 answer

"msg": "Failed to connect to the host via ssh: ssh: connect to host 192.168.0.179 port 22: Connection timed out",

Hi@akhtar, I think there is a problem with ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,440 points
7,870 views
0 votes
1 answer
0 votes
2 answers

Check is a package exists - Ansible

Hey There, @here is an example for your ...READ MORE

May 6, 2020 in Ansible by Rajat
• 160 points
7,643 views
0 votes
1 answer

No match for argument: sshpass Error: Unable to find a match

Hi@akhtar, The sshpass software is not part of ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,440 points
7,635 views
0 votes
2 answers

How to create MySQL tables using Ansible?

--- - hosts: dbserver   tasks:    - name: create a table ...READ MORE

Mar 19, 2019 in Ansible by Ankit Tyagi
7,489 views
0 votes
1 answer

Getting error when using Ansible playbook. error message: “msg”: “boto required for this module”

Hey @Vardhan, you're missing out on the ...READ MORE

Mar 29, 2019 in Ansible by Himanshu
7,403 views
0 votes
1 answer

What is the difference between the host file and an inventory file in ansible?

Actually both are same. hosts file is ...READ MORE

Feb 12, 2019 in Ansible by Amith
• 140 points
7,310 views
0 votes
1 answer

How to disable swap in remote system using Ansible?

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

Sep 16, 2020 in Ansible by MD
• 95,440 points
6,983 views
0 votes
1 answer

Ansible task to determine if a path exists and is a symlink

Hi @neha, you can write your task ...READ MORE

Apr 2, 2019 in Ansible by Alok
6,941 views
0 votes
1 answer

Ansible task to download a file from an S3 bucket

Hey @Roshan, ansible provides wiht AWS module ...READ MORE

Aug 1, 2019 in Ansible by Varsha
6,881 views
0 votes
2 answers

Create k8s namespace using ansible

You can also create a kubernetes namespace ...READ MORE

Jun 11, 2019 in Ansible by Nasser

edited Jun 11, 2019 6,814 views
+1 vote
1 answer

Ansible Playbook cannot locate the role

Use requirements.yml file and running it with: ansible-galaxy install -r ...READ MORE

Mar 13, 2019 in Ansible by krishti
6,619 views
0 votes
1 answer

Error saying ""msg": "Failed to import docker-py - No module named 'requests.packages.urllib3'. Try `pip install docker-py`""

Hey @Hari, In addition to docker-py install the following ...READ MORE

Feb 9, 2019 in Ansible by Monish
6,593 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

Jul 9, 2018 in Ansible by Atul
• 10,240 points
6,579 views
+1 vote
1 answer
0 votes
1 answer

Run multiple lineinfile commands with with_items

Here is the example playbook to ensure ...READ MORE

Jul 10, 2018 in Ansible by Kalgi
• 2,680 points
6,553 views
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

Apr 11, 2018 in Ansible by shubham
• 7,340 points
6,534 views
0 votes
1 answer

How to list down all the roles in Ansible?

Hi@akhtar, Ansible role is a part of ansible-galaxy. ...READ MORE

Aug 20, 2020 in Ansible by MD
• 95,440 points
6,430 views
0 votes
1 answer

Ansible error: ERROR! Variables must be specified as a dictionary, or a list of dictionaries

the correct syntax for the var file ...READ MORE

Jun 2, 2020 in Ansible by yehuda
6,409 views
0 votes
1 answer

What are the SCM tools supported by jenkins?

Hey @Jugnu, below are Source code management ...READ MORE

Feb 13, 2019 in Ansible by Imran
6,356 views
0 votes
2 answers

Ansible task to list all pods from any k8s namespace

Here is a more complete answer for ...READ MORE

Feb 6, 2020 in Ansible by scatat
6,349 views
0 votes
1 answer

ansible playbook to start and stop a WebSphere application

The below playbook should be good enough: - ...READ MORE

Oct 30, 2019 in Ansible by Tanya
6,333 views
0 votes
1 answer

Error saying "conflicting action statements: user, uri"

YAML files are very sensitive about the ...READ MORE

Jan 9, 2019 in Ansible by krishti
6,323 views
0 votes
1 answer

Ansible: setting profile source in ansible.config

Try and add path in .bashrc or ...READ MORE

Jul 10, 2018 in Ansible by ajs3033
• 7,300 points
6,054 views
0 votes
1 answer

Error while using ansible vault "ERROR! input is not vault encrypted data for vars/vars-mysql-config.yml"

Hey @Bhupan, I think your file is ...READ MORE

Jan 29, 2019 in Ansible by Kavya
5,999 views
0 votes
1 answer

How to set vault password on ansible tower?

On Ansible Tower, go to Settings > ...READ MORE

Jan 29, 2019 in Ansible by Yesha
5,816 views
0 votes
1 answer

How do I get a list of all Ansible variables?

Ansible by default gathers facts about machines ...READ MORE

Jan 31, 2019 in Ansible by Mahir
5,654 views
0 votes
1 answer

Execute ansible playbook on a docker container

Hey @Ram, you could use a dockerfile ...READ MORE

Jan 22, 2019 in Ansible by Vedant
5,639 views
0 votes
1 answer

How to send mail using Ansible-Playbook?

Hi@akhtar, You can find one module in Ansible ...READ MORE

Aug 11, 2020 in Ansible by MD
• 95,440 points
5,582 views
0 votes
1 answer

Installing nodejs using ansible

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

Mar 15, 2019 in Ansible by Hari
5,546 views
0 votes
1 answer

Create directories and download files in Ansible using Ansible playbook

Hey @Yash,  you could either use file module ...READ MORE

Jan 24, 2019 in Ansible by Cerdin
5,446 views
0 votes
1 answer

How to find the memory of remote systems using the setup module in Ansible?

Hi@akhtar, You need to use the setup module to ...READ MORE

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

Reset ansible vault password

Should you wish to change your password ...READ MORE

Feb 11, 2019 in Ansible by Zonasha
5,356 views
0 votes
1 answer

How to give a task name in Ansible?

Hi@akhtar, You can give the task name in ...READ MORE

Aug 2, 2020 in Ansible by MD
• 95,440 points
5,326 views
0 votes
3 answers

Error saying "ERROR: problem running ansible_hosts --list ([Errno 8] Exec format error)" while running ansible playbook

Also, remove the execute permission for the ansible ...READ MORE

Feb 4, 2019 in Ansible by Pam
5,323 views
0 votes
1 answer

How to specify sudo password for Ansible?

Hi@akhtar, You can pass variable on the command ...READ MORE

Sep 28, 2020 in Ansible by MD
• 95,440 points
5,257 views
0 votes
2 answers

How do i install Ansible using virtualenv

Adding to @Mohit's answer,  For CentOS and RHEL: sudo ...READ MORE

Jan 10, 2019 in Ansible by Dikinson
5,224 views