O'Reilly logo

OpenStack Administration with Ansible by Walter Bentley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Playbook and role review

Let's jump right into examining the roles we created.

The completed role and file named main.yml located in the install-docker/tasks directory looks similar to this:

---

- name: Install additional packages
apt: name={{item}} state=present
with_items:
   - git
   - wget

- name: Pull down and install Docker packages
shell: chdir=/opt wget -qO- https://get.docker.com/ | sh

- name: Verify the Docker install
command: docker run hello-world

- name: Add Nova user to Docker group
command: usermod -aGdocker nova

The completed role and file named main.yml located in the nova-docker/tasks directory looks as follows:

--- - name: Pull down nova-docker package command: chdir=/opt git clone http://github.com/stackforge/nova-docker.git - name: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required