Ansible examples for https://williamsbdev.com/ blog posts
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ansible-base
examples
tests
.dockerignore
.gitignore
README.md
example-01.yml
example-02.yml
example-03.yml
example-04.yml
example-05.yml
example-06.yml
example-07.yml
example-08.yml
example-09.yml
example-10.yml
hosts
requirements.txt

README.md

Ansible examples for https://williamsbdev.com/

You can run all the examples by having Docker installed (I created all examples with Docker for Mac version 17.12.0-ce). Otherwise, you can deconstruct what commands are needed from the following code examples and Dockerfiles.

Build base image for all examples using Ansible 2.2.0.0

docker build -t ansible-base -f ansible-base/Dockerfile .

Example 1

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-01 -f examples/01/Dockerfile .

Run

docker run example-01

Example 2

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-02 -f examples/02/Dockerfile .

Run

docker run example-02

Example 3

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-03 -f examples/03/Dockerfile .

Run

docker run example-03

Example 4

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-04 -f examples/04/Dockerfile .

Run

docker run example-04

Example 5

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-05 -f examples/05/Dockerfile .

Run

docker run example-05

Example 6

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-06 -f examples/06/Dockerfile .

Run

docker run example-06

Example 7

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-07 -f examples/07/Dockerfile .

Run

docker run example-07

Example 8

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-08 -f examples/08/Dockerfile .

Run

docker run example-08

Example 9

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-09 -f examples/09/Dockerfile .

Run

docker run example-09

Example 10

Make sure to build base image (used for all examples).

Build Docker image

docker build -t example-10 -f examples/10/Dockerfile .

Run

docker run example-10

Run tests for project

Make sure to build base image (used for all examples/tests).

Build Docker image

docker build -t ansible-example-tests -f tests/Dockerfile .

Run

docker run ansible-example-tests