Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 60299aa778 | |||
| 48f06c53f3 | |||
| 20cb8a5a70 | |||
| b7ad335c02 | |||
| bf45b66782 | |||
| 98e05fe930 | |||
| a1462c543b | |||
| 5e4ecc9447 | |||
| 7fb05e9b58 | |||
| e337369951 |
@@ -1,7 +1,9 @@
|
||||
name: Ansible Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
#on:
|
||||
# push:
|
||||
# schedule:
|
||||
# - cron: '00 23 * * *'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@@ -26,6 +28,12 @@ jobs:
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- name: Checkout Ansible inventory
|
||||
run: |
|
||||
INVENTORY_URL="https://shmick:${{ secrets.ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/ansible/raw/branch/main/inventory.yaml"
|
||||
curl -o inventory.yaml $INVENTORY_URL
|
||||
cat inventory.yaml
|
||||
|
||||
- name: Run Ansible Playbook
|
||||
run: |
|
||||
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}" SKOPEO_PASS="${{ secrets.SKOPEO_PASS }}"' hatarashi-hako.yaml -vv
|
||||
|
||||
@@ -141,3 +141,10 @@ for container_path in ${CONTAINER_PATHS[@]}; do
|
||||
cd $LOCAL_DIR
|
||||
done
|
||||
echo "All done!"
|
||||
|
||||
## Once the script finishes, the .prom file will live on for 5 minutes before being deleted.
|
||||
#+ This allows Prometheus to pick up the alert, send out a notification, and move on with its life.
|
||||
(
|
||||
sleep 300
|
||||
rm $PROM_FILE
|
||||
) 2>1 >/dev/null &
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
|
||||
|
||||
tasks:
|
||||
- name: Install Skopeo
|
||||
- name: Install Dependencies
|
||||
ansible.builtin.package:
|
||||
name: skopeo
|
||||
state: latest
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
all:
|
||||
hosts:
|
||||
takahe:
|
||||
ansible_host: 192.168.0.66
|
||||
ansible_user: shmick
|
||||
Reference in New Issue
Block a user