5fb10e08fe
Change-Id: Ibf40216b847f103e383f19fe1ef608a75fcfd452 Co-Authored-By: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
20 lines
476 B
YAML
20 lines
476 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
|
|
command: "true"
|
|
become: yes
|
|
register: result
|
|
failed_when: result is failed
|
|
changed_when: False
|