How to create a role in Ansible

0 votes

Hi Guys,

I am new to Ansible. I want to create one role so that I can upload this. How can I create one role in Ansible?

Aug 20, 2020 in Ansible by akhtar
• 38,180 points
134 views

1 answer to this question.

0 votes

Hi@akhtar,

You can create a role in Ansible using the ansible-galaxy command. So you need to initialize your folder as shown below.

$ ansible-galaxy init web
- Role web was created successfully

answered Aug 20, 2020 by MD
• 95,140 points

Related Questions In Ansible

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

answered Aug 13, 2020 in Ansible by MD
• 95,140 points
801 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

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

How to create a new encrpted file using Ansible Vault?

If you are creating a new file ...READ MORE

answered Jan 29, 2019 in Ansible by Kyraa
235 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,039 views
+2 votes
1 answer
0 votes
1 answer

How to create a group of Managed Nodes in Ansible?

Hi@akhtar, You can use tags in your inventory ...READ MORE

answered Aug 1, 2020 in Ansible by MD
• 95,140 points
132 views
0 votes
1 answer

How to create a variable in Ansible Playbook?

Hi@akhtar, Variable in playbooks are very similar to using variables in ...READ MORE

answered Aug 2, 2020 in Ansible by MD
• 95,140 points
243 views