fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement ansible-lint workflow
This commit is contained in:
parent
5645f0624b
commit
53d3c53ab8
@ -1,35 +1,7 @@
|
|||||||
name: Check
|
name: Check
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
"Lint Ansible Files":
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- run: apt-get update
|
|
||||||
- run: apt-get install -y python3 python3-pip python3-venv
|
|
||||||
- run: python3 --version
|
|
||||||
- name: Check out repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- run: python3 -m venv venv
|
|
||||||
- run: venv/bin/pip --disable-pip-version-check install ansible==7.2.0 ansible-lint==6.16.1 > /dev/null 2> /dev/null
|
|
||||||
- run: venv/bin/ansible-lint -c .ansible-lint ansible
|
|
||||||
"Run ansible-playbook --check":
|
"Run ansible-playbook --check":
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- run: apt-get update
|
- run: ssh-keyscan -vT 30 -p 2309 vmd98928.contaboserver.net
|
||||||
- run: apt-get install -y python3 python3-pip python3-venv
|
|
||||||
- run: python3 --version
|
|
||||||
- name: Check out repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- run: python3 -m venv venv
|
|
||||||
# - run: venv/bin/pip install ansible==7.2.0 > /dev/null 2> /dev/null
|
|
||||||
- run: mkdir -p "$HOME/.ssh"
|
|
||||||
- run: echo "$SSH_KEY" > "$HOME/.ssh/id"
|
|
||||||
env:
|
|
||||||
SSH_KEY: ${{ secrets.ssh_key }}
|
|
||||||
- run: chmod 0600 ~/.ssh/id
|
|
||||||
# - run: ssh-keyscan -vT 30 -p 2309 vmd98928.contaboserver.net > "$HOME/.ssh/known_hosts"
|
|
||||||
- run: "ssh-keyscan -vT 30 -p 2309 vmd98928.contaboserver.net"
|
|
||||||
- run: echo "$VAULT_PASSWORD" > "$HOME/vault_password"
|
|
||||||
env:
|
|
||||||
VAULT_PASSWORD: ${{ secrets.vault_password }}
|
|
||||||
- run: 'cd ansible && ansible-playbook --private-key "$HOME/.ssh/id" --vault-password-file "$HOME/vault_password" --check playbooks/misc-all.yaml'
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user