0c3d988530
this ps[0] uses new condition for timezone mounting but we missed prechecks condition. [0] https://review.opendev.org/#/c/745505/ Change-Id: I79323a392e171bebe36d06c19d34e458e05e194b Closes-Bug: #1882553
27 lines
788 B
YAML
27 lines
788 B
YAML
---
|
|
- name: Ensure /etc/localtime exist
|
|
stat:
|
|
path: /etc/localtime
|
|
register: etc_localtime
|
|
|
|
- name: Fail if /etc/localtime is absent
|
|
fail:
|
|
msg: >-
|
|
/etc/localtime is not found. This file is used for system-wide time
|
|
settings and Kolla Ansible needs this file for mounting it to containers.
|
|
when: not etc_localtime.stat.exists
|
|
|
|
- block:
|
|
- name: Ensure /etc/timezone exist
|
|
stat:
|
|
path: /etc/timezone
|
|
register: etc_timezone
|
|
|
|
- name: Fail if /etc/timezone is absent
|
|
fail:
|
|
msg: >-
|
|
/etc/timezone is not found. This file is used for system-wide timezone
|
|
settings and Kolla Ansible needs this file for mounting it to containers.
|
|
when: not etc_timezone.stat.exists
|
|
when: ansible_os_family == 'Debian'
|