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

Using Ansible Galaxy roles

To download a role from the Ansible Galaxy website, we can run the following command, where username and role_name are the options:

$ ansible-galaxy install username.role_name

The following command will download the docker_ubuntu role by user angstwad:

$ ansible-galaxy install angstwad.docker_ubuntu- downloading role 'docker_ubuntu', owned by angstwad- downloading role from https://github.com/angstwad/docker.ubuntu/archive/v3.3.4.tar.gz- extracting angstwad.docker_ubuntu to /home/ubuntu/.ansible/roles/angstwad.docker_ubuntu- angstwad.docker_ubuntu (v3.3.4) was installed successfully

To use this role to install Docker on Ubuntu is as simple as including this role in our playbook and executing it:

- name: Run docker.ubuntu ...
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