This commit is contained in:
2026-03-23 21:44:46 +01:00
parent c7cf2128c5
commit bb45a79f36

View File

@@ -207,6 +207,22 @@
- nis-install-server - nis-install-server
# ---
# /etc/default/useradd
# ---
- name: (nis-install-server.yml) HOME in /etc/default/useradd setzen oder hinter Kommentar einfügen
ansible.builtin.lineinfile:
path: /etc/default/useradd
regexp: '^HOME='
insertafter: '^#\s*HOME='
line: "HOME={{ nis_base_home }}"
backup: true
when:
- nis_base_home is defined
- nis_base_home != '/home'
# --- # ---
# /etc/adduser.conf # /etc/adduser.conf
# --- # ---
@@ -215,6 +231,9 @@
stat: stat:
path: /etc/adduser.conf.ORIG path: /etc/adduser.conf.ORIG
register: adduser_conf_exists register: adduser_conf_exists
when:
- nis_base_home is defined
- nis_base_home != '/home'
tags: tags:
- nis-install - nis-install
- nis-install-server - nis-install-server
@@ -222,19 +241,25 @@
- name: (nis-install-server.yml) Backup existing file /etc/adduser.conf - name: (nis-install-server.yml) Backup existing file /etc/adduser.conf
command: cp -a /etc/adduser.conf /etc/adduser.conf.ORIG command: cp -a /etc/adduser.conf /etc/adduser.conf.ORIG
when: when:
when:
- nis_base_home is defined
- nis_base_home != '/home'
- adduser_conf_exists.stat.exists == False - adduser_conf_exists.stat.exists == False
tags: tags:
- nis-install - nis-install
- nis-install-server - nis-install-server
- name: (nis-install-server.yml) Adjust file '/etc/adduser.conf' - set 'DHOME'
replace: - name: (nis-install-server.yml) DHOME in /etc/adduser.conf setzen oder hinter Kommentar einfügen
ansible.builtin.lineinfile:
path: /etc/adduser.conf path: /etc/adduser.conf
regexp: '^#?DHOME=.*' regexp: '^DHOME='
replace: 'DHOME={{ nis_base_home }}' insertafter: '^#\s*DHOME='
tags: line: "DHOME={{ nis_base_home }}"
- nis-install backup: true
- nis-install-server when:
- nis_base_home is defined
- nis_base_home != '/home'
# --- # ---