Conversation
Foresight Summary
View More Details✅ CI workflow has finished in 51 seconds and finished at 17th Feb, 2023.
*You can configure Foresight comments in your organization settings page. |
0a64a7f to
fde4db8
Compare
|
Could you add a README / doc update to explain the |
scripts/plugins/deploy_plugins.py
Outdated
| # Compose a CLI and export it as "BITOPS_{PLUGIN_NAME}_CLI}" | ||
| cli = PluginConfigCLI(cli_config_list).get_command() | ||
| os.environ[f"BITOPS_{plugin_name.upper()}_CLI"] = cli | ||
| logger.debug(f"Exported CLI: {cli}") |
There was a problem hiding this comment.
Keeping in line with almost all other log event in BitOps I would suggest you change {} to []
| logger.debug(f"\n\t\tKEY [{key}] \n\t\tRESULT FOUND: [{obj}]") | ||
| return obj | ||
|
|
||
| @staticmethod |
For every plugin config property, there is an associated ENV variable name that could be used to override the value. Config `ansible.properties.options.verbosity` => `BITOPS_ANSIBLE_VERBOSITY`
PhillypHenning
left a comment
There was a problem hiding this comment.
It would be ideal if we could add a blurb about using this new behavior in the local development devops.sh doc
|
The new "magic" ENV behavior and CLI should be documented for sure, I have it as a checklist item in the #403 (comment). Thinking about merging the functionality first to have the |
Closes #360
This adds basic implementation to compose a CLI command based on plugin config values and pass it as an ENV variable.
An example Ansible plugin bitops-plugins/ansible#11 refactored to use this functionality:
UPDATE:
Users should be able to override the config value based on magically-assumed input ENV for each config setting.
So for
ansible.properties.options.dry-runschema keyBITOPS_ANSIBLE_DRY_RUNis the magic variable.The value precedence is:
ENV > BitOps Config > Plugin Defaults.TODO: