From e1c577cc95c642bbca33369c703c53a3a2dd47bc Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 30 Aug 2022 17:39:14 +0200 Subject: [PATCH] enable/disable lbu with a variable --- deploy.yml | 3 +++ roles/users/tasks/ansible.yml | 1 + roles/users/tasks/rilla.yml | 2 +- roles/users/tasks/woodpecker.yml | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy.yml b/deploy.yml index 5d9d582..2b142c0 100644 --- a/deploy.yml +++ b/deploy.yml @@ -10,6 +10,7 @@ users: - rilla - ansible + use_lbu: true post_tasks: - name: lbu commit lbu: @@ -21,3 +22,5 @@ become_method: doas roles: - basic + vars: + use_lbu: false diff --git a/roles/users/tasks/ansible.yml b/roles/users/tasks/ansible.yml index 74692f1..ef9deaf 100644 --- a/roles/users/tasks/ansible.yml +++ b/roles/users/tasks/ansible.yml @@ -39,3 +39,4 @@ exclude: - /var/lib/ansible/.ansible - /var/lib/ansible/.ash_history + when: ansible_distribution == "Alpine" and use_lbu diff --git a/roles/users/tasks/rilla.yml b/roles/users/tasks/rilla.yml index 9963469..e4d15fe 100644 --- a/roles/users/tasks/rilla.yml +++ b/roles/users/tasks/rilla.yml @@ -36,4 +36,4 @@ - /home/rilla/.ssh/authorized_keys exclude: - /home/rilla/.ash_history - when: ansible_distribution == "Alpine" + when: ansible_distribution == "Alpine" and use_lbu diff --git a/roles/users/tasks/woodpecker.yml b/roles/users/tasks/woodpecker.yml index 3be36f7..9fe26a3 100644 --- a/roles/users/tasks/woodpecker.yml +++ b/roles/users/tasks/woodpecker.yml @@ -37,4 +37,4 @@ - /var/lib/woodpecker/.ssh/authorized_keys exclude: - /var/lib/woodpecker/.ash_history - when: ansible_distribution == "Alpine" + when: ansible_distribution == "Alpine" and use_lbu