From e2a0b44205f230065dcedc6a8a4d1f1f8b1c7b1d Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Sun, 28 Jul 2024 12:27:28 -0800 Subject: [PATCH] docs: Update community docs (#448) --- .github/ISSUE_TEMPLATE/bug_report.md | 24 ++--- .github/ISSUE_TEMPLATE/feature_request.md | 9 +- .github/pull_request_template.md | 11 +-- CHANGELOG.md | 4 + CODE_OF_CONDUCT.md | 101 ++++++++++++---------- CONTRIBUTING.md | 54 ++++++------ .github/SECURITY.md => SECURITY.md | 8 +- SUPPORT.md | 16 ++-- 8 files changed, 122 insertions(+), 105 deletions(-) rename .github/SECURITY.md => SECURITY.md (62%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9b6f4c4b..0653980d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -5,30 +5,32 @@ title: "" labels: "" assignees: "" --- +> [!CAUTION] +> Remember to redact any sensitive information such as authentication credentials or license keys. ### Describe the bug -A clear and concise description of what the bug is. +A clear and concise description of what the bug is: <...> ### To reproduce -Steps to reproduce the behavior: +Steps to reproduce the bug: -1. Deploy the Ansible NGINX configuration role using `playbook.yml` -2. View output/logs/configuration on ... -3. See error +1. I have deployed/run the Ansible NGINX role using the following `playbook.yml`: <...> +2. I have seen the following error(s) on my terminal output/logs: <...> ### Expected behavior -A clear and concise description of what you expected to happen. +A clear and concise description of what you expected to happen: <...> ### Your environment -- Version of the Ansible NGINX configuration role or specific commit -- Version of Ansible -- Version of Jinja2 (if you are using any templating capability) -- Target deployment platform +- Version of the Ansible NGINX role (or specific commit): <...> +- Version of Ansible: <...> +- Version of Jinja2 (if you are using any templating capability): <...> +- How is Ansible being managed (CLI/pipeline/Automation Hub/etc...): <...> +- Target deployment platform(s): <...> -### Additional context +### Additional context (optional) Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index e2242abb..f8def591 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -5,19 +5,18 @@ title: "" labels: "" assignees: "" --- - ### Is your feature request related to a problem? Please describe -A clear and concise description of what the problem is. Ex. I'm always frustrated when ... +A clear and concise description of what the problem is (e.g. I'm always frustrated when ...): <...> ### Describe the solution you'd like -A clear and concise description of what you want to happen. +A clear and concise description of what you would like to happen. ### Describe alternatives you've considered -A clear and concise description of any alternative solutions or features you've considered. +A clear and concise description of any alternative solutions you've considered. -### Additional context +### Additional context (optional) Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 060897d4..3360663e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,12 +1,13 @@ ### Proposed changes -Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR). +Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) in this PR's description or commit message. ### Checklist Before creating a PR, run through this checklist and mark each as complete: -- [ ] I have read the [`CONTRIBUTING`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/CONTRIBUTING.md) document. -- [ ] I have added Molecule tests that prove my fix is effective or that my feature works. -- [ ] I have checked that any relevant Molecule tests pass after adding my changes. -- [ ] I have updated any relevant documentation ([`defaults/main/*.yml`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/defaults/main/), [`README.md`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/README.md) and [`CHANGELOG.md`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/CHANGELOG.md)). +- [ ] I have read the [contributing guidelines](/CONTRIBUTING.md). +- [ ] I have signed the [F5 Contributor License Agreement (CLA)](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md). +- [ ] If applicable, I have added Molecule tests that prove my fix is effective or that my feature works. +- [ ] If applicable, I have checked that any relevant Molecule tests pass after adding my changes. +- [ ] I have updated any relevant documentation ([`defaults/main/*.yml`](/defaults/main/), [`README.md`](/README.md) and [`CHANGELOG.md`](/CHANGELOG.md)). diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d3406e3..72fa4b39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ TESTS: - Update the platforms used in the various Molecule scenarios. - Use the local role name (`ansible-role-nginx-config`) instead of the fully qualified role name (`nginxinc.nginx_config`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand. +DOCUMENTATION: + +- Update community docs per the latest [NGINX template repository](https://github.com/nginxinc/template-repository) guidelines. + CI/CD: - Bump the minimum version of Ansible supported on Ansible Galaxy to `2.16`. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6111a113..e18d3706 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,70 +2,77 @@ ## Our Pledge -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards -Examples of behavior that contributes to creating a positive environment -include: +Examples of behavior that contributes to a positive environment for our community include: -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members +- Demonstrating empathy and kindness toward other people. +- Being respectful of differing opinions, viewpoints, and experiences. +- Giving and gracefully accepting constructive feedback. +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience. +- Focusing on what is best not just for us as individuals, but for the overall community. -Examples of unacceptable behavior by participants include: +Examples of unacceptable behavior include: -- The use of sexualized language or imagery and unwelcome sexual attention or advances -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a professional setting +- The use of sexualized language or imagery, and sexual attention or advances of any kind. +- Trolling, insulting or derogatory comments, and personal or political attacks. +- Public or private harassment. +- Publishing others' private information, such as a physical or email address, without their explicit permission. +- Other conduct which could reasonably be considered inappropriate in a professional setting. -## Our Responsibilities +## Enforcement Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at . All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at . All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, -available at +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at . + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion). -For answers to common questions about this code of conduct, see - +For answers to common questions about this code of conduct, see the FAQ at . Translations are available at . diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8327b51a..61b4c542 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,8 +4,6 @@ The following is a set of guidelines for contributing to the NGINX config Ansibl #### Table Of Contents -[Ask a Question](#ask-a-question) - [Getting Started](#getting-started) [Contributing](#contributing) @@ -15,58 +13,60 @@ The following is a set of guidelines for contributing to the NGINX config Ansibl - [Git Guidelines](#git-guidelines) - [Ansible Guidelines](#ansible-guidelines) -[Code of Conduct](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/CODE_OF_CONDUCT.md) - -## Ask a Question - -Don't know how something works? Curious if the role can achieve your desired functionality? Please open an Issue on GitHub with the label `question`. +[Code of Conduct](/CODE_OF_CONDUCT.md) ## Getting Started -Follow our [Installation Guide](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/README.md#Installation) to install Ansible and Molecule and get ready to use the NGINX config Ansible role. +Follow this project's [Installation Guide](/README.md#Installation) to install Ansible, Ansible Lint, and Molecule and get ready to develop and test the NGINX config Ansible role. ### Project Structure -- The NGINX config Ansible role is written in `yaml` and supports NGINX Open Source and NGINX Plus. +- The NGINX config Ansible role is written in [`yaml`](https://yaml.org) and supports NGINX Open Source, NGINX Plus, NGINX Agent and NGINX Amplify. - The project follows the standard [Ansible role directory structure](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html): - - The main code is found in [`tasks/`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/tasks/). - - Variables can be found in [`defaults/main/`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/defaults/main/). - - "Constant" variables can be found in [`vars/main.yml`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/vars/main.yml). - - Configuration templates for NGINX can be found in [`templates/`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/templates/). - - [Molecule](https://molecule.readthedocs.io/) tests can be found in [`molecule/`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/molecule/). - - CI/CD is done via GitHub actions using the workflow files found in [`.github/workflows/`](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/.github/workflows/). + - The main "codebase" is found in the [`tasks/`](/tasks/) directory. + - Variables can be found in [`defaults/main/`](/defaults/main/). The filenames in this directory highlight which variables are contained in each file. + - "Constant/hardcoded" variables can be found in [`vars/main.yml`](/vars/main.yml). Use this file if you want to create a variable that should not be tweaked by users except in exceptional circumstances. + - Configuration templates for NGINX can be found in the [`templates/`](/templates/) directory. + - [Molecule](https://molecule.readthedocs.io/) tests can be found in the [`molecule/`](/molecule/) directory. Tweak or add new scenarios as necessary. Read the [Molecule docs](https://molecule.readthedocs.io/) and check out the [`default`](/molecule/default/) Molecule scenario to get an idea of how Molecule works in action. + - CI/CD is done via GitHub Actions using the workflow files found in the [`.github/workflows/`](/.github/workflows/) directory. If you create a new Molecule scenario, you will also need to update the [Molecule workflow](/.github/workflows/molecule.yml). ## Contributing ### Report a Bug -To report a bug, open an issue on GitHub with the label `bug` using the available bug report issue template. Please ensure the issue has not already been reported. +To report a bug, open an issue on GitHub with the label `bug` using the available bug report issue template. Please ensure the bug has not already been reported. **If the bug is a potential security vulnerability, please report it using our [security policy](/SECURITY.md).** ### Suggest a Feature or Enhancement -To suggest a feature or enhancement, please create an issue on GitHub with the label `feature` or `enhancement` using the available feature request issue template. +To suggest a feature or enhancement, please create an issue on GitHub with the label `enhancement` using the available [feature request template](/.github/feature_request_template.md). Please ensure the feature or enhancement has not already been suggested. + +### Open a Pull Request (PR) + +- Fork the repo, create a branch, implement your changes, add any relevant tests, and submit a PR when your changes are **tested** (using Molecule) and ready for review. +- Fill in the [PR template](/.github/pull_request_template.md). + +> [!NOTE] +> If you'd like to implement a new feature, please consider creating a [feature request issue](/.github/feature_request_template.md) first to start a discussion about the feature. -### Open a Pull Request +#### F5 Contributor License Agreement (CLA) -- Fork the repo, create a branch, implement your changes, add any relevant Molecule tests, submit a PR when your changes are **tested** (using Molecule) and ready for review. -- Fill in [our pull request template](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/.github/pull_request_template.md). +F5 requires all external contributors to agree to the terms of the F5 CLA (available [here](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md)) before any of their changes can be incorporated into an F5 Open Source repository. -Note: if you'd like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature. +If you have not yet agreed to the F5 CLA terms and submit a PR to this repository, a bot will prompt you to view and agree to the F5 CLA. You will have to agree to the F5 CLA terms through a comment in the PR before any of your changes can be merged. Your agreement signature will be safely stored by F5 and no longer be required in future PRs. ## Code Guidelines ### Ansible Guidelines -- Run `molecule lint` over your code to automatically resolve a lot of `yaml` and Ansible style issues. -- Run `molecule test` on your code before you submit a PR to catch any potential issues. If you are testing a specific molecule scenario, run `molecule test -s `. If you are testing the NGINX Plus scenario (`plus`), you will need to procure an NGINX Plus license (check out the [NGINX Plus developer license FAQ](https://www.nginx.com/developer-license-faqs/) to find out how to request one). -- Follow these guides on some good practices for Ansible: - - - - +- Run `ansible lint` over your code to automatically resolve a lot of `yaml`, `jinja2`, and Ansible style issues. +- Run `molecule test` on your code before you submit a PR to catch any potential issues. If you are testing a specific Molecule scenario, run `molecule test -s `. If you are testing any of the NGINX Plus scenarios (`...-plus`), you will need to procure an NGINX Plus license (check out the [F5 Trials](https://www.f5.com/trials) site to find out how to request one). +- Check out [Ansible's official tips and tricks](https://docs.ansible.com/ansible/latest/tips_tricks/ansible_tips_tricks.html) site for more best practices. ### Git Guidelines - Keep a clean, concise and meaningful git commit history on your branch (within reason), rebasing locally and squashing before submitting a PR. -- Follow the guidelines of writing a good commit message as described here and summarised in the next few points: +- If possible and/or relevant, use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format when writing a commit message, so that changelogs can be automatically generated. +- Follow the guidelines of writing a good commit message as described here and summarized in the next few points: - In the subject line, use the present tense ("Add feature" not "Added feature"). - In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to..."). - Limit the subject line to 72 characters or less. diff --git a/.github/SECURITY.md b/SECURITY.md similarity index 62% rename from .github/SECURITY.md rename to SECURITY.md index 22724d91..4003751b 100644 --- a/.github/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ ### Latest Versions -We advise users to run or update to the most recent release of the Ansible NGINX configuration role. Older versions of this role may not have all enhancements and/or bug fixes applied to them. +We advise users to run or update to the most recent release of this project. Older versions of this project may not have all enhancements and/or bug fixes applied to them. ### Supported Versions @@ -18,9 +18,9 @@ If you find a security vulnerability that directly affects Ansible, we encourage ### Codebase -If you find a security vulnerability that affects the codebase, we encourage you to report it to the F5 Security Incident Response Team (F5 SIRT): +The F5 Security Incident Response Team (F5 SIRT) has an email alias that makes it easy to report potential security vulnerabilities: - If you’re an F5 customer with an active support contract, please contact [F5 Technical Support](https://www.f5.com/services/support). -- If you aren’t an F5 customer, please report any potential or current instances of security vulnerabilities to the F5 SIRT at . +- If you aren’t an F5 customer, please report any potential or current instances of security vulnerabilities with any F5 product to the F5 Security Incident Response Team at . -For more information visit [https://www.f5.com/services/support/report-a-vulnerability](https://www.f5.com/services/support/report-a-vulnerability) +For more information please read the F5 SIRT vulnerability reporting guidelines available at [https://www.f5.com/services/support/report-a-vulnerability](https://www.f5.com/services/support/report-a-vulnerability). diff --git a/SUPPORT.md b/SUPPORT.md index 53c1bfb3..dbdbcbce 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -1,10 +1,10 @@ # Support -We use GitHub for tracking bugs and feature requests related to the Ansible NGINX configuration role. - ## Ask a Question -Don't know how something works? Curious if the Ansible NGINX configuration role can achieve your desired functionality? Please open an issue on GitHub with the label `question`. +We use GitHub for tracking bugs and feature requests related to this project. + +Don't know how something in this project works? Curious if this project can achieve your desired functionality? Please open an issue on GitHub with the label `question`. ## NGINX Specific Questions and/or Issues @@ -14,7 +14,7 @@ This isn't the right place to get support for NGINX specific questions, but the We have a community [Slack](https://nginxcommunity.slack.com/)! -If you are not a member, click [here](https://community.nginx.org/joinslack) to sign up (and let us know if the link does not seem to be working!) +If you are not a member, click [here](https://community.nginx.org/joinslack) to sign up. (Let us know if the link does not seem to be working at !) Once you join, check out the `#beginner-questions` and `nginx-users` channels :) @@ -22,7 +22,7 @@ Once you join, check out the `#beginner-questions` and `nginx-users` channels :) For a comprehensive list of all NGINX directives, check out . -For a comprehensive list of admin and deployment guides for all NGINX products, check out . +For a comprehensive list of administration and deployment guides for all NGINX products, check out . ### Mailing List @@ -30,4 +30,8 @@ Want to get in touch with the NGINX development team directly? Try using the rel ## Contributing -Please see the [contributing guide](https://github.com/nginxinc/ansible-role-nginx-config/blob/main/CONTRIBUTING.md) for guidelines on how to best contribute to this project. +Please see the [contributing guide](/CONTRIBUTING.md) for guidelines on how to best contribute to this project. + +## Community Support + +This project does **not** offer commercial support. Community support is offered on a best effort basis through either GitHub issues/PRs/discussions or via any of our active communities.