1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-03-22 02:29:08 +00:00

Add quadlet file mode option to specify file permission (#867)

* Add quadlet file mode option

Signed-off-by: ghoudmon <guillaume@houdmon.com>

* Fix file mode only change test

Signed-off-by: ghoudmon <guillaume@houdmon.com>

---------

Signed-off-by: ghoudmon <guillaume@houdmon.com>
This commit is contained in:
Guillaume HOUDMON 2024-10-22 14:20:26 +02:00 committed by GitHub
parent 84cff745f9
commit 2deadf069a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 193 additions and 6 deletions

View file

@ -460,10 +460,11 @@
path: /tmp/customfile.image
register: quadlet_file_custom
- name: Fail if no file is present
- name: Fail if no file is present or wrong mode
assert:
that:
- quadlet_file_custom.stat.exists
- quadlet_file_custom.stat.mode == '0640'
- name: Create quadlet image file
containers.podman.podman_image:
@ -476,6 +477,7 @@
password: pass
validate_certs: false
quadlet_dir: /tmp/
quadlet_file_mode: '0644'
quadlet_options:
- "ImageTag=quay.io/coreos/coreos-installer:12345"
- "AllTags=true"
@ -493,6 +495,11 @@
that:
- quadlet_file.stat.exists
- name: Check quadlet file mode is correct
assert:
that:
- quadlet_file.stat.mode == '0644'
- name: Check for the existence of lines in /tmp/coreos-installer.image
lineinfile:
path: /tmp/coreos-installer.image