Compare commits
3 Commits
0eba6d9caa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c7d803e61a | |||
| 3853da701a | |||
| 4e67ef5394 |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 &
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
|
||||
|
||||
tasks:
|
||||
- name: Install Restic
|
||||
- name: Install dependencies
|
||||
ansible.builtin.package:
|
||||
name: restic
|
||||
state: latest
|
||||
|
||||
Reference in New Issue
Block a user