--- /dev/null
+# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+
+- hosts: servers
+ vars:
+ repos:
+ - /srv/git/password_store.git
+ dest: "/srv/prod/password_store"
+ tasks:
+ - name: Ensure destination directory exists
+ file:
+ path: "{{ dest }}"
+ mode: 0775
+ state: directory
+ owner: git
+ group: git
+ become: true
+ - name: Checkout files to the destination directory
+ command: |
+ git --work-tree={{ dest }} --git-dir={{ item }} checkout master --force
+ become: yes
+ with_items: "{{ repos }}"
- name: Deploy website
import_playbook: website.yaml
+
+- name: Deploy password store
+ import_playbook: password_store.yaml