gliech.lxd

[LXDサーバーAnsibleロール]

テスト & リリース

このAnsibleロールは、OSのパッケージマネージャーからLXDをインストールし、プレシードオブジェクトを使用して設定します。

要件

特になし。

ロール変数

名前必須タイプ / 選択肢説明
lxd_config はい オブジェクト

LXDプレシード設定オブジェクト。詳細については、LXDのドキュメントを参照してください。冪等性チェックが正しく機能するためには、lxd init --dumpによって出力される値を省略しないようにしてください。このロールは、その出力とこの変数の違いを使って変更を検出します。

例:

config: {}
networks:
  - config:
      ipv4.address: none
      ipv4.nat: "true"
      ipv6.address: none
      ipv6.nat: "true"
    description: ""
    name: lxdbr0
    type: bridge
    project: default
storage_pools:
  - config:
      source: /var/lib/lxd/storage-pools/default
    description: ""
    name: default
    driver: dir
profiles:
  - config:
      security.idmap.isolated: "true"
    description: デフォルトのLXDプロファイル
    devices:
      eth0:
        name: eth0
        network: lxdbr0
        type: nic
      root:
        path: /
        pool: default
        type: disk
    name: default
projects:
  - config:
      features.images: "true"
      features.networks: "true"
      features.networks.zones: "true"
      features.profiles: "true"
      features.storage.buckets: "true"
      features.storage.volumes: "true"
    description: デフォルトのLXDプロジェクト
    name: default
lxd_extra_users いいえ リスト(文字列)

このロールは常にansibleユーザーをlxdグループに追加します。これにより、lxdのunixソケットと通信して、このロール内のいくつかのタスクを実行できるようになります。オプションでこの変数を使用して、グループに追加する他のユーザー名を指定できます。

デフォルト: []

lxd_subid_offset いいえ 整数

/etc/subuid/etc/subgidにそれぞれ構成されたサブオーディネートユーザーIDおよびサブオーディネートグループIDのオフセット。

デフォルト: 1000000

lxd_subid_range いいえ 整数

/etc/subuid/etc/subgidにそれぞれ構成されたサブオーディネートユーザーIDおよびサブオーディネートグループIDの範囲。

デフォルト: 6553600

依存関係

特になし。

例 プレイブック

- hosts: container_host
  tasks:
    - ansible.builtin.import_role:
        name: gliech.lxd
      vars:
        lxd_config:
          config: {}
          networks: []
          storage_pools:
            - config:
                source: /var/lib/lxd/storage-pools/default
              description: ""
              name: default
              driver: dir
          profiles:
            - config:
                security.privileged: "true"
              description: デフォルトのLXDプロファイル
              devices:
                root:
                  path: /
                  pool: default
                  type: disk
              name: default
          projects:
            - config:
                features.images: "true"
                features.networks: "true"
                features.networks.zones: "true"
                features.profiles: "true"
                features.storage.buckets: "true"
                features.storage.volumes: "true"
              description: デフォルトのLXDプロジェクト
              name: default

ライセンス

このプロジェクトは、GNU一般公衆ライセンス v3.0 の条件の下でライセンスされています。

プロジェクトについて

Install lxd from the os package manager and configure it using a preseed object.

インストール
ansible-galaxy install gliech.lxd
ライセンス
gpl-3.0
ダウンロード
277
所有者