From 01d91eae57967d2380659fcd49dedeb71106d4d0 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Thu, 11 Jul 2024 23:28:44 +0200 Subject: [PATCH] fix: exclude deployment host from all playbooks where it does not need to be included (and can cause issues) --- playbooks/bootstrap.yml | 13 +++++++++++-- playbooks/deploy.yml | 2 +- playbooks/generate_certs.yml | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/playbooks/bootstrap.yml b/playbooks/bootstrap.yml index b190b9c..f2ef03e 100644 --- a/playbooks/bootstrap.yml +++ b/playbooks/bootstrap.yml @@ -1,10 +1,19 @@ --- # hashistack prepare playbook - name: "Bootstrap" - hosts: all + hosts: all, !deployment gather_facts: true become: true tasks: + - name: "Isntall unzip with package manager" + ansible.builtin.include_role: + name: ednz_cloud.manage_apt_packages + vars: + manage_apt_packages_list: + - name: unzip + version: latest + state: present + - name: "Install hvac library with pip" ansible.builtin.include_role: name: ednz_cloud.manage_pip_packages @@ -39,7 +48,7 @@ install_docker_users: - "{{ ansible_user }}" install_docker_daemon_options: {} - #! when: "'nomad_agents' in group_names" + when: "'nomad_agents' in group_names" - name: "Ensure /etc/localtime exists" ansible.builtin.file: diff --git a/playbooks/deploy.yml b/playbooks/deploy.yml index 6e45910..8fd7af2 100644 --- a/playbooks/deploy.yml +++ b/playbooks/deploy.yml @@ -1,7 +1,7 @@ --- # hashistack deployment playbook - name: "Deploy" - hosts: all + hosts: all, !deployment strategy: linear gather_facts: true become: true diff --git a/playbooks/generate_certs.yml b/playbooks/generate_certs.yml index 2f27eac..46a0fdd 100644 --- a/playbooks/generate_certs.yml +++ b/playbooks/generate_certs.yml @@ -1,7 +1,7 @@ --- # hashistack generate certificates playbook - name: "Generate certificates" - hosts: all + hosts: all, !deployment strategy: linear gather_facts: true become: true