ansible / awx-resource-operator

43 stars 34 forks source link

Added workflow functionality #70

Closed davidtluong closed 2 years ago

davidtluong commented 2 years ago

Added workflow functionality by removing the requirement of job_template_name from the ansiblejob object and adding worfklow_template_name. Also added conditional in the runner role in order to launch workflow.

Resolves: #45

rooftopcellist commented 2 years ago

There is one more linting failure you'll need to fix, just an extra line at the end of the file:

./roles/job_runner/tasks/launch_workflow.yml
  66:1      warning  too many blank lines (1 > 0)  (empty-lines)

After that, if you rebase to pick up this commit, CI should pass for you. https://github.com/ansible/awx-resource-operator/pull/76

rooftopcellist commented 2 years ago

With these changes, a customer will now be able to launch a workflow job template with AnsibleJob yaml like this:

---
apiVersion: tower.ansible.com/v1alpha1
kind: AnsibleJob
metadata:
  generateName: demo-job-1 # generates a unique suffix per 'kubectl create'
spec:
  tower_auth_secret: controller-access
  workflow_template_name: Test WFJT