kolla-ansible/ansible/roles/prechecks/tasks/user_checks.yml
Jeffrey Zhang c567055176 Fix ansible warning
- rename action and serial to kolla_ansible and kolla_serial
- use become instead of "sudo <command>" in shell
- Remove quota for failed_when and changed_when in rabbitmq tasks

Change-Id: I78cb60168aaa40bb6439198283546b7faf33917c
Implements: blueprint migrate-to-ansible-2-2-0
2018-05-11 02:54:02 +00:00

19 lines
451 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