aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2024-08-30 11:01:42 -0400
committerspmfox <spmfox@foxwd.com>2024-08-30 11:01:42 -0400
commitdba0ad5027af1718269785deecbdfcd0917bcdcb (patch)
tree49194613713f0230009284afda8dee75d1096a55
parent72ca9f592b19e705a25f78786158df715aa62355 (diff)
removed default variables from containers role, updated sample environment and readme to match
-rw-r--r--README.md11
-rw-r--r--docs/sample-environment/wordpress/wordpress.yml13
-rw-r--r--roles/containers/defaults/main.yml11
3 files changed, 18 insertions, 17 deletions
diff --git a/README.md b/README.md
index 6e1e16d..9d71dcc 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Quadlet files and some understanding of quadlet and/or systemd is required to us
## Usage
ansible-playbook host.yml
sudo machinectl shell containers@
- ansible-playbook containers.yml
+ ansible-playbook -i docs/sample-environment/wordpress/wordpress.yml containers.yml
## Features
- Designed for rootless Podman
@@ -18,18 +18,17 @@ Quadlet files and some understanding of quadlet and/or systemd is required to us
- Define your application's quadlet files so they are treated as one entity with Ansible
## Sample Environment
-A fully working pod with Wordpress and a MariaDB database are in the `docs/sample-environment` directory.
-The default variables in the `container` role will use this sample environment for deployment.
-Provide your own inventory and/or variables to override this.
+A fully working pod with Wordpress and a MariaDB database are in the `docs/sample-environment/wordpress` directory.
+The environment variables are in `wordpress.yml`, you'll also find the containerfiles and the quadlet files.
## Requirements
- Ansible
-- Ansible collections:
- - ```ansible-galaxy install -r collections/requirements.yml```
- Podman
- User with `sudo` rights (to create unprivileged user)
## Operation
+- **Note:** `host.yml` and `containers.yml` will default to execute on localhost if a host isn't provided
+ - This means you can either create a full inventory with a host and variables or just variables that will be run against localhost
- `host.yml` - installs the needed packages and creates the `containers` unprivileged user - use with a privileged account
- `containers.yml` - will copy the quadlet files and start the quadlet - use with the unprivileged account
diff --git a/docs/sample-environment/wordpress/wordpress.yml b/docs/sample-environment/wordpress/wordpress.yml
new file mode 100644
index 0000000..c4cd72b
--- /dev/null
+++ b/docs/sample-environment/wordpress/wordpress.yml
@@ -0,0 +1,13 @@
+all:
+ vars:
+ containers_quadlet_path: "docs/sample-environment/wordpress/quadlet"
+
+ containers_quadlets:
+ - name: "wordpress-pod"
+ file: "wordpress.pod"
+
+ - name: "wordpress-app"
+ file: "wordpress-app.container"
+
+ - name: "wordpress-db"
+ file: "wordpress-db.container"
diff --git a/roles/containers/defaults/main.yml b/roles/containers/defaults/main.yml
deleted file mode 100644
index 2a55101..0000000
--- a/roles/containers/defaults/main.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-containers_quadlet_path: "../../docs/sample-environment/wordpress/quadlet"
-
-containers_quadlets:
- - name: "wordpress-pod"
- file: "wordpress.pod"
-
- - name: "wordpress-app"
- file: "wordpress-app.container"
-
- - name: "wordpress-db"
- file: "wordpress-db.container"