Compare commits

..

No commits in common. "d435ab80ac1539df7daae4953eebf0feb825a4ed" and "cad90e7c895d04f5412b6708fa429d784519fd26" have entirely different histories.

6 changed files with 9 additions and 39 deletions

View File

@ -1,27 +0,0 @@
name: Run Playbook
on:
push:
tags:
- "v*.*.*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
submodules: recursive
- name: Run Ansible-Playbook
uses: dawidd6/action-ansible-playbook@v2
with:
playbook: run.yml
key: ${{ secrets.SSH_PRIVATE_KEY }}
inventory: |
[hosts]
openpunk-vps ansible_host=96.30.199.68 ansible_user=root ansible_connection=ssh
vault_password: ${{ secrets.VAULT_PASSWORD }}
options: |
--extra-vars domain=openpunk.com

View File

@ -1,7 +1,4 @@
# OpenPunk's Ansible playbook # OpenPunk's Ansible playbook
<p align="center">
<a href="https://github.com/CPunch/openpunk-ansible/actions/workflows/deploy.yaml"><img src="https://github.com/CPunch/openpunk-ansible/actions/workflows/deploy.yaml/badge.svg?branch=main" alt="Workflow"></a>
</p>
This is my failsafe (and also my helpful migration tool) for restoring the OpenPunk server. This handles setting everything back up, including: This is my failsafe (and also my helpful migration tool) for restoring the OpenPunk server. This handles setting everything back up, including:
@ -14,19 +11,19 @@ This is my failsafe (and also my helpful migration tool) for restoring the OpenP
This playbook assumes the target VPS is running the latest debian stable release. This playbook assumes the target VPS is running the latest debian stable release.
## Automatic deployment
On new release tags the playbook is automatically ran on the production openpunk vps. For more info checkout the `.github/workflows/deploy.yaml` workflow
## Notes to my future self ## Notes to my future self
The deadswitch has the deadtrigger setup every run, so you have a 14-day timer to add a one-liner to your crontab to keep that deadtrigger set. The deadswitch has the deadtrigger setup every run, so you have a 14-day timer to add a one-liner to your crontab to keep that deadtrigger set.
## Usage ## Usage
```sh ```sh
ansible-playbook -i hosts --ask-vault-pass run.yml ansible-playbook -i hosts --ask-vault-pass run.yml
``` ```
> NOTE: The 'secrets' directory has been omitted from this repo (so it's not going to run without the provided files) > NOTE: The 'secrets' directory has been omitted from this repo (so it's not going to run without the provided files)
## Example hosts file ## Example hosts file
``` ```
[hosts] [hosts]
openpunk-vps ansible_host=104.238.138.76 ansible_user=root ansible_connection=ssh openpunk-vps ansible_host=104.238.138.76 ansible_user=root ansible_connection=ssh

@ -1 +1 @@
Subproject commit 585d0fd7dda8b515fc7c78cd1491c0ec7d79b05c Subproject commit d71665b85e4dda3a0323d6fc293a5296fb8c75ee

View File

@ -2,7 +2,7 @@
cd $HOME/deadman cd $HOME/deadman
postPatch='dead.patch' postPatch='../dead.patch'
pageName='content/pages/dead.md' pageName='content/pages/dead.md'
currDate=$(date '+%Y-%m-%d') currDate=$(date '+%Y-%m-%d')

View File

@ -13,7 +13,7 @@
template: template:
src: templates/blog/updateBlog src: templates/blog/updateBlog
dest: /usr/local/bin/updateBlog dest: /usr/local/bin/updateBlog
mode: u+rx mode: u+rwx
# Rebuild blog every hour # Rebuild blog every hour
- name: Setup blog cron job - name: Setup blog cron job

View File

@ -8,19 +8,19 @@
copy: copy:
src: static/blog/deadswitch src: static/blog/deadswitch
dest: /usr/local/bin/deadswitch dest: /usr/local/bin/deadswitch
mode: u+rx mode: u+rwx
- name: Install imdead.sh - name: Install imdead.sh
copy: copy:
src: static/blog/imdead.sh src: static/blog/imdead.sh
dest: /root/deadman/imdead.sh dest: /root/deadman/imdead.sh
mode: u+rx mode: u+rwx
- name: Copy dead patch - name: Copy dead patch
copy: copy:
src: secrets/dead.patch src: secrets/dead.patch
dest: /root/deadman/dead.patch dest: /root/deadman/dead.patch
mode: u+rw mode: u+rwx
- name: Install deadtrigger - name: Install deadtrigger
file: file: