84ea42bd7c
Since Ansible 2.5, the use of jinja tests as filters has been deprecated. I've run the script provided by the ansible team to 'fix' the jinja filters to conform to the newer syntax. This fixes the deprecation warnings. Change-Id: I844ecb7bec94e561afb09580f58b1bf83a6d00bd Closes-bug: #1827370
20 lines
474 B
YAML
20 lines
474 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 is failed
|
|
changed_when: False
|