blob: aea0aad0f61656498b2308fd5a988777f8fa544c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
---
- 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_facts.os_family == 'Debian'
|