-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
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
Update docs for v2.4: Roadmap, new Schema to CLI generation, Ansible plugin #407
Conversation
Foresight Summary View More Details✅ CI workflow has finished in 26 seconds and finished at 20th Feb, 2023.
*You can configure Foresight comments in your organization settings page. |
|
||
# Ansible | ||
|
||
### Example `bitops.config.yaml`, minimum required: | ||
``` | ||
```yaml | ||
ansible: | ||
cli: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something seems wrong with this schema..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything specific that's wrong in this schema?
That's the empty schema example we allow for any plugin.
Here is from Terraform: https://bitops.sh/tool-configuration/configuration-terraform/#example-bitopsconfigyaml-minimum-required
Maybe it's good to make it even smaller for a quick start defaults like
ansible: {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my apologies. I just noticed the below YAML isn't a continuation it's a different block entirely.
docs/configuration-base.md
Outdated
## Magic Environemnt Variables | ||
Plugin environment variables are automatically mapped to the `bitops.config.yaml` keys. This means that you can use the same environment variable names as in the plugin config. For example, if you want to override the `ansible.cli.skip-tags` value, you can use the `BITOPS_ANSIBLE_SKIP_TAGS` environment variable. In this case, `BITOPS` is the prefix, `ANSIBLE` is the plugin name, and `SKIP_TAGS` is the key name (note hypens are replaced with underscores). | ||
|
||
The precedence order is: `ENV` vars > `bitops.config.yaml` values > `bitops.config.schema.yaml` defaults. This way, ENV variables specified by user are taking highest precedence over config values and defaults. We recommend using them dynamically in CI/CD pipelines to control the deployment based on condition (PR run, branch, etc) or manually passing to the the BitOps docker container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking for feedback on this ^^
Is there any better naming for the Magic Environment Variables
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with Environment Variables Defaulting
per @PhillypHenning
# CLI properties will composed into a CLI string and exported as "${BITOPS_MY_PLUGIN_CLI}" | ||
cli: | ||
type: object | ||
properties: | ||
# positional argument, if no `parameter` set | ||
# ex: "run" | ||
command: | ||
type: string | ||
default: run | ||
required: true | ||
# cli argument | ||
# ex: "--key=value" | ||
key: | ||
parameter: key | ||
type: string | ||
# boolean flag, set if value is `true` | ||
# ex: "--bar" | ||
bar: | ||
parameter: bar | ||
type: boolean | ||
default: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New schema to CLI example
Update documentation following the #403 and bitops-plugins/ansible#11