Skip to Content
Security Automation with Ansible 2
book

Security Automation with Ansible 2

by Akash Mahajan, MADHU AKULA
December 2017
Intermediate to advanced
364 pages
7h 30m
English
Packt Publishing
Content preview from Security Automation with Ansible 2

Publishing our role to Ansible Galaxy

To publish our own roles to Ansible Galaxy, we need to have a GitHub account, which will be used to authenticate Ansible Galaxy, and the version control repository in GitHub will be the place to store our roles.

The following steps are used to create and share a new role in Ansible Galaxy:

  1. First, create a new repository in GitHub and clone it locally using the following command:
$ git clone https://username@github.com/username/ansible-role-docker.git docker
  1. Then we can create a role structure using the ansible-galaxy command to create the structure:
$ ansible-galaxy init docker --force- docker was created successfully# The structure looks like below├── defaults│   └── main.yml├── files├── handlers
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Implementing DevOps with Ansible 2

Implementing DevOps with Ansible 2

Jonathan McAllister
Practical Ansible 2

Practical Ansible 2

Daniel Oh, James Freeman, Fabio Alessandro Locati

Publisher Resources

ISBN: 9781788394512Supplemental Content