]> git.ekhem.eu.org Git - turnup.git/commitdiff
Run configuration playbooks from a separate file.
authorJakub Czajka <jakub@ekhem.eu.org>
Mon, 4 Dec 2023 10:32:02 +0000 (11:32 +0100)
committerJakub Czajka <jczajka@google.com>
Sun, 24 Dec 2023 18:46:45 +0000 (19:46 +0100)
install/configuration.yaml [new file with mode: 0644]
turnup.yaml

diff --git a/install/configuration.yaml b/install/configuration.yaml
new file mode 100644 (file)
index 0000000..26a997c
--- /dev/null
@@ -0,0 +1,12 @@
+# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+
+- find:
+    paths: "/srv/git"
+    file_type: file
+    patterns: "*.yaml"
+    recurse: true
+  register: post_receive_scripts
+- name: Execute configuration playbook
+  shell: /usr/bin/ansible-playbook --connection=local {{ item.path }}
+  with_items: "{{ post_receive_scripts.files }}"
index aca6bdd188729f7edee7d627dc6c1a6a75125a15..5f60ada12f78015f133112a72a0498ff4cf0c903 100644 (file)
     - include_tasks: install/ansible.yaml
     - include_tasks: install/environment.yaml
     - include_tasks: install/database.yaml
-
-    - find:
-        paths: "/srv/git"
-        file_type: file
-        patterns: "*.yaml"
-        recurse: true
-      register: post_receive_scripts
-    - name: Execute configuration playbook
-      shell: /usr/bin/ansible-playbook --connection=local {{ item.path }}
-      with_items: "{{ post_receive_scripts.files }}"
+    - include_tasks: install/configuration.yaml
     - include_tasks: install/ssh_public_keys.yaml
       with_items: "{{ users }}"