algunas cosas de zfs

This commit is contained in:
felix 2022-09-29 18:20:55 -03:00
parent 08b37b1b95
commit e4fd6a4e85
4 changed files with 55 additions and 17 deletions

View File

@ -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"
terraform_default_path: "~/.local/bin"

View File

@ -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"
network_default_name: "bridge1"

View File

@ -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"
features.storage.volumes: "true"