X Tutup
Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 239559b

Browse files
committed
Preinstall: Updated variable used for new home path. [ansible]
1 parent e6297e8 commit 239559b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

roles/rclone/tasks/preinstall.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
debug:
1818
msg:
1919
- "Cloudbox folder was migrated to a new home location."
20-
- "Re-login with the '{{ user }}' account and run the Cloudbox installer from the '{{ cloudbox_folder_path }}/' path."
20+
- "Re-login with the '{{ user }}' account and run the Cloudbox installer from the '{{ new_home_path }}/cloudbox/' path."
2121
when: (preinstall_user_relogin is defined) and (preinstall_user_relogin)
2222

2323
- name: "Preinstall | Cloudbox pre-install has completed!"

roles/user/tasks/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
state: present
4848
when: etc_sudoers.stat.exists
4949

50-
- name: Create 'cloudbox_folder_path' variable
50+
- name: Create 'new_home_path' variable
5151
set_fact:
52-
cloudbox_folder_path: "/home/{{ user }}/cloudbox"
52+
new_home_path: "/home/{{ user }}"
5353

5454
- name: "Do following tasks when not in the user's cloudbox folder"
5555
block:
@@ -66,7 +66,7 @@
6666
- name: "Clone Cloudbox project"
6767
git:
6868
repo: "https://github.com/cloudbox/cloudbox"
69-
dest: "{{ cloudbox_folder_path }}/"
69+
dest: "{{ new_home_path }}/cloudbox/"
7070
version: "{{ git_branch.stdout }}"
7171
recursive: yes
7272
force: yes
@@ -77,7 +77,7 @@
7777
- name: "Copy config files to cloudbox folder"
7878
copy:
7979
src: "{{ item }}"
80-
dest: "{{ cloudbox_folder_path }}/"
80+
dest: "{{ new_home_path }}/cloudbox/"
8181
owner: "{{ user }}"
8282
group: "{{ user }}"
8383
force: yes
@@ -94,15 +94,15 @@
9494
- "Cloudbox folder was migrated to a home location."
9595
- "Please re-login with the '{{ user }}' account and rerun the {{
9696
('restore' in ansible_run_tags) | ternary('restore tag','Cloudbox Installer') }}
97-
from the '{{ cloudbox_folder_path }}/' path."
97+
from the '{{ new_home_path }}/cloudbox/' path."
9898
when: ('preinstall' not in ansible_run_tags)
9999

100100
- name: "Set preinstall variables"
101101
set_fact:
102102
preinstall_user_relogin: true
103103
when: ('preinstall' in ansible_run_tags)
104104

105-
when: (playbook_dir != cloudbox_folder_path) and not (continuous_integration)
105+
when: (playbook_dir != (new_home_path + '/cloudbox')) and not (continuous_integration)
106106

107-
- name: "Reset ownership of '/home/{{ user }}/' path"
108-
file: "path=/home/{{ user }} state=directory owner={{ user }} group={{ user }} recurse=yes follow=no"
107+
- name: "Reset ownership of '{{ new_home_path }}/' path"
108+
file: "path={{ new_home_path }} state=directory owner={{ user }} group={{ user }} recurse=yes follow=no"

0 commit comments

Comments
 (0)
X Tutup