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,654 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,791 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 5 days ago 92 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
951 views
0 votes
0 answers

How to copy multiple files from multiple source to single destination from windows to centos throgh ansible?

in windows i have 6 folders this ...READ MORE

Oct 17, 2022 in Ansible by chandini

edited 5 days ago 84 views
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 5 days ago 84 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 5 days ago 91 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 5 days ago 86 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 4 days ago 15,850 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,059 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 5 days ago 14 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 5 days ago 6 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,094 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 4 days ago 13,255 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,690 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,368 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,881 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,429 views
0 votes
1 answer

How to change vault password in Ansible?

Afsalvaliyapeediyakal READ MORE

Jul 10, 2021 in Ansible by anonymous

edited 4 days ago 13,760 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,463 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,133 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,526 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,542 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,629 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,338 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,555 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,075 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,855 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,282 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,832 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,090 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,518 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,515 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,105 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,650 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,567 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,016 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,334 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,957 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,679 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,361 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,272 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,564 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,439 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,210 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,003 views