You've already forked role_podman
feat: Switch to CoreOS
This commit is contained in:
114
README.md
114
README.md
@@ -1,82 +1,66 @@
|
||||
# role_podman
|
||||
|
||||
Rôle de déploiement de podman.
|
||||
|
||||
## Pré-requis
|
||||
|
||||
Ce rôle créer un utilisateur dédié via [cet autre rôle](https://gitea.ykn.fr/ansible/role_users) dont il est dépendant.
|
||||
L'utilisation de ce rôle et de sa dépendance dans un playbook nécessite d'utilise ansible-galaxy en lui indiquant un fichier dont le contenu est le suivant :
|
||||
|
||||
```bash
|
||||
$ cd playbook_podman
|
||||
$ tee requirements.yml <<EOF
|
||||
---
|
||||
|
||||
roles:
|
||||
- name: users
|
||||
scm: git
|
||||
src: ssh://gitea@git.ykn.fr:12393/ansible/role_users.git
|
||||
version: alpha
|
||||
|
||||
- name: podman
|
||||
scm: git
|
||||
src: ssh://gitea@git.ykn.fr:12393/ansible/role_podman.git
|
||||
version: alpha
|
||||
EOF
|
||||
$ ansible-galaxy install -fr requirements.yml
|
||||
```
|
||||
Deploy podman pods and containers on CoreOS instance.
|
||||
|
||||
## Variables
|
||||
|
||||
### podman_configure_rsyslog
|
||||
### podman_auto_update
|
||||
|
||||
Désactive les messages du programme *podman* et des programmes dans les conteneurs si ils portent le nom du conteneur.
|
||||
Status of the automatic container update service.
|
||||
|
||||
<span style="text-decoration: underline">Valeur par défaut:</span> `true` (activé, `false` pour désactiver)
|
||||
<span style="text-decoration: underline">Default value:</span> `true
|
||||
|
||||
### podman_pods
|
||||
|
||||
List of dictionnaries to define pods ([see ansible documentation](https://docs.ansible.com/ansible/latest/collections/containers/podman/podman_pod_module.html)).
|
||||
|
||||
<span style="text-decoration: underline">Default value:</span> none
|
||||
|
||||
### podman_containers
|
||||
|
||||
Définition des conteneurs à déployer.
|
||||
List of dictionnaries to define containers ([see ansible documentation](https://docs.ansible.com/ansible/latest/collections/containers/podman/podman_container_module.html#ansible-collections-containers-podman-podman-container-module)).
|
||||
|
||||
<span style="text-decoration: underline">Valeur par défaut:</span> *aucune*
|
||||
<span style="text-decoration: underline">Default value:</span> none
|
||||
|
||||
## Utilisation
|
||||
## Usage
|
||||
|
||||
Définir la variable `podman_containers` dans un fichier sous `host_vars` ou `group_vars` :
|
||||
|
||||
```bash
|
||||
$ tee host_vars/lxd_podman_host.yml <<EOF
|
||||
---
|
||||
To deploy *wg-easy* container:
|
||||
|
||||
```yml
|
||||
# BEGIN role_podman
|
||||
podman_containers:
|
||||
- image: docker.io/wallabag/wallabag:latest
|
||||
name: wallbag
|
||||
userns: keep-id
|
||||
- image: "ghcr.io/wg-easy/wg-easy:latest"
|
||||
name: wg-easy
|
||||
publish:
|
||||
- "51820:51820/udp"
|
||||
- "51821:51821/tcp"
|
||||
volumes:
|
||||
- wallbag-data:/var/www/wallabag/data
|
||||
- wallbag-image:/var/www/wallabag/web/assets/images
|
||||
ports:
|
||||
- 80:80/tcp
|
||||
environment_vars:
|
||||
- SYMFONY__ENV__DOMAIN_NAME=https://wallbag.ykn.fr
|
||||
```
|
||||
|
||||
Il est également possible de définir l'utilisateur via la variable `user`, comme ceci :
|
||||
|
||||
```bash
|
||||
$ tee host_vars/lxd_podman_host.yml <<EOF
|
||||
---
|
||||
|
||||
podman_containers:
|
||||
- image: docker.io/wallabag/wallabag:latest
|
||||
name: wallbag
|
||||
user: un_utilisateur
|
||||
userns: keep-id
|
||||
volumes:
|
||||
- wallbag-data:/var/www/wallabag/data
|
||||
- wallbag-image:/var/www/wallabag/web/assets/images
|
||||
ports:
|
||||
- 80:80/tcp
|
||||
environment_vars:
|
||||
- SYMFONY__ENV__DOMAIN_NAME=https://wallbag.ykn.fr
|
||||
- "/srv/wg-easy:/etc/wireguard"
|
||||
env:
|
||||
LANG: fr
|
||||
PORT: 51821
|
||||
UI_CHART_TYPE: 2
|
||||
PASSWORD_HASH: <secret>
|
||||
WG_HOST: noun.ykn.fr
|
||||
WG_PORT: 51820
|
||||
WG_PERSISTENT_KEEPALIVE: 25
|
||||
WG_DEFAULT_DNS: ""
|
||||
WG_ALLOWED_IPS: 192.168.84.0/24
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
- SYS_MODULE
|
||||
sysctl:
|
||||
net.ipv4.ip_forward: 1
|
||||
net.ipv4.conf.all.src_valid_mark: 1
|
||||
quadlet_options:
|
||||
- AutoUpdate=registry
|
||||
- |-
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
TimeoutStartSec=900
|
||||
- |-
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
# END role_podman
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user