4b5df0d866
Some services look for /etc/timezone on Debian/Ubuntu, so we should introduce it to the containers. In addition, added prechecks for /etc/localtime and /etc/timezone. Closes-Bug: #1821592 Change-Id: I9fef14643d1bcc7eee9547eb87fa1fb436d8a6b3
27 lines
800 B
YAML
27 lines
800 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: kolla_base_distro in ['ubuntu', 'debian']
|