Compare commits

..

3 Commits

Author SHA1 Message Date
c7d803e61a Update .gitea/workflows/kumonoboru.yaml 2024-02-09 12:00:12 +02:00
3853da701a Merge remote-tracking branch 'refs/remotes/origin/main'
Some checks failed
Configure Kumonoboru / deploy (push) Failing after 1m55s
2023-11-24 20:09:41 +02:00
4e67ef5394 Remove Prometheus file after 5 minutes; remove inotify dependency 2023-11-24 20:09:34 +02:00
4 changed files with 48 additions and 41 deletions

View File

@@ -1,38 +1,38 @@
name: Configure Kumonoboru
on:
push:
schedule:
- cron: '30 08 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
run: |
apt -y update
apt -y install python3 python3-pip skopeo
- name: Install Ansible
run: |
python3 -m pip install --upgrade pip
pip install ansible
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.0
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
- name: Run Ansible Playbook
run: |
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' kumonoboru.yaml -vv
name: Configure Kumonoboru
#on:
# push:
# schedule:
# - cron: '30 08 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
run: |
apt -y update
apt -y install python3 python3-pip skopeo
- name: Install Ansible
run: |
python3 -m pip install --upgrade pip
pip install ansible
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.0
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
- name: Run Ansible Playbook
run: |
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' kumonoboru.yaml -vv

View File

@@ -1,3 +1,3 @@
Gerbil-TK /var/Red-Vol/Media/Pictures
Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers
Pukeko-XYZ-Cloud /var/Red-Vol/Media/Could
Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud

View File

@@ -192,4 +192,11 @@ for repo in "${!REPOS[@]}"; do
fi
done
echo "All done; have a nice day!"
echo "All done; have a nice day!"
## Once the script finishes, the .prom file will live on for 2 minutes before being deleted.
#+ This allows Prometheus to pick up the alert, send out a notification, and move on with its life.
(
sleep 120
rm $PROM_FILE
) 2>1 >/dev/null &

View File

@@ -6,7 +6,7 @@
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
tasks:
- name: Install Restic
- name: Install dependencies
ansible.builtin.package:
name: restic
state: latest