Skip to content

Commit

Permalink
nginx one config
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcalalang committed Jun 12, 2024
1 parent 4c86741 commit 7e1fd24
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 143 deletions.
131 changes: 54 additions & 77 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: cURL ipify.org
run: curl 'https://api.ipify.org?format=json'

- name: cURL BIG-IP
run: curl --max-time 10 -u ${{ secrets.BIGIP_USER }}:${{ secrets.BIGIP_PASSWORD }} -X GET -k https://${{ secrets.BIGIP_HOSTNAME }}/mgmt/tm/sys/ready/

Expand Down Expand Up @@ -162,13 +159,6 @@ jobs:
- name: Working directory
run: pwd

# - name: Run ansible-lint
# # replace `main` with any valid ref, or tags like `v6`
# uses: ansible-community/ansible-lint-action@main
# # optional:
# with:
# path: "/home/runner/work/lab/lab/big-ip/ansible/configuration/playbooks/" # <-- only one value is allowed

- name: Run Ansible Playbooks
uses: dawidd6/action-ansible-playbook@v2
with:
Expand Down Expand Up @@ -220,6 +210,9 @@ jobs:
with:
terraform_version: 1.7.1

- name: cURL ipify.org
run: curl 'https://api.ipify.org?format=json'

- name: Terraform BIG-IP-Terraform-Infrastructure fmt
id: fmt
run: terraform fmt -check
Expand Down Expand Up @@ -290,9 +283,6 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3

- name: cURL ipify.org
run: curl 'https://api.ipify.org?format=json'

- name: cURL F5XC
run: curl --max-time 10 --cert-type P12 --cert certs/${{ secrets.VES_HOSTNAME }}.api-creds.p12:${{ secrets.VES_P12_PASSWORD }} -X GET https://${{ secrets.VES_HOSTNAME }}/api/web/namespaces/j-calalang
Expand Down Expand Up @@ -596,70 +586,57 @@ jobs:
run: terraform apply --auto-approve

######################################################################################################
#
# NMS-Resources-Available:
# # The type of runner that the job will run on
# runs-on: ubuntu-20.04
# needs: [Cloud-Network-Terraform-Infrastructure, NGINX-Terraform-Infrastructure]
#
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# - uses: actions/checkout@v3
#
# - name: cURL ipify.org
# run: curl 'https://api.ipify.org?format=json'
#
# - name: cURL NMS
# run: curl --max-time 10 -u ${{ secrets.NMS_USER}}:${{ secrets.NMS_PASSWORD }} -H "token:${{ secrets.NMS_TOKEN }}" -X GET https://${{ secrets.NMS_HOSTNAME }}/api/platform/v1/instances
#
# NMS-Ansible-Configuration:
# # The type of runner that the job will run on
# runs-on: ubuntu-20.04
# needs: [Cloud-Network-Terraform-Infrastructure, NMS-Resources-Available]
#
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
#
# - name: Install PIP
# run: sudo apt-get install -y python3-pip
#
# - name: Install apt-get dependencies
# run: sudo pip3 install jmespath
#
# - name: Setup ansible
# run: |
# ansible --version
# pipx inject ansible-core jmespath
#
# - name: Working directory
# run: pwd
#
# - name: Run ansible-lint
# # replace `main` with any valid ref, or tags like `v6`
# uses: ansible-community/ansible-lint-action@main
# # optional:
# with:
# path: "/home/runner/work/lab/lab/nginx/ansible/configuration/playbooks/" # <-- only one value is allowed
#
# - name: Run Ansible Playbooks
# uses: dawidd6/action-ansible-playbook@v2
# with:
# # Optional, additional flags to pass to ansible-playbook
# options: |
# --extra-vars "@../defaults/main.yaml"
# --extra-vars "NMShost01=${{ secrets.NMS_HOSTNAME }}"
# --extra-vars "NMSadminUsername=${{ secrets.NMS_USER}}"
# --extra-vars "NMSadminPassword=${{ secrets.NMS_PASSWORD }}"
# --extra-vars "NMSToken=${{ secrets.NMS_TOKEN }}"
# --extra-vars "NMSinstanceGroup=${{ secrets.NMS_INSTANCE_GROUP }}"
# # --verbose -vvvv
# # Required, playbook filepath
# playbook: "nginx.yaml"
# # Optional, directory where playbooks live
# directory: "./nginx/ansible/configuration/playbooks"
#

NGINX-One-Resources-Available:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
needs: [Cloud-Network-Terraform-Infrastructure, NGINX-Terraform-Infrastructure]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3

- name: cURL NGINX-One
run: curl --max-time 10 -H "Authorization:${{ secrets.NGINX_ONE_F5XC_API_TOKEN }}" -X GET https://${{ secrets.NGINX_ONE_F5XC_TENANT }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances/summary

NGINX-One-Ansible-Configuration:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
needs: [Cloud-Network-Terraform-Infrastructure, NGINX-One-Resources-Available]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install PIP
run: sudo apt-get install -y python3-pip

- name: Install apt-get dependencies
run: sudo pip3 install jmespath

- name: Setup ansible
run: |
ansible --version
pipx inject ansible-core jmespath
- name: Working directory
run: pwd

- name: Run Ansible Playbooks
uses: dawidd6/action-ansible-playbook@v2
with:
# Optional, additional flags to pass to ansible-playbook
options: |
--extra-vars "@../defaults/main.yaml"
--extra-vars "nginx-one-f5xc-api-token=${{ secrets.NGINX_ONE_F5XC_API_TOKEN }}"
--extra-vars "nginx-one-f5xc-tenant=${{ secrets.NGINX_ONE_F5XC_TENANT }}"
# --verbose -vvvv
# Required, playbook filepath
playbook: "nginx.yaml"
# Optional, directory where playbooks live
directory: "./nginx/ansible/configuration/playbooks"

NGINX-Terraform-Infrastructure:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
Expand Down
Loading

0 comments on commit 7e1fd24

Please sign in to comment.