apigbanLab / nascence

0 stars 0 forks source link

Vague grouping/naming when dynamic inventory script is ran #1

Open apigban opened 1 year ago

apigban commented 1 year ago

Inventory doesn't show if the instance is a k3s server, agent or external datastore instance. InstancePool and InstanceConfiguration identifiers are used but it isn't human-readable.

apigban@XXXXXXXXXXX:~/projects/nascence$ ansible-inventory -i nascence.oci.yaml --graph
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
@all:
  |--@ChLp_ME-DUBAI-1-AD-1:
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |--@Oracle-Tags#CreatedBy=terraform:
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |--@Oracle-Tags#CreatedOn=2023-01-09T17_50_09.869Z:
  |  |--XXX.XXX.XXX.XXX
  |--@Oracle-Tags#CreatedOn=2023-01-09T17_50_40.986Z:
  |  |--XXX.XXX.XXX.XXX
  |--@Oracle-Tags#CreatedOn=2023-01-09T17_50_59.672Z:
  |  |--XXX.XXX.XXX.XXX
  |--@all_hosts:
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |--@XXX.XXX.XXX.XXX:
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |--@region_me-dubai-1:
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instanceconfiguration=
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instanceconfiguration=
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instanceconfiguration=
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instancepool=
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instancepool=
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instancepool=
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instancepool_opcretrytoken=2d8df378-f41d-417c-a16e-f047b7a5b701:
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instancepool_opcretrytoken=71f6fe07-6ec7-4abf-b242-0d712c8e3b49:
  |  |--XXX.XXX.XXX.XXX
  |--@tag_oci_compute_instancepool_opcretrytoken=810d0e24-b139-4aaa-a9d7-2bc7ded571a1:
  |  |--XXX.XXX.XXX.XXX
  |--@ungrouped:
apigban commented 1 year ago

Fixed by https://github.com/apigbanLab/valence/pull/15

apigban@XXXXXXXXXXX:~/projects/nascence$ ansible-inventory -i nascence.oci.yaml --graph
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
@all:
...
  |--@tag_role=controlplane:
  |  |--XXX.XXX.XXX.XXX
  |  |--XXX.XXX.XXX.XXX
  |--@tag_role=external_datastore:
  |  |--XXX.XXX.XXX.XXX
  |--@tag_role=worker:
  |  |--XXX.XXX.XXX.XXX