diff --git a/Playbooks/01-UBUNTU-LXD.yml b/Playbooks/01-UBUNTU-LXD.yml index b22a06a..8fa9f65 100644 --- a/Playbooks/01-UBUNTU-LXD.yml +++ b/Playbooks/01-UBUNTU-LXD.yml @@ -4,22 +4,59 @@ gather_facts: true tags: - deploy - become: false + become: true tasks: - - name: Update, Upgrade & Install dependencies - become: true - block: - - apt: update_cache=yes upgrade=full - - package: name="{{item}}" state=present - with_items: - #- ansible - - lxc - - zfsutils-linux - - unzip - - shell: python3 -m pip install --upgrade pip +# - name: Update, Upgrade & Install dependencies +# become: true +# block: +# - apt: update_cache=yes upgrade=full +# - package: name="{{item}}" state=present +# with_items: +# #- ansible +# - lxc +# - zfsutils-linux +# - unzip +# - shell: python3 -m pip install --upgrade pip +# - include_role: name=mrlesmithjr.zfs +# vars: +# zfs_create_pools: true +# zfs_pools: +# - name: lxd_pool +# devices: +# - xvdb +# type: basic +# state: present +# compression: lz4 +# action: create - #- include_role: name=init_lxd + - include_role: name=rjlasko.ansible.lxd + vars: + lxd: + host: + preseed: + networks: [] + storage_pools: + - name: default + description: "default storage pool (zfs)" + driver: zfs + config: + source: "lxd_pool/containers" + profiles: + - name: default + description: "default profile" + config: {} + devices: + root: + path: / + pool: default + type: disk + eth0: + name: eth0 + nictype: bridged + parent: br0 + type: nic + - include_role: name=install_terraform vars: terraform_version: latest - terraform_default_path: "~/.local/bin" \ No newline at end of file + terraform_default_path: "~/.local/bin" diff --git a/Playbooks/roles/init_lxd/defaults/main.yml b/Playbooks/roles/init_lxd/defaults/main.yml index 1267aec..a474e2a 100644 --- a/Playbooks/roles/init_lxd/defaults/main.yml +++ b/Playbooks/roles/init_lxd/defaults/main.yml @@ -10,5 +10,6 @@ lxd_project_name: "default" storage_pool_name: "default" storage_pool_driver: "zfs" storage_pool_size: "20GB" +storage_pool_source: "/dev/xvdb" # - Network -network_default_name: "bridge1" \ No newline at end of file +network_default_name: "bridge1" diff --git a/Playbooks/roles/init_lxd/templates/default_config.yml.j2 b/Playbooks/roles/init_lxd/templates/default_config.yml.j2 index f059626..5856ffb 100644 --- a/Playbooks/roles/init_lxd/templates/default_config.yml.j2 +++ b/Playbooks/roles/init_lxd/templates/default_config.yml.j2 @@ -20,7 +20,7 @@ storage_pools: driver: {{storage_pool_driver}} config: size: {{storage_pool_size}} - source: /var/snap/lxd/common/lxd/disks/default.img + source: {{storage_pool_source}} # -- profiles: @@ -42,4 +42,4 @@ projects: features.images: "true" features.networks: "true" features.profiles: "true" - features.storage.volumes: "true" \ No newline at end of file + features.storage.volumes: "true" diff --git a/Playbooks/roles/install_terraform/filter_plugins/__pycache__/sort_versions.cpython-39.pyc b/Playbooks/roles/install_terraform/filter_plugins/__pycache__/sort_versions.cpython-39.pyc new file mode 100644 index 0000000..00d5ebb Binary files /dev/null and b/Playbooks/roles/install_terraform/filter_plugins/__pycache__/sort_versions.cpython-39.pyc differ