Add a server at sn10 #46
Workflow file for this run
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
name: pull-request | |
on: | |
pull_request: | |
permissions: read-all | |
env: | |
BUCKET_TF_STATE: ${{ secrets.BUCKET_TF_STATE}} | |
jobs: | |
pull-request: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # @v4 | |
- name: Setup Terraform with specified version on the runner | |
uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # @v3 | |
with: | |
terraform_version: 1.8.3 | |
- name: Terraform format | |
id: fmt | |
run: terraform fmt -check | |
working-directory: ./terraform/ | |
- name: Run Checkov action | |
id: checkov | |
uses: bridgecrewio/checkov-action@0549dc60bddd4c55cb85c6c3a07072e3cf2ca48e | |
with: | |
skip_check: CKV_DOCKER_2,CKV_DOCKER_3,CKV_SECRET_6,CKV2_ANSIBLE_3 | |
quiet: true | |
output_format: cli,sarif | |
output_file_path: console,results.sarif | |
download_external_modules: true | |
- name: Upload SARIF file | |
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3 | |
if: success() || failure() | |
with: | |
sarif_file: results.sarif | |
- name: Run ansible-lint | |
uses: ansible/ansible-lint@c629b235398065e24ff44b5f1138028642c74a03 | |
with: | |
args: "" | |
setup_python: "true" | |
working_directory: "./ansible/" | |
requirements_file: "" | |
- name: Terraform format | |
run: pip install -r requirements.txt | |
- name: Run tests dev3 | |
run: ansible-playbook tests.yaml --extra-vars "env_file=dev.yaml expected_range=10.70.248.0/24 expected_default=10.70.248.1" | |
working-directory: ./ansible/ | |
- name: Run tests prod2 | |
run: ansible-playbook tests.yaml --extra-vars "env_file=wireguard_sn10.yaml expected_range=10.70.247.0/24 expected_default=10.70.247.1" | |
working-directory: ./ansible/ | |
- name: Run tests prod1 | |
run: ansible-playbook tests.yaml --extra-vars "env_file=wireguard_sn3.yaml expected_range=10.70.250.0/24 expected_default=10.70.250.1" | |
working-directory: ./ansible/ |