From 58961f61be4828f599dba524949b7cb34da16bc6 Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Mon, 4 Dec 2023 11:32:02 +0100 Subject: [PATCH] Run configuration playbooks from a separate file. --- install/configuration.yaml | 12 ++++++++++++ turnup.yaml | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 install/configuration.yaml 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 }}" -- 2.39.5