From 11df0dab83238a1f82fd0796917b2a66fc3ba1f5 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 30 Aug 2022 15:10:01 +0200 Subject: [PATCH] minor reformatting on users role --- roles/users/tasks/alpine.yml | 24 ------------------------ roles/users/tasks/ansible.yml | 10 +++++++++- roles/users/tasks/main.yml | 4 ---- roles/users/tasks/rilla.yml | 10 +++++++++- roles/users/tasks/woodpecker.yml | 10 +++++++++- 5 files changed, 27 insertions(+), 31 deletions(-) delete mode 100644 roles/users/tasks/alpine.yml diff --git a/roles/users/tasks/alpine.yml b/roles/users/tasks/alpine.yml deleted file mode 100644 index 9a3f2d9..0000000 --- a/roles/users/tasks/alpine.yml +++ /dev/null @@ -1,24 +0,0 @@ -- name: commit ansible's home to lbu - lbu: - include: - - /home/rilla - - /home/rilla/.ssh/authorized_keys - exclude: - - /home/rilla/.ash_history - -- name: commit ansible's home to lbu - lbu: - include: - - /var/lib/ansible - - /var/lib/ansible/.ssh/authorized_keys - exclude: - - /var/lib/ansible/.ansible - - /var/lib/ansible/.ash_history - -- name: commit woodpecker's home to lbu - lbu: - include: - - /var/lib/woodpecker - - /var/lib/woodpecker/.ssh/authorized_keys - exclude: - - /var/lib/woodpecker/.ash_history diff --git a/roles/users/tasks/ansible.yml b/roles/users/tasks/ansible.yml index e4ad76d..74692f1 100644 --- a/roles/users/tasks/ansible.yml +++ b/roles/users/tasks/ansible.yml @@ -30,4 +30,12 @@ with_file: - public_keys/yubikey - public_keys/ansible - register: ansible_keys + +- name: commit ansible's home to lbu + lbu: + include: + - /var/lib/ansible + - /var/lib/ansible/.ssh/authorized_keys + exclude: + - /var/lib/ansible/.ansible + - /var/lib/ansible/.ash_history diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml index 23fa275..3293e02 100644 --- a/roles/users/tasks/main.yml +++ b/roles/users/tasks/main.yml @@ -6,7 +6,3 @@ - name: setup user 'woodpecker' include_tasks: ansible.yml - -- name: commit user's home to alpine lbu - include_tasks: alpine.yml - when: ansible_distribution == "Alpine" diff --git a/roles/users/tasks/rilla.yml b/roles/users/tasks/rilla.yml index af05c8c..9963469 100644 --- a/roles/users/tasks/rilla.yml +++ b/roles/users/tasks/rilla.yml @@ -28,4 +28,12 @@ path: /home/rilla/.ssh/authorized_keys with_file: - public_keys/yubikey - register: rilla_keys + +- name: commit rilla's home to lbu + lbu: + include: + - /home/rilla + - /home/rilla/.ssh/authorized_keys + exclude: + - /home/rilla/.ash_history + when: ansible_distribution == "Alpine" diff --git a/roles/users/tasks/woodpecker.yml b/roles/users/tasks/woodpecker.yml index f2ec5a4..55ecaa4 100644 --- a/roles/users/tasks/woodpecker.yml +++ b/roles/users/tasks/woodpecker.yml @@ -29,4 +29,12 @@ with_file: - public_keys/yubikey - public_keys/woodpecker - register: woodpecker_keys + +- name: commit woodpecker's home to lbu + lbu: + include: + - /var/lib/woodpecker + - /var/lib/woodpecker/.ssh/authorized_keys + exclude: + - /var/lib/woodpecker/.ash_history + when: ansible_distribution == "Alpine"