26b2c2d9e9
Add config_owner_user and config_owner_group to group_vars/all, which is user and group of Kolla configuration files in /etc/kolla. Add become to post-deploy playbook. Add become to only neccesary tasks in roles: - certificate - common - destroy - haproxy - mariadb - memcached - rabbitmq Change-Id: I2aba745a6e3928c52642f64551470fd08cbfd058 Partial-Implements: blueprint ansible-specific-task-become
20 lines
439 B
YAML
20 lines
439 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
|
|
|
|
#(duonghq) it's only a basic check, should be refined later
|
|
- name: Check if ansible user can do passwordless sudo
|
|
shell: sudo -n true
|
|
register: result
|
|
failed_when: result | failed
|
|
|
|
|