Most viewed questions in Ansible

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,572 views
0 votes
0 answers
+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,440 points
3,520 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,440 points
3,482 views
0 votes
1 answer

Ansible error "Could not find aptitude. Using apt-get instead"

Hey @Hita, use the apt module to ...READ MORE

Aug 26, 2019 in Ansible by Jinu
3,428 views
0 votes
1 answer
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,400 views
0 votes
1 answer

Error: the field 'args' has an invalid value, which appears to include a variable that is undefined - Ansible

Hey @Harsh, use with_items to access the result ...READ MORE

Apr 2, 2019 in Ansible by Yesha
3,376 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,345 views
0 votes
1 answer

How do I add apt key by id from a keyserver? - Ansible

Hey @Altis, you can use the module ...READ MORE

Feb 11, 2019 in Ansible by Kyra
3,341 views
0 votes
1 answer

Ansible vs Ansible Tower

Ansible is CM tool and orchestration engine. ...READ MORE

Jan 28, 2019 in Ansible by Haider
3,333 views
+1 vote
1 answer

ansible playbook to create and remove a WebSphere application server deployment manager profile

The below gives an example of creating ...READ MORE

Oct 30, 2019 in Ansible by Tanmay
3,321 views
0 votes
1 answer

Error saying "Cannot write to ControlPath" - Ansible

hey @Neel, this seems like your Linux ...READ MORE

Mar 29, 2019 in Ansible by Yesha
3,283 views
0 votes
1 answer

How do I access shell environment variables using Ansible Playbook

Hey @Tina, If you need to access ...READ MORE

Jan 31, 2019 in Ansible by Mahir
3,200 views
0 votes
1 answer

How to take user input in Ansible?

Hi@akhtar, To ask for user input, we will ...READ MORE

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

Running a playbook using Ansible on Jenkins

Hey, @Asha seems like you've added a ...READ MORE

Apr 4, 2019 in Ansible by Akhil
3,159 views
0 votes
1 answer

One loop over multiple Ansible tasks

With_items has unfortunately stopped but it’s coming ...READ MORE

Jul 23, 2018 in Ansible by Kalgi
• 52,360 points
3,108 views
0 votes
1 answer

Store ec2 instance IP using ansible playbook

Hey @Himanshu, you can use something like ...READ MORE

Mar 25, 2019 in Ansible by Yesha
3,098 views
0 votes
1 answer

Is there any way to encrypt --private-key with ansible-vault and use it encrypted with Ansible Playbook

Hey @Kajol, Create a passphrase for the key openssl ...READ MORE

Jan 29, 2019 in Ansible by Anupam
3,089 views
0 votes
1 answer

Error: One or more undefined variables: 'unicode object' has no attribute 'repo'

Hey change this in your role with_items: apt_repos By ...READ MORE

Mar 14, 2019 in Ansible by Haseeb
3,080 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,078 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,075 views
0 votes
1 answer

How to encrypt and existing file using Ansible Vault?

Hey @Kyraa, to encrypt an existing file ...READ MORE

Jan 29, 2019 in Ansible by Kavya
3,065 views
0 votes
1 answer

Multilines in shell script inside Ansible playbook

You could write your playbook in this ...READ MORE

Jan 25, 2019 in Ansible by Donna
3,065 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,064 views
0 votes
1 answer

Python script to decrypt while running the playbook - Ansible Vault

Ansible provides a feature where you can ...READ MORE

Mar 7, 2019 in Ansible by William
3,029 views
0 votes
1 answer

How to configure httpd web server using Ansible Playbook?

Hi@akhtar, You need to write one program file ...READ MORE

Jul 30, 2020 in Ansible by MD
• 95,440 points
2,975 views
0 votes
1 answer

Unarchive module overwriting - Ansible

Hey @joe, you can use the create option, ...READ MORE

Jan 30, 2019 in Ansible by Khadeer
2,975 views
0 votes
2 answers

How do you stop Ansible from creating .retry files in the home directory?

[defaults] ... retry_files_enabled = True # Create them ...READ MORE

Apr 5, 2019 in Ansible by anonymous
2,933 views
0 votes
1 answer

Playbook to add hosts to the known hosts list - Ansible

Hey @Kiran, try something like this: - name: ...READ MORE

Mar 26, 2019 in Ansible by Haider
2,924 views
0 votes
1 answer

How to start httpd service in a remote system using Ansible?

Hi@akhtar, Ansible has a module named service. This ...READ MORE

Jul 30, 2020 in Ansible by MD
• 95,440 points
2,896 views
0 votes
1 answer

Ansible playbook to create an S3 bucket

Hey @Alok, an ansible task like this ...READ MORE

Aug 1, 2019 in Ansible by Vish
2,895 views
0 votes
1 answer

Ansible playbook to install and update the IBM packages from local or remote repositories

Hi @Hannah, I have this and it ...READ MORE

Oct 30, 2019 in Ansible by Tanmay
2,880 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,878 views
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
2,869 views
0 votes
1 answer

How to get details of playbook executions

Run these commands to enable logging before ...READ MORE

Jan 22, 2019 in Ansible by Tanishq
2,868 views
0 votes
2 answers

Ansible error while ansible -m ping all

It looks like ansible may be installed ...READ MORE

Mar 18, 2019 in Ansible by Vince
2,841 views
–1 vote
2 answers

Set up the necessary tools such as git, chromedriver(selenium), chromium browser(selenium) on the slave node through Ansible

- hosts: all vars : ...READ MORE

Dec 31, 2020 in Ansible by Onkar
• 140 points

edited Dec 31, 2020 by MD 2,834 views
0 votes
1 answer

How to configure the Nginx server in AWS with Ansible Playbook?

Hi@akhtar, To configure the Nginx server in AWS, ...READ MORE

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

Get MD5 checksum of a windows file using Ansible

Hi @Travis, you can use the win_stat ...READ MORE

Jun 11, 2019 in Ansible by Greg
2,769 views
0 votes
1 answer

Ansible playbook to create a new database

Hi pravalika, its pretty simple.  You just ...READ MORE

Aug 8, 2019 in Ansible by Trvais
2,766 views
+1 vote
1 answer

Error saying "Package not a legal parameter in an Ansible task or a handler" - Ansible

This has been happening to a lot ...READ MORE

Jan 8, 2019 in Ansible by Takeshi
2,725 views
0 votes
1 answer

How does strategy : free improve performance for network playbook?

The strategy plugin tells Ansible how to order multiple ...READ MORE

Feb 1, 2019 in Ansible by Anisha
2,713 views
0 votes
1 answer

FAILED! => {"changed": false, "msg": "src and content are mutually exclusive"}

Hi@akhtar, You can't use content and src argument ...READ MORE

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

Is there a way to recover lost Ansible Vault password?

Hey @Sridhar, There is no way to ...READ MORE

Jan 29, 2019 in Ansible by Akthia
2,685 views
0 votes
1 answer

Ansible playbook with jenkins not working

When you execute the playbook under Jenkins, ...READ MORE

Jan 17, 2019 in Ansible by Sameer
2,673 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,649 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,637 views
0 votes
1 answer

Playbook to backup all mysql databases

Hey @Ruth, you could use a playbook, ...READ MORE

Feb 4, 2019 in Ansible by Anushri
2,636 views