Compare commits
3 Commits
0eba6d9caa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c7d803e61a | |||
| 3853da701a | |||
| 4e67ef5394 |
@@ -1,38 +1,38 @@
|
|||||||
name: Configure Kumonoboru
|
name: Configure Kumonoboru
|
||||||
|
|
||||||
on:
|
#on:
|
||||||
push:
|
# push:
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '30 08 * * *'
|
# - cron: '30 08 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: |
|
run: |
|
||||||
apt -y update
|
apt -y update
|
||||||
apt -y install python3 python3-pip skopeo
|
apt -y install python3 python3-pip skopeo
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip install ansible
|
pip install ansible
|
||||||
|
|
||||||
- name: Set up SSH
|
- name: Set up SSH
|
||||||
uses: webfactory/ssh-agent@v0.5.0
|
uses: webfactory/ssh-agent@v0.5.0
|
||||||
with:
|
with:
|
||||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|
||||||
- name: Checkout Ansible inventory
|
- name: Checkout Ansible inventory
|
||||||
run: |
|
run: |
|
||||||
INVENTORY_URL="https://shmick:${{ secrets.ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/ansible/raw/branch/main/inventory.yaml"
|
INVENTORY_URL="https://shmick:${{ secrets.ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/ansible/raw/branch/main/inventory.yaml"
|
||||||
curl -o inventory.yaml $INVENTORY_URL
|
curl -o inventory.yaml $INVENTORY_URL
|
||||||
|
|
||||||
- name: Run Ansible Playbook
|
- name: Run Ansible Playbook
|
||||||
run: |
|
run: |
|
||||||
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' kumonoboru.yaml -vv
|
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}"' kumonoboru.yaml -vv
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
Gerbil-TK /var/Red-Vol/Media/Pictures
|
Gerbil-TK /var/Red-Vol/Media/Pictures
|
||||||
Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers
|
Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers
|
||||||
Pukeko-XYZ-Cloud /var/Red-Vol/Media/Could
|
Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud
|
||||||
|
|||||||
@@ -192,4 +192,11 @@ for repo in "${!REPOS[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
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 &
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
|
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install Restic
|
- name: Install dependencies
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: restic
|
name: restic
|
||||||
state: latest
|
state: latest
|
||||||
|
|||||||
Reference in New Issue
Block a user