How do i automatically install galaxy roles?

0 votes
I have all my galaxy roles pushed to GitHub. Ansible requires me to have these files on my system. The problem is I have to install them on each ansible host I want to run this on. Is there a way to automate these roles?
Mar 12 in Ansible by Bob
21 views

1 answer to this question.

0 votes

You should use a requirements.yml file for this use-case. Describe the roles you require, using any of a variety of install methods:

# Install a role from the Ansible Galaxy
- src: dfarrell07.opendaylight

# Install a role from GitHub
- name: opendaylight
  src: https://github.com/dfarrell07/ansible-opendaylight

# Install a role from a specific git branch
- name: opendaylight
  src: https://github.com/dfarrell07/ansible-opendaylight
  version: origin/master

# Install a role at a specific tag from GitHub
- name: opendaylight
  src: https://github.com/dfarrell07/ansible-opendaylight
  version: 1.0.0

# Install a role at a specific commit from GitHub
- name: opendaylight
  src: https://github.com/dfarrell07/ansible-opendaylight
  version: <commit hash>
answered Mar 12 by William

Related Questions In Ansible

0 votes
2 answers

How do i install Ansible using virtualenv

Adding to @Mohit's answer,  For CentOS and RHEL: sudo ...READ MORE

answered Jan 10 in Ansible by Dikinson
84 views
0 votes
1 answer

How do I install Ansible on Ubuntu?

Hey Kiara, Execute the following commands to Install ...READ MORE

answered Feb 20 in Ansible by Kunal
30 views
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,800 points
438 views
0 votes
1 answer

Install ansible galaxy roles

Here is a very basic example that ...READ MORE

answered Jan 9 in Ansible by Disha
54 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How do I install Ansible on windows?

Hi Neha, you cannot have an entire ...READ MORE

answered Feb 27 in Ansible by Kavya
41 views
0 votes
1 answer