6fad16ebb0
Change-Id: I12f7244aa91ccd7e287320e7edb09e0d04c01017
20 lines
473 B
YAML
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
|