After endless troubleshooting just a note to myself and other people who facing this strange issue. Google does not index the Tower / AWX pages pretty well. Since Ansible Tower 3.0.0 you need the specify the extra_vars in the survey otherwise the extra_vars parameter will be ignored. You can read more about this here .
You can add vars in your survey like this:
In PowerShell it looks like this:
More information about how to script against the AWX Rest api you can find here.
1 2 3 4 5 6 7 8 9 10 11 12 |
$myObj = [PSCustomObject]@{ month = "$month" } $myObject = [PSCustomObject]@{ limit = "$SystemName" extra_vars = $myObj } $JBody = $myObject | ConvertTo-Json $jobId = Get-AnsibleJobTemplate -Name $JobTemplate Invoke-AnsibleRequest -fullpath "/api/v2/job_templates/$($jobid.id)/launch/" -Method POST -Body $JBody |