kolla-ansible/ansible/roles/prechecks/tasks/user_checks.yml
Michal Nasiadka 6fad16ebb0 Stop reporting changed in prechecks
Change-Id: I12f7244aa91ccd7e287320e7edb09e0d04c01017
2018-08-02 12:34:50 +02:00

20 lines
473 B
YAML

---
- name: Check if config_owner_user existed
getent:
database: passwd
key: "{{ config_owner_user }}"
- name: Check if config_owner_group existed
getent:
database: group
key: "{{ config_owner_group }}"
register: getent_group
# NOTE(duonghq): it's only a basic check, should be refined later
- name: Check if ansible user can do passwordless sudo
shell: "true"
become: yes
register: result
failed_when: result | failed
changed_when: False