Skip to content

[foreman] add backwards support for ssl_verify in foreman plugin - #7360

Merged
softwarefactory-delete-me[bot] merged 1 commit into
ansible:develfrom
jladdjr:foreman_backwards_compat_for_ssl_verify
Jun 17, 2020
Merged

softwarefactory-delete-me[bot] merged 1 commit into
ansible:develfrom
jladdjr:foreman_backwards_compat_for_ssl_verify

Conversation

@jladdjr

@jladdjr jladdjr commented Jun 16, 2020

Copy link
Copy Markdown

If you wanted to ensure certificates were validated when using the satellite / foreman inventory:

  • the (old) script expected the ssl_verify source_var
  • .. while the plugin expects validate_certs

This PR adds support for the old ssl_verify source_var in the plugin.

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • API
AWX VERSION
awx 12.0.0

@jladdjr
jladdjr requested review from AlanCoding and kdelee June 16, 2020 23:34
@softwarefactory-delete-me

Copy link
Copy Markdown
Contributor

Build failed.


def inventory_as_dict(self, inventory_update, private_data_dir):
ret = super(satellite6, self).inventory_as_dict(inventory_update, private_data_dir)
ret['validate_certs'] = False

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this line, and I'd rather leave it to the plugin's default in this case.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - I thought that since we're advertising the settings in https://github.com/ansible-collections/community.general/blob/master/scripts/inventory/foreman.ini#L124, that it made sense to pin validate_certs to the static value in that file (in case things do change in the plugin).

Then again, I can also see it making sense to follow the plug-in's behavior (and am happy to go either way).

Feel like we're stuck in this weird limbo right now where we want to support backwards compatiblity, but at some point it seems like we'll want to move on and adopt what's in the plugin without managing it / locking it down too much.

* plugin changed option name from
  ssl_verify to validate_cert
@softwarefactory-delete-me

Copy link
Copy Markdown
Contributor

Build succeeded.

@softwarefactory-delete-me

Copy link
Copy Markdown
Contributor

Build succeeded (gate pipeline).

@softwarefactory-delete-me
softwarefactory-delete-me Bot merged commit 9e118b8 into ansible:devel Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants