From 6dc53be194159f43f142c1a135aec5f8e44d3160 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 17 Nov 2021 17:35:54 +0100 Subject: [PATCH] Optimized nextloud-client for symbolic links, refactored and solved bugs --- playbook.yml | 2 +- .../meta/main.yml | 0 .../tasks/main.yml | 0 roles/native-nextcloud-client/tasks/main.yml | 15 +++++++++++++++ roles/native-nextcloud-client/vars/main.yml | 2 ++ 5 files changed, 18 insertions(+), 1 deletion(-) rename roles/{native-office => native-libreoffice}/meta/main.yml (100%) rename roles/{native-office => native-libreoffice}/tasks/main.yml (100%) create mode 100644 roles/native-nextcloud-client/vars/main.yml diff --git a/playbook.yml b/playbook.yml index 49fe798e..73e6e8d7 100644 --- a/playbook.yml +++ b/playbook.yml @@ -13,7 +13,7 @@ hosts: torbrowser_hosts become: true roles: - - torbrowser-games + - native-torbrowser - name: setup libreoffice hosts hosts: libreoffice_hosts become: true diff --git a/roles/native-office/meta/main.yml b/roles/native-libreoffice/meta/main.yml similarity index 100% rename from roles/native-office/meta/main.yml rename to roles/native-libreoffice/meta/main.yml diff --git a/roles/native-office/tasks/main.yml b/roles/native-libreoffice/tasks/main.yml similarity index 100% rename from roles/native-office/tasks/main.yml rename to roles/native-libreoffice/tasks/main.yml diff --git a/roles/native-nextcloud-client/tasks/main.yml b/roles/native-nextcloud-client/tasks/main.yml index 366e875b..9a663e42 100644 --- a/roles/native-nextcloud-client/tasks/main.yml +++ b/roles/native-nextcloud-client/tasks/main.yml @@ -2,3 +2,18 @@ community.general.pacman: name: nextcloud-client state: present + +- name: Link homefolders to cloud + ansible.builtin.file: + src: "{{cloud_directory}}{{item}}" + dest: "{{user_home_directory}}{{item}}" + owner: "{{client_username}}" + group: "{{client_username}}" + state: link + loop: + - Templates + - Documents + - Videos + - Pictures + - Music + - Desktop diff --git a/roles/native-nextcloud-client/vars/main.yml b/roles/native-nextcloud-client/vars/main.yml new file mode 100644 index 00000000..4206e3b8 --- /dev/null +++ b/roles/native-nextcloud-client/vars/main.yml @@ -0,0 +1,2 @@ +user_home_directory: "/home/{{client_username}}/" +cloud_directory: "{{user_home_directory}}Clouds/{{cloud_fqdn}}/"