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
941 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,509 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
985 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
354 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
756 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
507 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,210 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,771 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
311 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,229 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,048 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,183 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,754 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,379 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,295 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,660 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,775 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,677 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
770 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
908 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,431 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,457 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,821 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,604 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,310 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,482 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,395 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,436 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,119 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,405 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,125 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,161 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,951 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,344 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,237 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,083 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,166 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,141 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,966 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,145 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,677 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,941 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,496 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
590 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
597 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,087 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,441 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,929 views