major cleanup of ansible tasks in podman role

This commit is contained in:
Bastian de Byl
2023-07-24 13:38:34 -04:00
parent 71e9f4590b
commit 4c40a42707
18 changed files with 227 additions and 249 deletions

View File

@@ -1,14 +1,17 @@
---
- import_tasks: podman/podman-check.yml
vars:
container_name: nginx
container_image: "{{ image }}"
- name: create nginx container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: nginx
image: docker.io/owasp/modsecurity:nginx
image: "{{ image }}"
entrypoint: ""
command: ["nginx", "-g", "daemon off;"]
recreate: false
restart: true
restart_policy: on-failure:3
log_driver: journald
network:
@@ -22,10 +25,8 @@
- "{{ nginx_path }}/etc:/etc/nginx:ro"
- "/srv/http/letsencrypt:/srv/http/letsencrypt:z"
- "/etc/letsencrypt:/etc/letsencrypt:ro"
tags: nginx
- name: create systemd startup job for nginx
include_tasks: systemd-generate.yml
include_tasks: podman/systemd-generate.yml
vars:
container_name: nginx
tags: nginx