-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved terraform output, move to GitHub Actions
1 parent
2a3c2f8
commit 68a801c
Showing
24 changed files
with
331 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
--- | ||
|
||
<!-- Please first verify that your issue is not already reported on GitHub --> | ||
<!-- Complete *all* sections as described. --> | ||
|
||
### Summary | ||
|
||
<!-- Explain the problem briefly below --> | ||
|
||
### Issue Type | ||
|
||
- Bug Report | ||
|
||
### Controller Environment and Configuration | ||
|
||
<!-- | ||
Please also include information about the versions of: | ||
- Ansible (ansible --version) | ||
- Python (python --version) | ||
- This role | ||
--> | ||
|
||
```text | ||
``` | ||
|
||
### Steps to Reproduce | ||
|
||
<!-- Describe exactly how to reproduce the problem, using a minimal test-case --> | ||
|
||
<!-- Paste example playbooks or commands between quotes below --> | ||
|
||
```yaml | ||
|
||
``` | ||
|
||
### Expected Result | ||
|
||
<!-- Describe what you expected to happen when running the steps above --> | ||
|
||
```text | ||
``` | ||
|
||
### Actual Result | ||
|
||
<!-- Describe what actually happened. If possible run with extra verbosity (-vvvv) --> | ||
|
||
<!-- Paste verbatim command output between quotes --> | ||
|
||
```text | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
|
||
blank_issues_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
--- | ||
|
||
<!-- Please first verify that your feature was not already discussed on GitHub --> | ||
<!-- Complete *all* sections as described, this form is processed automatically --> | ||
|
||
### Summary | ||
|
||
<!-- Describe the new feature/improvement briefly below --> | ||
|
||
### Issue Type | ||
|
||
- Feature Request | ||
|
||
### User Story | ||
|
||
<!-- If you can, please provide a user story, if you don't know what this is don't worry, it will be refined by PyratLabs. --> | ||
<!-- Describe who would use it, why it is needed and the benefit --> | ||
|
||
_As a_ <!-- (Insert Persona) --> \ | ||
_I want to_ <!-- (Insert Action) --> \ | ||
_So that_ <!-- (Insert Benefit) --> | ||
|
||
### Additional Information | ||
|
||
<!-- Please include any relevant documentation, URLs, etc. --> | ||
<!-- Paste example playbooks or commands between quotes below --> | ||
|
||
```yaml | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## TITLE | ||
|
||
### Summary | ||
|
||
<!-- Describe the change below, including rationale and design decisions --> | ||
|
||
<!-- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> | ||
|
||
### Issue type | ||
|
||
<!-- Pick one below and delete the rest --> | ||
- Bugfix | ||
- Documentation | ||
- Feature | ||
|
||
### Test instructions | ||
|
||
<!-- Please provide instructions for testing this PR --> | ||
|
||
### Acceptance Criteria | ||
|
||
<!-- Please list criteria required to ensure this change has been sufficiently reviewed. --> | ||
|
||
<!-- Example ticklist: | ||
- [ ] GitHub Actions Build passes. | ||
- [ ] Documentation updated. | ||
--> | ||
|
||
### Additional Information | ||
|
||
<!-- Include additional information to help people understand the change here --> | ||
|
||
<!-- Paste verbatim command output below, e.g. before and after your change --> | ||
|
||
```text | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- security | ||
# Label to use when marking an issue as stale | ||
staleLabel: wontfix | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
|
||
name: CI | ||
'on': | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
schedule: | ||
- cron: "0 1 1 * *" | ||
|
||
defaults: | ||
run: | ||
working-directory: "xanmanning.terraform_project" | ||
|
||
jobs: | ||
molecule: | ||
name: Molecule | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- distro: debian10 | ||
scenario: default | ||
- distro: ubuntu2004 | ||
scenario: default | ||
- distro: centos7 | ||
scenario: destroy | ||
- distro: ubuntu1804 | ||
scenario: destroy | ||
- distro: debian9 | ||
scenario: target | ||
- distro: centos8 | ||
scenario: target | ||
|
||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "xanmanning.terraform_project" | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install test dependencies | ||
run: pip3 install -r molecule/requirements.txt | ||
|
||
- name: Run Molecule check | ||
run: molecule check --scenario-name "${{ matrix.scenario }}" | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
MOLECULE_DISTRO: ${{ matrix.distro }} | ||
|
||
- name: Run Molecule test | ||
run: molecule test --scenario-name "${{ matrix.scenario }}" | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
MOLECULE_DISTRO: ${{ matrix.distro }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
|
||
name: Release | ||
'on': | ||
push: | ||
tags: | ||
- '*' | ||
|
||
defaults: | ||
run: | ||
working-directory: "xanmanning.terraform_project" | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "xanmanning.terraform_project" | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install Ansible | ||
run: pip3 install -r requirements.txt | ||
|
||
- name: Trigger a new import on Galaxy | ||
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ vagramt/fetch | |
vagrant/ubuntu-*.log | ||
__pycache__ | ||
*.pyc | ||
.cache |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
roles: | ||
- name: xanmanning.terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
|
||
- name: Display the Terraform Execution Summary | ||
debug: | ||
msg: | ||
- "+---------------------------------------------------------------+" | ||
- "| {{ 'TERRAFORM EXECUTION SUMMARY'.center(61) }} |" | ||
- "+---------------------------------------------------------------+" | ||
- "{{ terraform_exec_result.stdout_lines }}" | ||
|
||
- name: Display the Terraform Output Summary | ||
debug: | ||
msg: | ||
- "+---------------------------------------------------------------+" | ||
- "| {{ 'TERRAFORM OUTPUT SUMMARY'.center(61) }} |" | ||
- "+---------------------------------------------------------------+" | ||
- "{{ terraform_exec_result.outputs }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
|
||
- name: Display the Terraform plan | ||
debug: | ||
msg: | ||
- "+---------------------------------------------------------------+" | ||
- "| {{ 'TERRAFORM PLAN'.center(61) }} |" | ||
- "+---------------------------------------------------------------+" | ||
- "{{ terraform_plan.split('\n') }}" | ||
|
||
- name: Display the Terraform Plan Summary | ||
debug: | ||
msg: | ||
- "+---------------------------------------------------------------+" | ||
- "| {{ 'TERRAFORM PLAN SUMMARY'.center(61) }} |" | ||
- "+---------------------------------------------------------------+" | ||
- "| {{ terraform_plan_summary.center(61) }} |" | ||
- "+---------------------------------------------------------------+" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters