We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think this line defaults to string false
controller_configuration_schedules_enforce_defaults: "{{ controller_configuration_enforce_defaults | default('false') }}"
While it should be
controller_configuration_schedules_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(False) }}"
otherwise, when using infra.controller_configuration 2.4.0, unless explicitly specifying "controller_configuration_enforce_defaults: false" in the vars it will enable default vars and not omit the arguments sent to the awx.awx module, like for example here: https://github.com/redhat-cop/controller_configuration/blob/devel/roles/schedules/tasks/main.yml#L22
Test playbook:
--- - name: Test playbook hosts: localhost connection: local become: false gather_facts: false vars: controller_configuration_schedules_enforce_defaults1: "{{ controller_configuration_enforce_defaults | default('false') }}" controller_configuration_schedules_enforce_defaults2: "{{ controller_configuration_enforce_defaults | default(False) }}" object1: diff_mode: "{{ __controller_schedule_item.diff_mode | default(( false if controller_configuration_schedules_enforce_defaults1 else omit)) }}" name: object1 object2: diff_mode: "{{ __controller_schedule_item.diff_mode | default(( false if controller_configuration_schedules_enforce_defaults2 else omit)) }}" name: object2 tasks: - debug: var: object1 - debug: var: object2
Output:
PLAY [Test playbook] ************************************************************************************************************************************************************************************************ TASK [debug] ******************************************************************************************************************************************************************************************************** ok: [localhost] => { "object1": { "diff_mode": false, "name": "object1" } } TASK [debug] ******************************************************************************************************************************************************************************************************** ok: [localhost] => { "object2": { "diff_mode": "__omit_place_holder__f8197d087546fe8b2e090dfab350352fd2126b5a", "name": "object2" } }
The text was updated successfully, but these errors were encountered:
redhat-cop#630 - Fix default for enforce_defaults
1c4f5a7
#630 - Fix default for enforce_defaults (#631)
ab7b572
redhat-cop#630 - Fix default for enforce_defaults (redhat-cop#631)
537eb52
Successfully merging a pull request may close this issue.
I think this line defaults to string false
While it should be
otherwise, when using infra.controller_configuration 2.4.0, unless explicitly specifying "controller_configuration_enforce_defaults: false" in the vars it will enable default vars and not omit the arguments sent to the awx.awx module, like for example here:
https://github.com/redhat-cop/controller_configuration/blob/devel/roles/schedules/tasks/main.yml#L22
Test playbook:
Output:
The text was updated successfully, but these errors were encountered: