Trending questions in Ansible

+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
36,800 views
0 votes
1 answer

How do I list all 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
49,993 views
0 votes
0 answers

I want to check package kexec in all server how do i do it

I want to check package kexec in ...READ MORE

Apr 19, 2023 in Ansible by anonymous

edited Mar 5 115 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
991 views
0 votes
0 answers
0 votes
0 answers

unable to deploy ansible playbook onto node servers

Hi all, I am getting below error while ...READ MORE

Oct 16, 2022 in Ansible by Karthik

edited Mar 4 113 views
0 votes
0 answers

I want to copy folder (k-uat) src:/var/www and dest:/var/www with different name

I want to copy a folder (k-uat) ...READ MORE

Sep 23, 2022 in Ansible by Ashok

edited Mar 4 110 views
0 votes
0 answers

Ansible - ssh connection is established between ansible and remote servers, but while running the playbook getting below error

Able to connect ansible and remote servers ...READ MORE

Aug 29, 2022 in Ansible by anonymous

edited Mar 4 97 views
0 votes
1 answer

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

you should add                         ""  [defaults] "" in ...READ MORE

Sep 18, 2022 in Ansible by Rithvik

edited Mar 5 15,933 views
0 votes
1 answer

Install git using Ansible

Installing git using ansible is pretty simple. ...READ MORE

Mar 15, 2019 in Ansible by Haider
24,112 views
0 votes
0 answers

In Ansible playbook after creation of EC2 instance how to get return values like instance id, vpc id in output?

I am creating Ec2 instance using Ansible ...READ MORE

Aug 8, 2022 in Ansible by sivasai

edited Mar 4 50 views
0 votes
0 answers

why with_items is not looping properly in yml , any suggestions

This is the yml file:  - name: Update ...READ MORE

Jun 30, 2022 in Ansible by anonymous

edited Mar 4 27 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
27,160 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
26,825 views
0 votes
1 answer

How do I check uptime on hundreds of servers using Ansible?

ansible <group_name/all/ip_address> -i <name_of_hosts_file/inventory_file> -m command -a ...READ MORE

Jan 20, 2023 in Ansible by Dhiman_Aanchal

edited Mar 5 13,304 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
24,445 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,920 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,457 views
0 votes
1 answer

How to change vault password in Ansible?

Afsalvaliyapeediyakal READ MORE

Jul 10, 2021 in Ansible by anonymous

edited Mar 5 13,865 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,491 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
18,156 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,559 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,575 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,714 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,381 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,588 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
13,119 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,917 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,319 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,877 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
11,114 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,559 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,555 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
11,130 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,669 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,607 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
11,061 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
23,421 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
12,009 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,708 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,384 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
11,321 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,627 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,486 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,242 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
8,056 views