Skip to content

Commit

Permalink
adding set stats feature to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Feb 6, 2025
1 parent 1422467 commit 6c8be35
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
16 changes: 15 additions & 1 deletion collections/awx/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,19 @@ playbooks:
organization:
name: "{{ item.value.organization }}"
type: inventory_source
related:
success_nodes:
- identifier: set-stats
failure_nodes: []
always_nodes: []
- identifier: set-stats
unified_job_template:
organization:
name: "{{ item.value.organization }}"
name: set-stats
type: job_template
credentials: "{{ item.value.credentials }}"
#extra_data: "{{ item.value.extra_data_execute }}"
related:
success_nodes:
- identifier: baseos
Expand All @@ -280,7 +293,8 @@ playbooks:
name: baseos
type: job_template
credentials: "{{ item.value.credentials }}"
extra_data: "{{ item.value.extra_data_baseos}}"
#extra_data: "{{ item.value.extra_data_baseos}}"
extra_data: {}
related:
success_nodes: []
failure_nodes: []
Expand Down
7 changes: 3 additions & 4 deletions collections/awx/surveys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,11 @@ vars:
name: VM count?
description: Choose VM count
required: false
type: multiplechoice
type: integer
variable: vmCount
min: "null"
min: "0"
max: "null"
choices: '["1", "2", "3", "4", "5"]'
default: "1"
default: ""
OS:
name: Which VM OS-template?
description: Choose OS
Expand Down
20 changes: 19 additions & 1 deletion collections/awx/vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,24 @@ vars:
survey_enabled: true
survey_spec: "{{ lookup('file', 'vars/rendered.json') }}"
- name: job-set-stats
file: |
---
job_templates:
stuttgartThings:
name: set-stats
organization: stuttgart-things
inventory: dynamic-inventory-vsphere
project: stuttgart-things
playbook: plays/set-hosts.yaml
credentials: sthings-ssh
executionenv: sthings-ee
state: present
ask_verbosity_on_launch: true
survey_enabled: false
#survey_spec: "{{ lookup('file', 'vars/rendered.json') }}"
- name: job-create-vm-workflow
file: |
---
Expand All @@ -137,7 +155,7 @@ vars:
# target_host, bucket_name can be changed
extra_data_render: "{'target_host': 'localhost', 'bucket_name': 'vspherevm-labul'}"
extra_data_execute: "{'target_host': 'rahul-awx-test', 'bucket_name': 'vspherevm-labul'}"
extra_data_baseos: "{'target_host': 'rahul-awx-as-code'}"
#extra_data_baseos: "{'target_host': 'rahul-awx-as-code'}"
extra_vars: "{'ansible_ssh_retries': 10}"
- name: labul
Expand Down

0 comments on commit 6c8be35

Please sign in to comment.