This repository has been archived on 2020-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
alerta.autonomic.zone/deploy.d/plays/predeploy.yml

20 lines
482 B
YAML
Raw Normal View History

2020-04-15 19:35:53 +00:00
---
- 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) }}"