|
1 | 1 | # This is a basic workflow to help you get started with Actions |
2 | | - |
| 2 | +--- |
3 | 3 | name: linux_benchmark_pipeline |
4 | 4 |
|
5 | 5 | # Controls when the action will run. |
|
23 | 23 | jobs: |
24 | 24 | # This will create messages for first time contributers and direct them to the Discord server |
25 | 25 | welcome: |
26 | | - runs-on: ubuntu-latest |
| 26 | + runs-on: ubuntu-latest |
27 | 27 |
|
28 | | - steps: |
29 | | - - uses: actions/first-interaction@v1.1.0 |
30 | | - with: |
31 | | - repo-token: ${{ secrets.GITHUB_TOKEN }} |
32 | | - pr-message: |- |
33 | | - Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown! |
34 | | - Please join in the conversation happening on the [Discord Server](https://discord.gg/JFxpSgPFEJ) as well. |
| 28 | + steps: |
| 29 | + - uses: actions/first-interaction@main |
| 30 | + with: |
| 31 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + pr-message: |- |
| 33 | + Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown! |
| 34 | + Please join in the conversation happening on the [Discord Server](https://discord.gg/JFxpSgPFEJ) as well. |
35 | 35 | # This workflow contains a single job called "build" |
36 | 36 | build: |
37 | 37 | # The type of runner that the job will run on |
38 | 38 | runs-on: ubuntu-latest |
39 | 39 |
|
40 | | - env: |
| 40 | + env: |
41 | 41 | ENABLE_DEBUG: false |
42 | 42 |
|
43 | 43 | # Steps represent a sequence of tasks that will be executed as part of the job |
44 | 44 | steps: |
45 | | - # Checks-out your repository under $GITHUB_WORKSPACE, |
| 45 | + # Checks-out your repository under $GITHUB_WORKSPACE, |
46 | 46 | # so your job can access it |
47 | 47 | - uses: actions/checkout@v2 |
48 | 48 | with: |
@@ -75,46 +75,37 @@ jobs: |
75 | 75 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
76 | 76 | run: terraform apply -var-file "OS.tfvars" -var-file "github_vars.tfvars" --auto-approve -input=false |
77 | 77 |
|
78 | | -## Debug Section |
| 78 | + ## Debug Section |
79 | 79 | - name: DEBUG - Show Ansible hostfile |
80 | 80 | if: env.ENABLE_DEBUG == 'true' |
81 | 81 | working-directory: .github/workflows |
82 | 82 | run: cat hosts.yml |
83 | 83 |
|
84 | | -# Centos 7 images take a while to come up insert sleep or playbook fails |
85 | | - |
86 | | - - name: Check if test os is rhel7 |
87 | | - working-directory: .github/workflows |
88 | | - id: test_os |
89 | | - run: >- |
90 | | - echo "::set-output name=RHEL7::$( |
91 | | - grep -c RHEL7 OS.tfvars |
92 | | - )" |
| 84 | + # Aws deployments taking a while to come up insert sleep or playbook fails |
93 | 85 |
|
94 | | - - name: if RHEL7 - Sleep for 60 seconds |
95 | | - if: steps.test_os.outputs.RHEL7 >= 1 |
| 86 | + - name: Sleep for 60 seconds |
96 | 87 | run: sleep 60s |
97 | 88 | shell: bash |
98 | 89 |
|
99 | | -# Run the ansible playbook |
| 90 | + # Run the ansible playbook |
100 | 91 | - name: Run_Ansible_Playbook |
101 | 92 | uses: arillso/action.playbook@master |
102 | 93 | with: |
103 | 94 | playbook: site.yml |
104 | 95 | inventory: .github/workflows/hosts.yml |
105 | 96 | galaxy_file: collections/requirements.yml |
106 | 97 | private_key: ${{ secrets.SSH_PRV_KEY }} |
107 | | -# verbose: 3 |
| 98 | + # verbose: 3 |
108 | 99 | env: |
109 | 100 | ANSIBLE_HOST_KEY_CHECKING: "false" |
110 | 101 | ANSIBLE_DEPRECATION_WARNINGS: "false" |
111 | 102 |
|
112 | | -# Remove test system - User secrets to keep if necessary |
| 103 | + # Remove test system - User secrets to keep if necessary |
113 | 104 |
|
114 | 105 | - name: Terraform_Destroy |
115 | 106 | working-directory: .github/workflows |
116 | 107 | if: always() && env.ENABLE_DEBUG == 'false' |
117 | 108 | env: |
118 | 109 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
119 | 110 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
120 | | - run: terraform destroy -var-file "OS.tfvars" -var-file "github_vars.tfvars" --auto-approve -input=false |
| 111 | + run: terraform destroy -var-file "github_vars.tfvars" -var-file "OS.tfvars" --auto-approve -input=false |
0 commit comments