20 lines
482 B
YAML
20 lines
482 B
YAML
|
---
|
||
|
- name: Get uid/guid of the Docker user
|
||
|
become: true
|
||
|
getent:
|
||
|
database: passwd
|
||
|
key: docker
|
||
|
split: ":"
|
||
|
|
||
|
- name: Prepare docker user information dictionary
|
||
|
set_fact:
|
||
|
docker_user_info:
|
||
|
{
|
||
|
"docker_user_uid": "{{ getent_passwd['docker'][1] }}",
|
||
|
"docker_user_gid": "{{ getent_passwd['docker'][2] }}",
|
||
|
}
|
||
|
|
||
|
- name: Store docker user uid/guid in config.vars dictionary
|
||
|
set_fact:
|
||
|
config: "{{ config | update_vars(docker_user_info) }}"
|