gliech.incus_client

Incus Client Ansible Role

This Ansible role helps you install Incus and set up other hosts as remotes from your Ansible inventory.

Requirements

To use this role, you need to have the Incus remote hosts listed in the same inventory as the clients. This is necessary because it uses Ansible connections to securely transfer client certificates to the remote servers.

If you are setting up the Incus servers in the same playbook as the clients, you must install the servers first before this role can run.

Role Variables

Here’s a table of the variables you can use with this role:

Name Required Type Description
incus_client_remotes yes list(string) A list of hostnames in your Ansible inventory for machines that should be set up as Incus remotes. The Ansible user on these machines must belong to the incus group to configure client certificates. Example: "{{ groups.incus_servers }}"
incus_client_default_remote no string The name of an Incus remote to set as the default in the client configuration. Defaults to the first entry in the incus_client_remotes variable. Default: incus_client_remotes[0]
incus_client_users no list(string) A list of OS users on the client machines who need access to the Incus remotes. If not provided, only the Ansible user will be set up to access the remotes. Default: ["{{ ansible_user_id }}"]

Dependencies

There are no dependencies.

Example Playbook

Here is an example playbook demonstrating how to configure Incus servers and clients:

- hosts: incus_servers
  tasks:
    - name: Configure Incus servers
      ansible.builtin.import_role:
        name: gliech.incus
      vars:
        incus_config:
          config: {}
          networks: []
          storage_pools:
            - config:
                source: /var/lib/incus/storage-pools/default
              description: ""
              name: default
              driver: dir
          profiles:
            - config:
                security.privileged: "true"
              description: Default Incus profile
              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: Default Incus project
              name: default

- hosts: localhost
  tasks:
    - name: Configure Incus client
      ansible.builtin.import_role:
        name: gliech.incus_client
      vars:
        incus_client_remotes: "{{ groups.incus_servers }}"

License

This project is licensed under the GNU General Public License v3.0.

Informazioni sul progetto

Install Incus and configure one or more other hosts from the Ansible inventory as remotes.

Installa
ansible-galaxy install gliech.incus_client
Licenza
gpl-3.0
Download
78.9k
Proprietario