Kaynağa Gözat

current

master
ebeveyn
işleme
33c2340500
3 değiştirilmiş dosya ile 66 ekleme ve 0 silme
  1. +7
    -0
      tasks/main.yaml
  2. +18
    -0
      tasks/setup_Debian.yml
  3. +41
    -0
      vars/main.yaml

+ 7
- 0
tasks/main.yaml Dosyayı Görüntüle

@@ -1 +1,8 @@
---

- include: setup_{{ ansible_distribution }}.yml

- name: lxd init
command: lxd init --preseed
vars:
stdin: "{{ lxd_config | to_json }}"

+ 18
- 0
tasks/setup_Debian.yml Dosyayı Görüntüle

@@ -0,0 +1,18 @@
---

- name: apt pkg snapd
apt:
pkg: snapd
register: _apt_snapd

- name: snap install lxd
command: snap install lxd
register: _snap_install_lxd
changed_when: not "is already installed" in _snap_install_lxd.stderr

# - name: snap lxd
# snap:
# name: lxd

- reboot:
when: _apt_snapd.changed

+ 41
- 0
vars/main.yaml Dosyayı Görüntüle

@@ -1 +1,42 @@
---
lxd_config:

# Daemon settings
config:
#core.https_address: 192.168.1.1:9999
#core.trust_password: sekret
images.auto_update_interval: 6

# Storage pools
storage_pools:
- name: data
driver: zfs
config:
source: my-zfs-pool/my-zfs-dataset

# Network devices
networks:
- name: lxd-my-bridge
type: bridge
config:
ipv4.address: auto
ipv6.address: none

# Profiles
profiles:
- name: default
devices:
root:
path: /
pool: data
type: disk
- name: test-profile
description: "Test profile"
config:
limits.memory: 2GB
devices:
test0:
name: test0
nictype: bridged
parent: lxd-my-bridge
type: nic

Yükleniyor…
İptal
Kaydet