Skip to content

Commit

Permalink
allow max_hosts to be set to 0 (infinite) if enforce_default is true (#…
Browse files Browse the repository at this point in the history
…848)

If max_hosts > 0 on the Controller, the user cannot set it to zero using the configuration as code. This tweak solve this issue if `controller_configuration_organizations_enforce_defaults` is set to `true`.
  • Loading branch information
w4hf authored Jun 27, 2024
1 parent 2d3358a commit a2b7b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/organizations/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
new_name: "{{ __controller_organizations_item.new_name | default(omit) }}"
description: "{{ __controller_organizations_item.description | default(('' if controller_configuration_organizations_enforce_defaults else omit), true) }}"
custom_virtualenv: "{{ __controller_organizations_item.custom_virtualenv | default(omit, true) }}"
max_hosts: "{{ __controller_organizations_item.max_hosts | default(omit, true) }}"
max_hosts: "{{ __controller_organizations_item.max_hosts | default(( 0 if controller_configuration_organizations_enforce_defaults else omit), true) }}"
instance_groups: "{{ __controller_organizations_item.instance_groups | default(([] if controller_configuration_organizations_enforce_defaults else omit), true) }}"
default_environment: "{{ (__controller_organizations_item.default_environment.name | default(__controller_organizations_item.default_environment | default(__controller_organizations_item.execution_environment | default(omit)))) if (assign_default_ee_to_org is defined and assign_default_ee_to_org) else omit }}"
galaxy_credentials: "{{ (__controller_organizations_item.galaxy_credentials | default(([] if controller_configuration_organizations_enforce_defaults else omit), true)) if (assign_galaxy_credentials_to_org is defined and assign_galaxy_credentials_to_org) else omit }}"
Expand Down

0 comments on commit a2b7b51

Please sign in to comment.