feat: Update drone pipeline and remove items from the repo #39

Merged
WillDaPope merged 28 commits from development into master 2022-05-30 19:04:53 -04:00
3 changed files with 25 additions and 8 deletions
Showing only changes of commit d5c5c49cf1 - Show all commits

View File

@ -3,9 +3,9 @@ all:
sptarkov: sptarkov:
hosts: hosts:
sp-tarkov: sp-tarkov:
ansible_host: "{{ DEPLOY_HOSTNAME }}" ansible_host: { { DEPLOY_HOSTNAME } }
ansible_user: "{{ DEPLOY_USER }}" ansible_user: { { DEPLOY_USER } }
ansible_connection: paramiko_ssh ansible_connection: paramiko_ssh
ansible_ssh_pass: "{{ DEPLOY_SSH_KEY_PASSPHRASE }}" ansible_ssh_pass: { { DEPLOY_SSH_KEY_PASSPHRASE } }
ansible_ssh_user: "{{ DEPLOY_USER }}" ansible_ssh_user: { { DEPLOY_USER } }
ansible_ssh_private_key_file: /drone/src/private.key # Hardcoded because created by the Drone plugin ansible_ssh_private_key_file: /drone/src/private.key # Hardcoded because created by the Drone plugin

View File

@ -3,9 +3,9 @@ all:
sptarkov: sptarkov:
hosts: hosts:
sp-tarkov: sp-tarkov:
ansible_host: "{{ DEPLOY_HOSTNAME }}" ansible_host: { { DEPLOY_HOSTNAME } }
ansible_user: "{{ DEPLOY_USER }}" ansible_user: { { DEPLOY_USER } }
ansible_connection: paramiko_ssh ansible_connection: paramiko_ssh
ansible_ssh_pass: "{{ DEPLOY_SSH_KEY_PASSPHRASE }}" ansible_ssh_pass: { { DEPLOY_SSH_KEY_PASSPHRASE } }
ansible_ssh_user: "{{ DEPLOY_USER }}" ansible_ssh_user: { { DEPLOY_USER } }
ansible_ssh_private_key_file: /drone/src/private.key # Hardcoded because created by the Drone plugin ansible_ssh_private_key_file: /drone/src/private.key # Hardcoded because created by the Drone plugin

View File

@ -119,6 +119,23 @@ trigger:
- master - master
steps: steps:
- name: replace hosts and user variables
image: ubuntu:impish
environment:
DEPLOY_HOSTNAME:
from_secret: deploy_hostname
DEPLOY_USER:
from_secret: deploy_username
DEPLOY_PRIVATE_KEY:
from_secret: deploy_ssh_key
DEPLOY_SSH_KEY_PASSPHRASE:
from_secret: deploy_ssh_key_passphrase
commands:
- echo "$DEPLOY_PRIVATE_KEY" > private.key && chmod 600 private.key
- sed -i 's/{{ DEPLOY_HOSTNAME }}/'"$DEPLOY_HOSTNAME"'/g' ./.ansible-website/inventory
- sed -i 's/{{ DEPLOY_SSH_KEY_PASSPHRASE }}/'"$DEPLOY_SSH_KEY_PASSPHRASE"'/g' ./.ansible-website/inventory
- sed -i 's/{{ DEPLOY_USER }}/'"$DEPLOY_USER"'/g' ./.ansible-website/inventory
- name: check website ansible syntax - name: check website ansible syntax
image: plugins/ansible:3 image: plugins/ansible:3
settings: settings: