From 848a75b19c2cdcbe86de59c529fe8af183f9d35e Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Mon, 1 Aug 2022 12:32:13 +0100 Subject: [PATCH] moved all playbooks under homelab/playbooks --- ansible/homelab/playbooks/redeploy-dashy.yml | 9 +++++++++ .../playbooks/volume-restore.yml | 0 .../tasks/checkout-git-repos-tasks.yml | 8 +++++++- ansible/playbooks/redeploy-dashy.yml | 19 ------------------- 4 files changed, 16 insertions(+), 20 deletions(-) create mode 100644 ansible/homelab/playbooks/redeploy-dashy.yml rename ansible/{ => homelab}/playbooks/volume-restore.yml (100%) delete mode 100644 ansible/playbooks/redeploy-dashy.yml diff --git a/ansible/homelab/playbooks/redeploy-dashy.yml b/ansible/homelab/playbooks/redeploy-dashy.yml new file mode 100644 index 0000000..c51285e --- /dev/null +++ b/ansible/homelab/playbooks/redeploy-dashy.yml @@ -0,0 +1,9 @@ +--- +- hosts: servers + become: true + tasks: + - name: Checkout Git Repos + import_tasks: ../tasks/checkout-git-repos-tasks.yml + + - name: Restart Dashy + ansible.builtin.command: docker restart dashy diff --git a/ansible/playbooks/volume-restore.yml b/ansible/homelab/playbooks/volume-restore.yml similarity index 100% rename from ansible/playbooks/volume-restore.yml rename to ansible/homelab/playbooks/volume-restore.yml diff --git a/ansible/homelab/tasks/checkout-git-repos-tasks.yml b/ansible/homelab/tasks/checkout-git-repos-tasks.yml index 17486bc..0141cd6 100644 --- a/ansible/homelab/tasks/checkout-git-repos-tasks.yml +++ b/ansible/homelab/tasks/checkout-git-repos-tasks.yml @@ -4,4 +4,10 @@ repo: 'https://github.com/chatton/HomeLab.git' dest: /home/cianhatton/checkouts/HomeLab force: true - version: master \ No newline at end of file + version: master + +- name: Change Ownership + file: + path: /home/cianhatton/checkouts/HomeLab + owner: cianhatton + group: cianhatton \ No newline at end of file diff --git a/ansible/playbooks/redeploy-dashy.yml b/ansible/playbooks/redeploy-dashy.yml deleted file mode 100644 index 0cc0316..0000000 --- a/ansible/playbooks/redeploy-dashy.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- hosts: servers - become: true - tasks: - - name: Git checkout - ansible.builtin.git: - repo: 'https://github.com/chatton/HomeLab.git' - dest: /home/cianhatton/checkouts/HomeLab - force: true - version: master - - - name: Change Ownership - file: - path: /home/cianhatton/checkouts/HomeLab - owner: cianhatton - group: cianhatton - - - name: Restart Dashy - ansible.builtin.command: docker restart dashy