Nick Jones 5265993134
Don't assume user's primary group name is the same as username
In certain environments, a user's primary group doesn't necessarily
match that of their username.  This change updates various playbooks to
make use of the `ansible_user_gid` fact instead.

This change also makes ownership explicit by using `ansible_user_uid`
instead of `ansible_user` or `ansible_user_id`, where appropriate.

Change-Id: Ifc2ea7d95ec90e91791ccb10772b15d991379479
Story: 2002770
Task: 22636
2018-07-04 19:56:05 +01:00

18 lines
487 B
YAML

---
- name: Ensure inspection store configuration path exists
file:
path: "{{ inspection_store_config_path }}"
state: directory
owner: "{{ ansible_user_uid }}"
group: "{{ ansible_user_gid }}"
mode: 0750
become: True
- name: Ensure inspection store server is configured
template:
src: nginx.conf
dest: "{{ inspection_store_config_path }}/nginx.conf"
notify:
- Restart inspection store container
- Ensure inspection store data directory exists