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,049 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
9,926 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,739 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,377 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,274 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,144 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,035 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,798 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,377 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,206 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,111 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,053 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,830 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,601 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,582 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,453 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,380 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,255 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,928 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,889 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,854 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,746 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,594 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,575 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,558 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,518 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,515 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,362 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,320 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,315 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,304 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,291 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,286 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,022 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,966 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,780 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,628 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,621 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,553 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,526 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,416 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,380 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,333 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,278 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,273 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,212 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,206 views