blob: 25399adbc0038db4bf5c7f5556cec368ffee539d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# PodPlaybook
Ansible playbook for deploying and managing Podman containers.

This playbook is for deploying and managing Podman containers in a reproducible way.
By default it will create systemd service files and is compatible with or without the use of pods.
## Usage
- ```ansible-playbook host.yml```
- ```ansible-galaxy install -r collections/requirements.yml```
- ```ansible-playbook containers.yml -e @docs/sample-environment/wordpress.yml```
## Features
- Declare container environment using Ansible variables file
- Rebuild, stop, start, enable systemd service, disable + remove systemd files
- One command for re-build image, re-generate systemd unit files
- Utilizes rootless Podman
## Sample Environment
A fully working pod with Wordpress and a MariaDB database are in the ```docs/sample-environment``` directory.
## Requirements
- Ansible
- Ansible collections
- ```ansible-galaxy install -r collections/requirements.yml```
- Podman
- User with ```sudo``` rights
## Assumptions
- Rootless mode is being used, so tasks are written to use systemd user scope
- Tasks would need to be tweaked for using the root user
- ```containers``` user is automatically created during the ```host.yml``` play
|