From e4fd6a4e85ca7d122d4fa2a6f6e87064858e92b1 Mon Sep 17 00:00:00 2001 From: felix Date: Thu, 29 Sep 2022 18:20:55 -0300 Subject: [PATCH] algunas cosas de zfs --- Playbooks/01-UBUNTU-LXD.yml | 65 ++++++++++++++---- Playbooks/roles/init_lxd/defaults/main.yml | 3 +- .../init_lxd/templates/default_config.yml.j2 | 4 +- .../__pycache__/sort_versions.cpython-39.pyc | Bin 0 -> 933 bytes 4 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 Playbooks/roles/install_terraform/filter_plugins/__pycache__/sort_versions.cpython-39.pyc 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 0000000000000000000000000000000000000000..00d5ebbff4b416a13288c47043ddc0c79faaeb99 GIT binary patch literal 933 zcmZuw!EV$r5VaF;5|&*Fr1qX`q$+89Mo@$Vmr@}ramdBW#@;qvCthr)+FkY5Uikz* zfM1HZaYEw2nG1}abhQ;7X~rJUWZrn5Q%t901oHjsui0;m&=2eE3IXQ?R3Ct0C`Sx4 zPvF|iJ&c&o$Q{c4cZiKxaEDmH$*rG{Sa^<-XtRGVm5EDPF9l!4*IemJHu@(NLJ96B zr&4PEsXr|NdnRI2^fQJkiiUp@u04^NyhOYuNz&>1dn-R)Osna#>DfsDGlJb z9Dwl`e4Th*prIGeln3SDbaY*amVZMk0RPWLb}4I~&AF&nS<%z%_Jce_hd7M-j=H2rUuo28B=q7Jn8}B7+1>d~dPU}%RVo@!4e3%{` zrpE_%O^@6HyJPodK7G*be@t1n98>llH|PpM4|tPqQ7u&;xoK4sn@b+sVw}Zp{(74P zlsw&;4Y)*eF?aOzCWPu;*yredaE6g>_I7WZ4hd&T*hQ2!Ma?Pg#+24>7_gsE`nfH{ z5D6(|vZT}vUfEwk*$20SYj342xOxI+3aTwh5hjHECB&VcC4qVdhuw2lY15iY=yagn hJvdjr3*_vIm&SeZ7(f@j=(~JrN2)C_@g{y0{sVqI