Trending questions in Ansible

0 votes
1 answer

How to list down all the hosts in Ansible?

Hi@akhtar, You can use the option --list-hosts. It will ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,460 points
48,217 views
0 votes
0 answers

How to extract information about remote linux servers using ansible?

It is important to gather data from ...READ MORE

Dec 15, 2022 in Ansible by Edureka
• 12,690 points
708 views
+1 vote
1 answer

"msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.

Hi@akhtar, You are getting this error because when ...READ MORE

Aug 1, 2020 in Ansible by MD
• 95,460 points
35,637 views
0 votes
1 answer

How to add multiple lines in a file using Ansible playbook?

Hi@akhtar, You can update your file using lineinfile ...READ MORE

Sep 16, 2020 in Ansible by MD
• 95,460 points
26,627 views
0 votes
1 answer

How to turn gathering facts task off in Ansible?

Hi@akhtar, You can use gather_facts: no keyword in your playbook. ...READ MORE

Aug 10, 2020 in Ansible by MD
• 95,460 points
25,545 views
0 votes
1 answer

How to see any module details in Ansible from the command line?

Hi@akhtar, Ansible has a very attractive command named ...READ MORE

Aug 11, 2020 in Ansible by MD
• 95,460 points
23,750 views
0 votes
1 answer

How to move/rename a file using an Ansible task on a remote system?

Hi@akhtar, You can use the command module to ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,460 points
20,507 views
0 votes
0 answers
0 votes
0 answers

How do I execute MySqL query using Ansible playbook

Dear team, I'm trying to execute MySQL , ...READ MORE

Oct 4, 2021 in Ansible by anonymous
• 140 points
3,249 views
0 votes
1 answer

Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6))

Hi@akhtar, You may get this error if the ...READ MORE

Aug 7, 2020 in Ansible by MD
• 95,460 points
18,244 views
0 votes
1 answer

ERROR! Attempting to decrypt but no vault secrets found

Hi@akhtar, As you are using a vault in ...READ MORE

Aug 11, 2020 in Ansible by MD
• 95,460 points
17,886 views
0 votes
1 answer

"msg": "Failed to connect to the host via ssh: root@192.168.0.179: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).",

Hi@akhtar, You need to pass the username and ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,460 points
16,281 views
0 votes
1 answer

"msg": "winrm or requests is not installed: No module named winrm"

Hi@akhtar, You need to install pywinrm module in ...READ MORE

Sep 8, 2020 in Ansible by MD
• 95,460 points
14,220 views
0 votes
1 answer

Error reading config file (/etc/ansible/ansible.cfg): File contains no section headers.

Hi@akhtar, You need to add one tag in ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,460 points
15,405 views
0 votes
1 answer

How to capture the output of a task in Ansible Playbook?

Hi@akhtar, Ansible registers module used to capture/store the ...READ MORE

Aug 2, 2020 in Ansible by MD
• 95,460 points
15,046 views
0 votes
2 answers

ERROR! Unexpected Exception, this is probably a bug: HTTP Error 400: Bad Request

When you get the 400 number, that ...READ MORE

Feb 9, 2022 in Ansible by Soham
• 9,710 points
2,355 views
0 votes
1 answer

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

Hi@akhtar, Ansible is not part of your RedHat ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,460 points
15,113 views
0 votes
1 answer

How to check the syntax of an Ansible playbook?

Hi@akhtar, Ansible has lots of commands, that help ...READ MORE

Sep 15, 2020 in Ansible by MD
• 95,460 points
12,794 views
0 votes
1 answer

How to overwrite the content of a file in remote systems using Ansible playbook?

Hi@akhtar, You can find one argument in the ...READ MORE

Aug 2, 2020 in Ansible by MD
• 95,460 points
14,398 views
0 votes
1 answer

"The task includes an option with an undefined variable. The error was: 'item' is undefined\n\nThe error appears to be in '/root/haproxy/user.yml':

Hi@akhtar, You can perform iterate tasks in Ansible ...READ MORE

Sep 1, 2020 in Ansible by MD
• 95,460 points
13,009 views
0 votes
1 answer

How to compare two files using Ansible?

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

Sep 17, 2020 in Ansible by MD
• 95,460 points
11,427 views
0 votes
1 answer

How to skip execution of a task in ansible playbook ??

Define tags...  Then while running playbook use --skip-tags. READ MORE

Sep 30, 2020 in Ansible by Adil
10,824 views
0 votes
1 answer

How to change vault password in Ansible?

Hi@akhtar, You can use rekey keyword in your ...READ MORE

Aug 11, 2020 in Ansible by MD
• 95,460 points
12,919 views
0 votes
1 answer
0 votes
1 answer

How to copy multiple files to remote system using Ansible Playbook?

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

Sep 16, 2020 in Ansible by MD
• 95,460 points
11,238 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,460 points
11,163 views
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,861 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,460 points
10,391 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,460 points
10,167 views
+1 vote
2 answers

[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

Hey @Sitara,   I just found it is because ...READ MORE

Jan 22, 2019 in Ansible by Naina
22,861 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,460 points
10,420 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,460 points
9,411 views
0 votes
1 answer

FAILED! => { "msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"

Hi@akhtar, Ansible needs extra software to run commands ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,460 points
11,576 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,460 points
9,100 views
0 votes
1 answer

bash: ansible: command not found. Failed to search for file: Cannot update read-only repo

Hi@akhtar, By default, Ansible is not part of ...READ MORE

Jul 28, 2020 in Ansible by MD
• 95,460 points
10,951 views
0 votes
1 answer

How to copy directory and sub dirs's and files from source to remote using ansible playbook

Hey @Nishant, you can use the copy ...READ MORE

Apr 3, 2019 in Ansible by Kalgi
• 52,350 points
31,119 views
0 votes
1 answer

##[error]Command failed with errors on Ansible machine

Hi@Vicky, By default, if one task fails, then ...READ MORE

Dec 17, 2020 in Ansible by MD
• 95,460 points
4,145 views
+1 vote
1 answer

Ansible to rename a file if it exists

Hi@Jp, What output you are getting? Your playbook ...READ MORE

Dec 14, 2020 in Ansible by MD
• 95,460 points
4,021 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,460 points
4,361 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,460 points
7,658 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,460 points
8,017 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,460 points
8,525 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,460 points
5,757 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,460 points
8,298 views
0 votes
1 answer

Can we use Ansible and Rundeck together, or using either one is enough?

Hi@akhtar, It depends on your requirement. According to ...READ MORE

Dec 16, 2020 in Ansible by MD
• 95,460 points
1,757 views
0 votes
1 answer

How to create an S3 bucket using Ansible Playbook?

Hi@akhtar, Ansible has a module that can create ...READ MORE

Dec 4, 2020 in Ansible by MD
• 95,460 points
2,252 views
0 votes
1 answer

I could install Git, can u please explain how to set up chromedriver(selenium), chromium browser(selenium) on the slave node through Ansible

Hi@Vinodkumar, Did you go through the related question ...READ MORE

Dec 22, 2020 in Ansible by MD
• 95,460 points
1,303 views
0 votes
1 answer

How to create an ec2 snapshot using Ansible Playbook?

Hi@akhtar, You can create an EC2 snapshot from an existing ...READ MORE

Dec 4, 2020 in Ansible by MD
• 95,460 points
1,719 views