Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-sch committed May 12, 2022
1 parent 444a514 commit 87a1c9f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Ansible

Docker image with [ansible-core](https://docs.ansible.com/ansible-core/devel/index.html) installed.
Docker image with [ansible-core](https://docs.ansible.com/ansible-core/devel/index.html) installed. It can be used as base image for containers providing Ansible automations.

Docker Hub: [fabos4ai/ansible-core](https://hub.docker.com/repository/docker/fabos4ai/ansible-core)

An example can be found in the `example` directory:

```
docker build -t ansible-example .
docker run ansible-example
```
7 changes: 7 additions & 0 deletions example/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM fabos4ai/ansible-core:2.11.9

COPY src /src

WORKDIR src

CMD ansible-playbook main.yml
6 changes: 6 additions & 0 deletions example/src/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: "Example"
hosts: localhost
gather_facts: yes
tasks:
- debug:
msg: "Simple Ansible automation running inside a container"

0 comments on commit 87a1c9f

Please sign in to comment.