From 8b7d24f602d1949d907e9c265ee29c5748d0813d Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Fri, 22 Dec 2023 23:56:09 +0100 Subject: [PATCH] feat(roles): add hashicorp roles as submodules --- .gitmodules | 6 ++++++ molecule/no_tls_multi_node/converge.yml | 6 ------ molecule/no_tls_multi_node/prepare.yml | 9 +++++---- playbooks/prepare.yml | 7 +++++-- playbooks/vars/{global.yml => all.yml} | 0 roles/hashicorp_consul | 1 + roles/hashicorp_vault | 1 + 7 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 .gitmodules rename playbooks/vars/{global.yml => all.yml} (100%) create mode 160000 roles/hashicorp_consul create mode 160000 roles/hashicorp_vault diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e9b9edf --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "roles/hashicorp_consul"] + path = roles/hashicorp_consul + url = https://github.com/ednxzu/hashicorp_consul +[submodule "roles/hashicorp_vault"] + path = roles/hashicorp_vault + url = https://github.com/ednxzu/hashicorp_vault diff --git a/molecule/no_tls_multi_node/converge.yml b/molecule/no_tls_multi_node/converge.yml index 53e107e..cbc0a88 100644 --- a/molecule/no_tls_multi_node/converge.yml +++ b/molecule/no_tls_multi_node/converge.yml @@ -1,9 +1,3 @@ --- -- name: Include a playbook from a collection - ansible.builtin.import_playbook: ednxzu.hashistack.preflight.yml - -- name: Include a playbook from a collection - ansible.builtin.import_playbook: ednxzu.hashistack.prepare.yml - - name: Include a playbook from a collection ansible.builtin.import_playbook: ednxzu.hashistack.deploy.yml diff --git a/molecule/no_tls_multi_node/prepare.yml b/molecule/no_tls_multi_node/prepare.yml index 9a6673d..8ba524c 100644 --- a/molecule/no_tls_multi_node/prepare.yml +++ b/molecule/no_tls_multi_node/prepare.yml @@ -1,5 +1,6 @@ --- -- name: Prepare - hosts: all - become: true - tasks: [] +- name: Include a playbook from a collection + ansible.builtin.import_playbook: ednxzu.hashistack.preflight.yml + +- name: Include a playbook from a collection + ansible.builtin.import_playbook: ednxzu.hashistack.prepare.yml diff --git a/playbooks/prepare.yml b/playbooks/prepare.yml index 330a765..cdddbbd 100644 --- a/playbooks/prepare.yml +++ b/playbooks/prepare.yml @@ -1,6 +1,9 @@ --- # hashistack prepare playbook -- name: "Deploy" +- name: "Prepare" hosts: all gather_facts: true - tasks: [] + tasks: + - name: "Include ednxzu.install_docker" + ansible.builtin.include_role: + name: ednxzu.install_docker diff --git a/playbooks/vars/global.yml b/playbooks/vars/all.yml similarity index 100% rename from playbooks/vars/global.yml rename to playbooks/vars/all.yml diff --git a/roles/hashicorp_consul b/roles/hashicorp_consul new file mode 160000 index 0000000..36305c2 --- /dev/null +++ b/roles/hashicorp_consul @@ -0,0 +1 @@ +Subproject commit 36305c28f8689355f4846af2b90149e94be03b1e diff --git a/roles/hashicorp_vault b/roles/hashicorp_vault new file mode 160000 index 0000000..f2c23ce --- /dev/null +++ b/roles/hashicorp_vault @@ -0,0 +1 @@ +Subproject commit f2c23ced7502e7879942ba53f5d2a5df0d71f599