From d6fad43f9c571a6176e74c4574c9a56614831ed9 Mon Sep 17 00:00:00 2001 From: Paul Brinkmeier Date: Fri, 1 Sep 2023 03:42:38 +0200 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement ansible-lint workflow --- .drone.yml | 36 ------------------------------------ .gitea/workflows/check.yaml | 24 +----------------------- 2 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index c43ac8f..0000000 --- a/.drone.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -kind: pipeline -type: docker -name: Static Verification -steps: - - name: ansible-lint - image: python:3.10.6 - commands: - # Make sure to update the ansible version below as well - - pip --disable-pip-version-check install ansible==7.2.0 ansible-lint==6.16.1 > /dev/null 2> /dev/null - - ansible-lint -c .ansible-lint ansible - ---- -kind: pipeline -type: docker -name: Check -steps: - - name: ansible-playbook --check - image: python:3.10.6 - environment: - SSH_KEY: - from_secret: ssh_key - VAULT_PASSWORD: - from_secret: vault_password - commands: - - pip install ansible==7.2.0 > /dev/null 2> /dev/null - - - mkdir "$HOME/.ssh" - - echo "$SSH_KEY" > "$HOME/.ssh/id" - - chmod 0600 ~/.ssh/id - - ssh-keyscan -p 2309 vmd98928.contaboserver.net > "$HOME/.ssh/known_hosts" - - - echo "$VAULT_PASSWORD" > "$HOME/vault_password" - - - cd ansible - - ansible-playbook --private-key "$HOME/.ssh/id" --vault-password-file "$HOME/vault_password" --check playbooks/misc-all.yaml diff --git a/.gitea/workflows/check.yaml b/.gitea/workflows/check.yaml index a968662..67de9e9 100644 --- a/.gitea/workflows/check.yaml +++ b/.gitea/workflows/check.yaml @@ -12,26 +12,4 @@ jobs: - 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": - 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 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 -p 2309 pbrinkmeier.de > "$HOME/.ssh/known_hosts" - - run: echo "$VAULT_PASSWORD" > "$HOME/vault_password" - env: - VAULT_PASSWORD: ${{ secrets.vault_password }} - # I've been having problems with ssh-keyscan -p 2309 vmd98928.contaboserver.net, which - # is the current inventory entry for misc. It's probably not a bad idea to remap that anyways. - - run: echo "[misc]\npbrinkmeier.de ansible_port=2309" > ansible/inventory - - run: 'cd ansible && venv/bin/ansible-playbook --private-key "$HOME/.ssh/id" --vault-password-file "$HOME/vault_password" --check playbooks/misc-all.yaml' + # TODO: Reimplement ansible-play --check step from old drone config