From: Jakub Czajka Date: Mon, 4 Dec 2023 10:32:02 +0000 (+0100) Subject: Run configuration playbooks from a separate file. X-Git-Url: https://git.ekhem.eu.org/?a=commitdiff_plain;h=58961f61be4828f599dba524949b7cb34da16bc6;p=turnup.git Run configuration playbooks from a separate file. --- diff --git a/install/configuration.yaml b/install/configuration.yaml new file mode 100644 index 0000000..26a997c --- /dev/null +++ b/install/configuration.yaml @@ -0,0 +1,12 @@ +# Copyright (c) 2023 Jakub Czajka +# 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 }}" diff --git a/turnup.yaml b/turnup.yaml index aca6bdd..5f60ada 100644 --- a/turnup.yaml +++ b/turnup.yaml @@ -19,15 +19,6 @@ - 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 }}"