Make randomly generated secret length configurable
This commit is contained in:
@@ -93,6 +93,11 @@ argument_specs:
|
||||
- If the value is not explicitly set, it will not be changed if the secret already exists.
|
||||
type: str
|
||||
required: false
|
||||
length:
|
||||
description: Length of randomly generated string
|
||||
type: int
|
||||
required: false
|
||||
defalut: 128
|
||||
|
||||
container_env:
|
||||
description: A dict of environment variables for the container
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- name: Create secrets for container {{ container_name }}
|
||||
containers.podman.podman_secret:
|
||||
name: "{{ item.name }}"
|
||||
data: "{{ item.value | default(lookup('community.general.random_string', special=false, length=128)) }}"
|
||||
data: "{{ item.value | default(lookup('community.general.random_string', special=false, length=item.length | default(128))) }}"
|
||||
skip_existing: "{{ item.value is not defined }}"
|
||||
no_log: true
|
||||
loop: "{{ container_secrets }}"
|
||||
|
||||
@@ -110,6 +110,11 @@ argument_specs:
|
||||
- If the value is not explicitly set, it will not be changed if the secret already exists.
|
||||
type: str
|
||||
required: false
|
||||
length:
|
||||
description: Length of randomly generated string
|
||||
type: int
|
||||
required: false
|
||||
default: 128
|
||||
service_container_env:
|
||||
description: A dict of environment variables for the service container(s)
|
||||
type: dict
|
||||
|
||||
Reference in New Issue
Block a user