Skip to content

Commit e56b7de

Browse files
prakashsuryajustsanjeev
authored andcommitted
DLPX-89763 DLPX-86523 delphix-platform changes
PR URL: https://www.github.com/delphix/delphix-platform/pull/477
1 parent ca767ef commit e56b7de

File tree

1 file changed

+33
-3
lines changed
  • files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks

1 file changed

+33
-3
lines changed

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

+33-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# it below; otherwise that task will fail.
2323
#
2424
- file:
25-
path: /export/home
25+
path: /home
2626
state: directory
2727
mode: 0755
2828

@@ -35,7 +35,26 @@
3535
shell: /bin/bash
3636
create_home: yes
3737
comment: Delphix User
38-
home: /export/home/delphix
38+
home: /home/delphix
39+
40+
#
41+
# When it's an upgrade in that case the home dateset
42+
# is required to be mounted on mount point /home
43+
# from the old mount point /export/home
44+
#
45+
- command: mount
46+
register: mount_home
47+
ignore_errors: True
48+
- set_fact:
49+
export_home: "{{ mount_home.stdout | regex_search(export_home_regex, multiline=True)}}"
50+
vars:
51+
export_home_regex: "rpool/ROOT/delphix.[a-zA-Z0-9]+/home on /export/home"
52+
- debug: msg={{ export_home }}
53+
- replace:
54+
path: /etc/fstab
55+
regexp: '/export/home'
56+
replace: '/home'
57+
when: export_home | length > 0
3958

4059
#
4160
# In order for this locale to be used (e.g. by virtualization) we need
@@ -689,7 +708,7 @@
689708
690709
- name: Source bash completion
691710
blockinfile:
692-
dest: "/export/home/delphix/.bashrc"
711+
dest: "/home/delphix/.bashrc"
693712
block: |
694713
. /etc/bash_completion.d/systemctl
695714
. /etc/bash_completion.d/zfs
@@ -710,3 +729,14 @@
710729
name: "nullmailer"
711730
state: "stopped"
712731
when: not ansible_is_chroot
732+
733+
#
734+
# The presence of the auto_home is an issue
735+
# because this is also mounted on /home so
736+
# we need to remove this.
737+
#
738+
739+
- lineinfile:
740+
path: /etc/auto.master
741+
line: "/home auto_home -nobrowse"
742+
state: absent

0 commit comments

Comments
 (0)