Update roles
This commit is contained in:
@@ -59,10 +59,12 @@ Role uses variables that are required to be passed while including it. As
|
||||
there is option to run one container separately or multiple containers in pod,
|
||||
note that some options apply only to other method.
|
||||
|
||||
- ```container_image``` - container image and tag, e.g. nextcloud:latest
|
||||
This is used only if you run single container
|
||||
- ```container_image_list``` - list of container images to run within a pod.
|
||||
This is used only if you run containers in pod.
|
||||
- ```container_image_list``` - list of container images to run.
|
||||
If more than one image is defined, then the containers will be run in a pod.
|
||||
- ```container_image_user``` - optional username to use when authenticating
|
||||
to remote registries
|
||||
- ```container_image_password``` - optional password to use when authenticating
|
||||
to remote registries
|
||||
- ```container_name``` - Identify the container in systemd and podman commands.
|
||||
Systemd service file be named container_name--container-pod.service.
|
||||
- ```container_run_args``` - Anything you pass to podman, except for the name
|
||||
@@ -88,12 +90,14 @@ command line. See ```man podman``` or
|
||||
[podman tutorials](https://github.com/containers/libpod/tree/master/docs/tutorials)
|
||||
for info.
|
||||
|
||||
|
||||
If you want your
|
||||
[images to be automatically updated](http://docs.podman.io/en/latest/markdown/podman-auto-update.1.html),
|
||||
add this label to container_cmd_args: ```--label "io.containers.autoupdate=image"```
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
No dependencies.
|
||||
* [containers.podman](https://galaxy.ansible.com/containers/podman) (collection)
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
@@ -105,11 +109,13 @@ Root container:
|
||||
```
|
||||
- name: tests container
|
||||
vars:
|
||||
container_image: sebp/lighttpd:latest
|
||||
container_image_list:
|
||||
- sebp/lighttpd:latest
|
||||
container_name: lighttpd
|
||||
container_run_args: >-
|
||||
--rm
|
||||
-v /tmp/podman-container-systemd:/var/www/localhost/htdocs:Z
|
||||
--label "io.containers.autoupdate=image"
|
||||
-p 8080:80
|
||||
#container_state: absent
|
||||
container_state: running
|
||||
@@ -139,7 +145,8 @@ Rootless container:
|
||||
vars:
|
||||
container_run_as_user: rootless_user
|
||||
container_run_as_group: rootless_user
|
||||
container_image: sebp/lighttpd:latest
|
||||
container_image_list:
|
||||
- sebp/lighttpd:latest
|
||||
container_name: lighttpd
|
||||
container_run_args: >-
|
||||
--rm
|
||||
|
||||
Reference in New Issue
Block a user