Latest questions in Ansible

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,791 views
0 votes
1 answer

ERROR! The API server (https://galaxy.ansible.com/api/) is not responding, please try again later.

Hi@akhtar, It seems your ansible is connecting to the ...READ MORE

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

How to assemble files from a directory?

Hi@akhtar, Ansible has the assemble module. This module can ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,440 points
1,302 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,440 points
10,442 views
0 votes
1 answer

How to switch a user per task or set of tasks?

Hi@akhtar, Ansible has a concept of privilege escalation. ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,440 points
2,365 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,440 points
19,392 views
0 votes
1 answer

How to remove old file using Ansible?

Hi@akhtar, You can remove your files using Ansible. ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,440 points
3,090 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,370 views
0 votes
1 answer

How to install mongodb on centos 7 using ansible

Hi@Shashi, I think for MongoDB you need to ...READ MORE

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

How to run an Ansible Playbook to a particular node?

Hi@akhtar, You can control the playbook from the ...READ MORE

Sep 16, 2020 in Ansible by MD
• 95,440 points
2,138 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,916 views
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,440 points
10,313 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,195 views
0 votes
1 answer

FAILED! => {"changed": false, "msg": "state is mounted but all of the following are missing: fstype"}

Hi@akhtar, You need to pass some more arguments ...READ MORE

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

How to mount a dvd in a folder using Ansible playbook?

Hi@akhtar, Ansible has the mount module that is idempotent ...READ MORE

Sep 16, 2020 in Ansible by MD
• 95,440 points
2,148 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,440 points
25,046 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,912 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,440 points
12,110 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,440 points
13,656 views
0 votes
1 answer

How to validate the sudoers file before changing the file in Ansible?

Hi@akhtar, You can do this using lineinfile module ...READ MORE

Sep 2, 2020 in Ansible by MD
• 95,440 points
3,921 views
0 votes
1 answer

How to replace a line using lineinfile module in Ansible?

Hi@MD, You can use lineinfile module in Ansible. ...READ MORE

Sep 2, 2020 in Ansible by akhtar
• 38,230 points
2,477 views
0 votes
1 answer

Importance of lineinfile module in Ansible.

Hi@akhtar, The lineinfile module will search a file ...READ MORE

Sep 2, 2020 in Ansible by MD
• 95,440 points
579 views
0 votes
1 answer

How to add several lines in a file using lineinfile module?

Hi@akhtar, When we need to perform a task ...READ MORE

Sep 2, 2020 in Ansible by MD
• 95,440 points
589 views
0 votes
1 answer

How to create a firewall rule using Ansible Playbook?

Hi@akhtar, Ansible has a module named firewalld to ...READ MORE

Sep 2, 2020 in Ansible by MD
• 95,440 points
3,070 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,440 points
12,412 views
0 votes
1 answer

How to create a group using Ansible Playbook?

Hi@akhtar, You can find one module named group ...READ MORE

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

How to create a user using Ansible Playbook?

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

Sep 1, 2020 in Ansible by MD
• 95,440 points
4,079 views
0 votes
1 answer

How to use loop in Ansible playbook?

Hi@akhtar, Sometimes you want to repeat a task ...READ MORE

Sep 1, 2020 in Ansible by MD
• 95,440 points
938 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,128 views
0 votes
1 answer

How to login to Ansible Galaxy from command line?

Hi@akhtar, To login to Ansible Galaxy, you need ...READ MORE

Aug 28, 2020 in Ansible by MD
• 95,440 points
1,800 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,700 points
1,993 views
0 votes
1 answer

How to download a role from Ansible Galaxy?

Hi@akhtar, In Ansible, the role is the primary ...READ MORE

Aug 28, 2020 in Ansible by MD
• 95,440 points
1,374 views
0 votes
1 answer

How to copy folders using url in windows in ansible?

Hi@akhtar, You can find the win_get_url module. This ...READ MORE

Aug 27, 2020 in Ansible by MD
• 95,440 points
1,704 views
0 votes
1 answer

How to connect docker nodes with ansible master ?

Hi@akhtar, You need a running container first, and ...READ MORE

Aug 27, 2020 in Ansible by MD
• 95,440 points
1,400 views
0 votes
1 answer

ERROR: Inventory script (inventory/ec2.py) had an execution error: ERROR: "Authentication error retrieving ec2 inventory.

Hi@akhtar, You have to generate the AWS credentials ...READ MORE

Aug 21, 2020 in Ansible by MD
• 95,440 points
1,038 views
0 votes
2 answers

How to create a directory in remote nodes using Ansible-Playbook?

You can read install and setup apache ...READ MORE

Aug 23, 2020 in Ansible by anonymous
• 160 points
3,634 views
0 votes
1 answer

How to filter IP address of remote system in Ansible?

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

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

ERROR! the role '/root/web' was not found in /root/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/root

Hi@akhtar, You are trying to use ansible role in your ...READ MORE

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

How to create a role in Ansible?

Hi@akhtar, You can create a role in Ansible ...READ MORE

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

ERROR! - None of the provided paths was usable. Please specify a valid path with --roles-path

Hi@akhtar, You are trying to list down ansible roles ...READ MORE

Aug 20, 2020 in Ansible by MD
• 95,440 points
2,244 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,297 views
0 votes
1 answer

How to use an URL in Ansible Playbook?

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

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

What is Handlers in Ansible?

Hi@akhtar, Handlers are just like normal tasks in an Ansible ...READ MORE

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

How to use conditions in Ansible-Playbook?

Hi@akhtar, Traditional programming language usually uses the if-else ...READ MORE

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

Is it possible to start ec2 Windows machine and run windows command using ansible playbook?

Hi@Lakshminarayanan, Yes, you can do that. But after ...READ MORE

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

How to create VPC in AWS from Ansible controller node?

Hi@akhtar, You can find one module named ec2_vpc ...READ MORE

Aug 13, 2020 in Ansible by MD
• 95,440 points
660 views
0 votes
1 answer

How to create a security group in AWS using Ansible-Playbook?

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

Aug 13, 2020 in Ansible by MD
• 95,440 points
3,411 views
0 votes
1 answer

How to delete a key pair in AWS from Ansible-Playbook?

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

Aug 12, 2020 in Ansible by MD
• 95,440 points
689 views