diff --git a/README.md b/README.md index 3c8a5db..a5ae06d 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,10 @@ These must be valid profiles and present in `test_profiles`. To cache to directory different from `$HOME/lxc`, modify `lxc_cache_directory`. +If you need to disable the usage of OverlayFS in the LXC containers (e.g. if +you're attempting to use OverlayFS inside of the LXC container), set +`lxc_use_overlayfs` to `no` (or any `False` variant) + Contributors ------------ diff --git a/defaults/main.yml b/defaults/main.yml index 7e93b4a..67b4096 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,3 +14,4 @@ container_config: additional_packages: [] lxc_cache_directory: "/home/{{ ansible_user_id }}/lxc" #lxc_cache_profiles: "{{ test_profiles | map(attribute='profile') | list }}" +lxc_use_overlayfs: yes diff --git a/tasks/main.yml b/tasks/main.yml index ec2b701..77abcd1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -168,8 +168,8 @@ lxc_container: name: "{{ item.0.prefix | default(item.0.profile) }}" clone_name: "{{ item.0.prefix | default(item.0.profile + '-') }}{{ item.1 }}" - clone_snapshot: true - backing_store: overlayfs + clone_snapshot: "{{ True if lxc_use_overlayfs else False }}" + backing_store: "{{ 'overlayfs' if lxc_use_overlayfs else 'dir' }}" state: stopped register: __clone_jobs async: 7200 @@ -221,7 +221,7 @@ - name: Populate every container's /etc/hosts with every container's addresses template: src: hosts.j2 - dest: "/var/lib/lxc/{{ item.name }}/delta0/etc/hosts" + dest: "/var/lib/lxc/{{ item.name }}/{{ 'delta0' if lxc_use_overlayfs else 'rootfs' }}/etc/hosts" with_items: "{{ lxc_hosts }}" become: true diff --git a/tests/deploy_v0.6_compat.yml b/tests/deploy_v0.6_compat.yml index 1fde76e..dd3a9db 100644 --- a/tests/deploy_v0.6_compat.yml +++ b/tests/deploy_v0.6_compat.yml @@ -8,3 +8,4 @@ - make - m4 host_quantity: 2 + lxc_use_overlayfs: no