ansible / awx-resource-operator

43 stars 34 forks source link

Define ansible inventory #125

Closed cooktheryan closed 1 year ago

rooftopcellist commented 1 year ago

There appears to be an issue with the CSV generation when running make bundle, these two CRD's don't get populated:

    - kind: AnsibleInstanceGroup
      name: ansibleinstancegroups.tower.ansible.com
      version: v1alpha1
    - kind: AnsibleInventory
      name: ansibleinventories.tower.ansible.com
      version: v1alpha1
    - description: Launch a new job via awx

There should be x-descriptors, etc. (they exist in config/manifests/bases/csv, but not in the generated bundle/manifests/crd)

The InstanceGroup one is already fixed in devel if you rebase, that should render now. It looks like the AnsibleInventory CSV x-descriptors and params still need to be added for AnsibleInventory in config/manifests/bases/awx-resource-operator.clusterserviceversion.yaml

rooftopcellist commented 1 year ago

Aside from the CSV params missing, this PR works as expected. After building and deploying the operator from this PR, I am able to apply the following yaml and an inventory is created in my AWX instance.

$ cat hacking/create-inventory.yml 
apiVersion: tower.ansible.com/v1alpha1
kind: AnsibleInventory
metadata:
  name: inventory-new-2
spec:
  connection_secret: awxaccess
  description: My New Inventory Test
  name: newinventory2
  organization: Default
  state: present
  instance_groups: default

image