Most answered questions in Ansible

0 votes
1 answer

How to create an Elastic Load Balancer in AWS with Ansible Playbook?

Hi@akhtar, You can find one module in ansible ...READ MORE

Oct 12, 2020 in Ansible by MD
• 95,440 points
920 views
0 votes
1 answer

Error Message: "No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV4Handler'] Check your credentials"

Hi@akhtar, A dynamic inventory script will cache results to ...READ MORE

Oct 12, 2020 in Ansible by MD
• 95,440 points
2,483 views
0 votes
1 answer

Running task from Different roles in parallel

Hi@Shambhavi, You can use tags in your task. ...READ MORE

Oct 7, 2020 in Ansible by MD
• 95,440 points
980 views
0 votes
1 answer

How to update a distribution comment by distribution id using Ansible Playbook?

Hi@akhtar, You can update your distribution with the ...READ MORE

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

How to create a cloudfront distribution using Ansible?

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

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

Is it mandatory to have Ansible Controller Machine (ACM) and Jenkins Master on the same server/instance ?

Make git, Jenkins, Docker, ansible master as ...READ MORE

Sep 30, 2020 in Ansible by Adil
497 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,152 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,705 views
0 votes
1 answer

Which module is used to add repo in ansible for ubuntu?

It is Apt_repository that is used to ...READ MORE

Sep 28, 2020 in Ansible by Akhil
303 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,189 views
0 votes
1 answer

How to write ansible script for installing jenkins on aws RHEL?

Check this out. https://github.com/geerlingguy/ansible-role-jenkins H ...READ MORE

Sep 24, 2020 in Ansible by smy
1,040 views
0 votes
1 answer

How to do SSH in EC2 instance using Ansible Playbook?

Hi@akhtar, To configure your inventory dynamically you need ...READ MORE

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

How to launch MySQL docker container using Ansible playbook?

Hi@akhtar, You can use docker_container module in your ...READ MORE

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

Create a network in Docker using Ansible playbook.

Hi@akhtar, The docker_network module (Ansible 2.2 or higher) can create ...READ MORE

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

How to create docker volume using Ansible?

Hi@akhtar, We can create a volume docker resource ...READ MORE

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

What is dynamic inventory in Ansible?

Hi@akhtar, In a configuration especially a cloud setup such ...READ MORE

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

How to set dynamic host inventory file for docker in Ansible?

Hi@akhtar, In a configuration especially a container setup such ...READ MORE

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

How to start a docker container with healthstatus using Ansible?

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

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

Create a container with limited capabilities using Ansible playbook.

Hi@akhtar, The docker_container module has capabilitues keyword. This ...READ MORE

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

How to create a docker container using Ansible?

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

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

FAILED! => {"changed": false, "msg": "This module has been removed. The module documentation for Ansible-2.3 may contain hints for porting"}

Hi@akhtar, You are using the docker module. This ...READ MORE

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

How to remove duplicate entries from a file using Ansible?

Hi@akhtar, You can use the shell module to do your ...READ MORE

Sep 17, 2020 in Ansible by MD
• 95,440 points
4,427 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,778 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,579 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,295 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,424 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,355 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,362 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,080 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,347 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,086 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,128 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,894 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,288 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,174 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,056 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,138 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
24,984 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,876 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,091 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,644 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,913 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,475 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
578 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
585 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,067 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,395 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,900 views