Skip to content

Commit 90c2ff3

Browse files
committed
Initial commit
0 parents  commit 90c2ff3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3531
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To reproduce**
14+
Steps to reproduce the behavior:
15+
1. Deploy NGINX Config role using playbook.yml
16+
2. View output/logs/configuration on '...'
17+
3. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Your environment:**
23+
- Version of the NGINX Config Role or specific commit
24+
- Version of Ansible
25+
- Target deployment platform
26+
27+
**Additional context**
28+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### Proposed changes
2+
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).
3+
4+
### Checklist
5+
Before creating a PR, run through this checklist and mark each as complete.
6+
7+
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-role-nginx-config/blob/master/CONTRIBUTING.md) document
8+
- [ ] I have added Molecule tests that prove my fix is effective or that my feature works
9+
- [ ] I have checked that all Molecule tests pass after adding my changes
10+
- [ ] I have updated any relevant documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`)

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Any private crt and keys #
2+
############################
3+
*.crt
4+
*.key
5+
*~
6+
\#*
7+
8+
# OS Specific
9+
Thumbs.db
10+
.DS_Store
11+
.vscode
12+
13+
# Ansible specific
14+
*.retry
15+
16+
# Python specific
17+
__pycache__

.travis.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
language: python
3+
services: docker
4+
jobs:
5+
include:
6+
- name: "(Debian/Ubuntu) Test config templates"
7+
env:
8+
scenario: default
9+
- name: "(Alpine) Test config templates"
10+
env:
11+
scenario: default_alpine
12+
- name: "(CentOS) Test config templates"
13+
env:
14+
scenario: default_centos
15+
- name: "(Debian/Ubuntu) Install Modules"
16+
env:
17+
scenario: module
18+
- name: "(Alpine) Install Modules"
19+
env:
20+
scenario: module_alpine
21+
- name: "(CentOS) Install Modules"
22+
env:
23+
scenario: module_centos
24+
- name: "(Debian/Ubuntu) Install Stable Branch and Push Configuration"
25+
env:
26+
scenario: stable_push
27+
- name: "(Alpine) Install Stable Branch and Push Configuration"
28+
env:
29+
scenario: stable_push_alpine
30+
- name: "(CentOS) Install Stable Branch and Push Configuration"
31+
env:
32+
scenario: stable_push_centos
33+
before_install: sudo apt-get -qq update
34+
install:
35+
- pip install ansible==2.9.11
36+
- pip install molecule==3.0.6
37+
- pip install docker==4.2.2
38+
- pip install ansible-lint==4.2.0
39+
script:
40+
- molecule --version
41+
- ansible --version
42+
- travis_wait 50 molecule test -s $scenario
43+
notifications:
44+
webhooks: https://galaxy.ansible.com/api/v1/notifications/

.yamllint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
braces:
6+
max-spaces-inside: 1
7+
level: error
8+
brackets:
9+
max-spaces-inside: 1
10+
level: error
11+
comments-indentation: disable
12+
line-length: disable
13+
truthy: disable

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 0.1.0 (Unreleased)
4+
5+
Initial release of the NGINX Config role. Contains all NGINX Config related features previously available on the [NGINX Ansible role](https://github.com/nginxinc/ansible-role-nginx).

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing Guidelines
2+
3+
The following is a set of guidelines for contributing to the NGINX Ansible role. We really appreciate that you are considering contributing!
4+
5+
#### Table Of Contents
6+
7+
[Ask a Question](#ask-a-question)
8+
9+
[Getting Started](#getting-started)
10+
11+
[Contributing](#contributing)
12+
13+
[Code Guidelines](#code-guidelines)
14+
* [Git Guidelines](#git-guidelines)
15+
* [Ansible Guidelines](#ansible-guidelines)
16+
17+
[Code of Conduct](https://github.com/nginxinc/ansible-role-nginx-config/blob/master/CODE_OF_CONDUCT.md)
18+
19+
## Ask a Question
20+
21+
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`.
22+
23+
## Getting Started
24+
25+
Follow our [Installation Guide](https://github.com/nginxinc/ansible-role-nginx-config/blob/master/README.md#Installation) to install Ansible and Molecule and get ready to use the NGINX Ansible role.
26+
27+
### Project Structure
28+
29+
* The NGINX Ansible role is written in `yaml` and supports NGINX Open Source and NGINX Plus.
30+
* The project follows the standard [Ansible role directory structure](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html)
31+
* The main code is found in `tasks/`
32+
* The main variables can be found in `defaults/main/*.yml`
33+
* Configuration templates for NGINX can be found in `templates/`
34+
* [Molecule](https://molecule.readthedocs.io/) tests can be found in `molecule/`.
35+
* CI/CD is done via Travis using `.travis.yml` deployment yaml files
36+
37+
## Contributing
38+
39+
### Report a Bug
40+
41+
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.
42+
43+
### Suggest an Enhancement
44+
45+
To suggest an enhancement, please create an issue on GitHub with the label `enhancement` using the available feature issue template.
46+
47+
### Open a Pull Request
48+
49+
* Fork the repo, create a branch, submit a PR when your changes are **tested** (ideally using Molecule) and ready for review
50+
* Fill in [our pull request template](https://github.com/nginxinc/ansible-role-nginx-config/blob/master/.github/PULL_REQUEST_TEMPLATE.md)
51+
52+
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.
53+
54+
## Code Guidelines
55+
56+
### Ansible Guidelines
57+
58+
* Run `molecule lint` over your code to automatically resolve a lot of `yaml` and Ansible style issues.
59+
* Run `molecule test --all` on your code before you submit a PR to catch any potential issues.
60+
* Follow these guides on some good practices for Ansible:
61+
* <https://www.ansible.com/blog/ansible-best-practices-essentials>
62+
* <https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html>
63+
64+
### Git Guidelines
65+
66+
* Keep a clean, concise and meaningful git commit history on your branch (within reason), rebasing locally and squashing before submitting a PR
67+
* Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/> and summarised in the next few points
68+
* In the subject line, use the present tense ("Add feature" not "Added feature")
69+
* In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...")
70+
* Limit the subject line to 72 characters or less
71+
* Reference issues and pull requests liberally after the subject line
72+
* Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in your text editor to write a good message instead of `git commit -am`)

0 commit comments

Comments
 (0)