Refactor ansible-apply.yaml to improve SSH key handling
This commit is contained in:
@@ -10,7 +10,7 @@ on:
|
|||||||
- closed
|
- closed
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
plan:
|
apply-playbooks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -31,9 +31,9 @@ jobs:
|
|||||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
sectool ssh unlock ansible
|
sectool ssh unlock ansible
|
||||||
cp ssh-keys/ansible ~/.ssh/id_rsa
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
chmod 700 ~/.ssh
|
chmod 700 ~/.ssh
|
||||||
|
cp ssh-keys/ansible/id_rsa ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
- name: Apply Ansible Playbook
|
- name: Apply Ansible Playbook
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ on:
|
|||||||
- reopened
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
plan:
|
validate-playbooks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup Sectool
|
- name: Setup Sectool
|
||||||
uses: a13labs/setup-sectool@v1
|
uses: a13labs/setup-sectool@v1
|
||||||
with:
|
|
||||||
version: 0.0.3
|
|
||||||
|
|
||||||
- name: Terraform Init
|
- name: Terraform Init
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user