Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Add lxc_use_overlayfs variable for configuring OverlayFS
Browse files Browse the repository at this point in the history
  • Loading branch information
lae committed Apr 23, 2018
1 parent ae49aea commit 20869c3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------

Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/deploy_v0.6_compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
- make
- m4
host_quantity: 2
lxc_use_overlayfs: no

0 comments on commit 20869c3

Please sign in to comment.