Committing the code and publishing

Now that we have our completed role, we need to push it to a public GitHub repository. There are a few reasons why it needs to be published to a public repository, the most important of which is that any potential user will need to download your role. Also, Ansible Galaxy links to the repository, allowing users to review your role before they choose to execute it as part of their playbooks.

On all GitHub pages, when you are logged in, there is a + icon in the top right; clicking this will bring up a menu that contains options for creating a new repository and importing one, as well as gists and organizations. Select New repository from the menu and you will be presented with a screen that looks as follows: ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.