group: phd
groups: "{{ system_groups }}"
- - name: Remove mc directories
+ - name: Remove default mc directories
file:
path: "{{ item }}"
state: absent
register: phd_extracted
failed_when: "(ansible_facts.os_family == 'Debian' and 'rc' in phd_extracted and phd_extracted.rc != 0) or (ansible_facts.os_family == 'RedHat' and ('rc' in phd_extracted and phd_extracted.rc not in [0, 139]))"
- - name: Add alias
+ - name: Add alias (Debian)
become: true
lineinfile:
path: /etc/aliases
when: ansible_facts.os_family == 'Debian'
when: phd_exists.results|selectattr('stat.exists')|list|length != 2
-- name: Add alias
+- name: Add alias (RedHat)
become: true
lineinfile:
path: /etc/aliases