diff --git a/README.md b/README.md index 1e7d9bb..ffc004b 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ and modules name that you want to use: image: redis command: redis-server --appendonly yes state: present - recreate: yes + recreate: true expose: - 6379 volumes_from: @@ -73,7 +73,7 @@ Or you can add full namespace and collection name in the `collections` element: podman_image: name: nginx path: /path/to/build/dir - push: yes + push: true push_args: dest: quay.io/acme ``` diff --git a/plugins/become/podman_unshare.py b/plugins/become/podman_unshare.py index c4f1f21..6453f23 100644 --- a/plugins/become/podman_unshare.py +++ b/plugins/become/podman_unshare.py @@ -74,7 +74,7 @@ EXAMPLES = """ containers.podman.podman_container: name: chmod_foo image: alpine - rm: yes + rm: true volume: - "{{ test_dir }}:/opt/test:z" command: chown 1000 /opt/test/foo @@ -89,7 +89,7 @@ EXAMPLES = """ - name: running stat in modified user namespace become_method: containers.podman.podman_unshare - become: yes + become: true ansible.builtin.stat: path: "{{ test_dir }}/foo" register: foo @@ -101,12 +101,12 @@ EXAMPLES = """ - name: resetting file ownership with podman unshare become_method: containers.podman.podman_unshare - become: yes + become: true ansible.builtin.file: state: file path: "{{ test_dir }}/foo" owner: 0 # in a modified user namespace host uid is mapped to 0 -# If we run stat and debug with 'become: no', +# If we run stat and debug with 'become: false', # we can see that the file is ours again: # ok: [test_host] => { # "foo.stat.uid": "1003" diff --git a/plugins/modules/podman_container.py b/plugins/modules/podman_container.py index 0118420..9365205 100644 --- a/plugins/modules/podman_container.py +++ b/plugins/modules/podman_container.py @@ -851,7 +851,7 @@ EXAMPLES = r""" image: redis command: redis-server --appendonly yes state: present - recreate: yes + recreate: true expose: - 6379 volumes_from: @@ -868,7 +868,7 @@ EXAMPLES = r""" name: myapplication image: redis state: started - restart: yes + restart: true etc_hosts: other: "127.0.0.1" restart_policy: "no" @@ -895,7 +895,7 @@ EXAMPLES = r""" - name: Start 4 load-balanced containers containers.podman.podman_container: name: "container{{ item }}" - recreate: yes + recreate: true image: someuser/anotherappimage command: sleep 1d with_sequence: count=4 diff --git a/plugins/modules/podman_generate_systemd.py b/plugins/modules/podman_generate_systemd.py index 3bfcbb1..9c9bc7b 100644 --- a/plugins/modules/podman_generate_systemd.py +++ b/plugins/modules/podman_generate_systemd.py @@ -157,9 +157,9 @@ EXAMPLES = ''' - name: Ensure postgres container is started and enabled ansible.builtin.systemd: name: container-postgres - daemon_reload: yes + daemon_reload: true state: started - enabled: yes + enabled: true # Example of creating a container and integrate it into systemd diff --git a/plugins/modules/podman_image.py b/plugins/modules/podman_image.py index 0865544..92ab33e 100644 --- a/plugins/modules/podman_image.py +++ b/plugins/modules/podman_image.py @@ -200,7 +200,7 @@ EXAMPLES = r""" path: /path/to/build/dir build: cache: no - force_rm: yes + force_rm: true format: oci annotation: app: nginx @@ -219,14 +219,14 @@ EXAMPLES = r""" containers.podman.podman_image: name: nginx path: /path/to/build/dir - push: yes + push: true push_args: dest: quay.io/acme - name: Build and push an image using an auth file containers.podman.podman_image: name: nginx - push: yes + push: true auth_file: /etc/containers/auth.json push_args: dest: quay.io/acme @@ -234,7 +234,7 @@ EXAMPLES = r""" - name: Build and push an image using username and password containers.podman.podman_image: name: nginx - push: yes + push: true username: bugs password: "{{ vault_registry_password }}" push_args: @@ -244,7 +244,7 @@ EXAMPLES = r""" containers.podman.podman_image: name: "{{ item }}" path: /path/to/build/dir - push: yes + push: true auth_file: /etc/containers/auth.json loop: - quay.io/acme/nginx @@ -255,7 +255,7 @@ EXAMPLES = r""" name: "{{ item.name }}" tag: "{{ item.tag }}" path: /path/to/build/dir - push: yes + push: true auth_file: /etc/containers/auth.json push_args: dest: "{{ item.dest }}" diff --git a/plugins/modules/podman_logout.py b/plugins/modules/podman_logout.py index bf6e6b6..d5816a9 100644 --- a/plugins/modules/podman_logout.py +++ b/plugins/modules/podman_logout.py @@ -52,7 +52,7 @@ options: (for docker e.g. `${HOME}/.docker/config.json`), module execution will fail if a docker login exists for the registry specified in any `authfile` is used by podman. This can be ignored by setting - `ignore_docker_credentials` to `yes` - the credentials will be kept and + `ignore_docker_credentials` to `true` - the credentials will be kept and `changed` will be false. This option cannot be used together with `all` since in this case podman will not check for existing `authfiles` created by other tools. @@ -75,12 +75,12 @@ EXAMPLES = r""" - name: Log out of all registries in auth file podman_logout: - all: yes + all: true - name: Log out of all registries in specified auth file podman_logout: authfile: $HOME/.docker/config.json - all: yes + all: true """ # noqa: F402 diff --git a/tests/integration/targets/connection/create-nonroot-user.yml b/tests/integration/targets/connection/create-nonroot-user.yml index 6d9a45b..8669cfe 100644 --- a/tests/integration/targets/connection/create-nonroot-user.yml +++ b/tests/integration/targets/connection/create-nonroot-user.yml @@ -1,5 +1,5 @@ - hosts: "{{ target_hosts }}" - gather_facts: no + gather_facts: false tasks: - name: Create a user diff --git a/tests/integration/targets/connection/test_connection.yml b/tests/integration/targets/connection/test_connection.yml index 2169942..65f7e11 100644 --- a/tests/integration/targets/connection/test_connection.yml +++ b/tests/integration/targets/connection/test_connection.yml @@ -1,5 +1,5 @@ - hosts: "{{ target_hosts }}" - gather_facts: no + gather_facts: false serial: 1 tasks: diff --git a/tests/integration/targets/podman_container/tasks/main.yml b/tests/integration/targets/podman_container/tasks/main.yml index 217a87a..3a66f6a 100644 --- a/tests/integration/targets/podman_container/tasks/main.yml +++ b/tests/integration/targets/podman_container/tasks/main.yml @@ -664,14 +664,14 @@ ansible.builtin.unarchive: src: "https://dl-cdn.alpinelinux.org/alpine/{{ latest_branch }}/releases/{{ ansible_architecture }}/alpine-minirootfs-{{ latest_version }}-{{ ansible_architecture }}.tar.gz" dest: "{{ container_tempdir.path }}" - remote_src: yes + remote_src: true - name: Check invalid rootfs image pull containers.podman.podman_container: executable: "{{ test_executable | default('podman') }}" name: container image: /ineverneverneverexist - rootfs: yes + rootfs: true state: started command: sleep 1d register: imagerootfsfail @@ -688,7 +688,7 @@ executable: "{{ test_executable | default('podman') }}" name: container3 image: "{{ container_tempdir.path }}" - rootfs: yes + rootfs: true state: started command: sleep 1d register: image @@ -710,7 +710,7 @@ executable: "{{ test_executable | default('podman') }}" name: container3 image: "{{ container_tempdir.path }}" - rootfs: yes + rootfs: true state: started command: sleep 1d register: idem @@ -750,7 +750,7 @@ executable: "{{ test_executable | default('podman') }}" name: container3 image: "{{ container_tempdir.path }}" - rootfs: yes + rootfs: true state: started command: sleep 1d register: image diff --git a/tests/integration/targets/podman_generate_systemd/tasks/main.yml b/tests/integration/targets/podman_generate_systemd/tasks/main.yml index 1332c13..6b0d18c 100644 --- a/tests/integration/targets/podman_generate_systemd/tasks/main.yml +++ b/tests/integration/targets/podman_generate_systemd/tasks/main.yml @@ -42,7 +42,7 @@ - name: Regenerate the systemd units with all the options containers.podman.podman_generate_systemd: name: postgres_local - new: yes + new: true restart_policy: on-abnormal restart_sec: 19 start_timeout: 21 @@ -50,11 +50,11 @@ env: POSTGRES_USER: my_app POSTGRES_PASSWORD: example - use_names: yes + use_names: true container_prefix: more pod_prefix: less separator: + - no_header: yes + no_header: true after: drink.service wants: water.service requires: ice.service diff --git a/tests/integration/targets/podman_image/tasks/main.yml b/tests/integration/targets/podman_image/tasks/main.yml index 4726b2f..4abf635 100644 --- a/tests/integration/targets/podman_image/tasks/main.yml +++ b/tests/integration/targets/podman_image/tasks/main.yml @@ -253,7 +253,7 @@ executable: "{{ test_executable | default('podman') }}" name: bad_image pull: false - push: yes + push: true register: bad_push ignore_errors: true diff --git a/tests/integration/targets/podman_network/tasks/main.yml b/tests/integration/targets/podman_network/tasks/main.yml index a7be596..d207e4c 100644 --- a/tests/integration/targets/podman_network/tasks/main.yml +++ b/tests/integration/targets/podman_network/tasks/main.yml @@ -332,7 +332,7 @@ containers.podman.podman_network: executable: "{{ test_executable | default('podman') }}" name: "{{ network_name }}" - ipv6: yes + ipv6: true subnet: fd4f:552c:830f:0000::/64 state: present @@ -340,7 +340,7 @@ containers.podman.podman_network: executable: "{{ test_executable | default('podman') }}" name: "{{ network_name }}" - ipv6: yes + ipv6: true subnet: fd4f:552c:830f:0000::/64 state: present register: info17