1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/changelogs
Simon Deziel c7150dd818
plugins/connection/lxd: convert FQDN to instance name (#7360)
* plugins/connection/lxd: convert FQDN to instance name

This allows to use FQDNs in the inventory and have the
connection driver do the translation when talking to
LXD that uses hostnames (no ".") for instance names.
Those are either globally unique or unique per network/
project in LXD.

```
all:
  # Groups and hosts
  children:
    lxd_dmz:
      vars:
        ansible_lxd_project: dmz
      hosts:
        www01.dmz.example.com:
        www02.dmz.example.com:
```

```
$ lxc list --project dmz
+---------+---------+----------------+------+-----------+-----------+----------+
|  NAME |  STATE  |        IPV4      | IPV6 |   TYPE    | SNAPSHOTS | LOCATION |
+-------+---------+------------------+------+-----------+-----------+----------+
| www01 | RUNNING | 192.0.2.1 (eth0) |      | CONTAINER | 0         | t1       |
+-------+---------+------------------+------+-----------+-----------+----------+
| www02 | RUNNING | 192.0.2.2 (eth0) |      | CONTAINER | 0         | t3       |
+-------+---------+------------------+------+-----------+-----------+----------+
```

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>

* plugins/connection/lxd: VMs/containers are called instances

Update error string parsing to support the new format:

  $ lxc stop c1 -- true
  $ lxc exec c1 -- true
  Error: Instance is not running

  $ lxc exec does-not-exist -- true
  Error: Instance not found

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>

* plugins/connection/lxd: add changelog fragment

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>

---------

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
2023-10-25 08:47:27 +02:00
..
fragments plugins/connection/lxd: convert FQDN to instance name (#7360) 2023-10-25 08:47:27 +02:00
.gitignore Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
changelog.yaml After branching stable-7, prepare for the next major release cycle. 2023-05-09 21:45:10 +02:00
changelog.yaml.license Make reuse conformant (#5138) 2022-08-21 08:27:01 +02:00
config.yaml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00