diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7a40bd..81b3031e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ The **patch** part changes incrementally at each release. ### Fixed +* lxc: Force lxc containers to be in the correct timezone + ### Removed ### Security diff --git a/lxc/tasks/create-container.yml b/lxc/tasks/create-container.yml index 8b8a68e3..71048b14 100644 --- a/lxc/tasks/create-container.yml +++ b/lxc/tasks/create-container.yml @@ -52,6 +52,23 @@ insertbefore: "^exit 0$" when: release == 'jessie' +- name: "Force container {{ name }} to be in the correct timezone [1/2]" + copy: + src: "/etc/timezone" + dest: "/var/lib/lxc/{{ name }}/rootfs/etc/timezone" + force: yes + owner: root + group: root + +- name: "Force container {{ name }} to be in the correct timezone [2/2]" + copy: + src: "/etc/localtime" + dest: "/var/lib/lxc/{{ name }}/rootfs/etc/localtime" + force: yes + local_follow: no + owner: root + group: root + - name: "Ensure that {{ name }} container is running" lxc_container: name: "{{ name }}"