|
47 | 47 | state: present |
48 | 48 | when: etc_sudoers.stat.exists |
49 | 49 |
|
50 | | -- name: Create 'cloudbox_folder_path' variable |
| 50 | +- name: Create 'new_home_path' variable |
51 | 51 | set_fact: |
52 | | - cloudbox_folder_path: "/home/{{ user }}/cloudbox" |
| 52 | + new_home_path: "/home/{{ user }}" |
53 | 53 |
|
54 | 54 | - name: "Do following tasks when not in the user's cloudbox folder" |
55 | 55 | block: |
|
66 | 66 | - name: "Clone Cloudbox project" |
67 | 67 | git: |
68 | 68 | repo: "https://github.com/cloudbox/cloudbox" |
69 | | - dest: "{{ cloudbox_folder_path }}/" |
| 69 | + dest: "{{ new_home_path }}/cloudbox/" |
70 | 70 | version: "{{ git_branch.stdout }}" |
71 | 71 | recursive: yes |
72 | 72 | force: yes |
|
77 | 77 | - name: "Copy config files to cloudbox folder" |
78 | 78 | copy: |
79 | 79 | src: "{{ item }}" |
80 | | - dest: "{{ cloudbox_folder_path }}/" |
| 80 | + dest: "{{ new_home_path }}/cloudbox/" |
81 | 81 | owner: "{{ user }}" |
82 | 82 | group: "{{ user }}" |
83 | 83 | force: yes |
|
94 | 94 | - "Cloudbox folder was migrated to a home location." |
95 | 95 | - "Please re-login with the '{{ user }}' account and rerun the {{ |
96 | 96 | ('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." |
98 | 98 | when: ('preinstall' not in ansible_run_tags) |
99 | 99 |
|
100 | 100 | - name: "Set preinstall variables" |
101 | 101 | set_fact: |
102 | 102 | preinstall_user_relogin: true |
103 | 103 | when: ('preinstall' in ansible_run_tags) |
104 | 104 |
|
105 | | - when: (playbook_dir != cloudbox_folder_path) and not (continuous_integration) |
| 105 | + when: (playbook_dir != (new_home_path + '/cloudbox')) and not (continuous_integration) |
106 | 106 |
|
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