group: phd
groups: "{{ system_groups }}"
+ - name: Remove mc directories
+ file:
+ path: "{{ item }}"
+ state: absent
+ loop: ['~/.cache/mc', '~/.config/mc', '~/.local/share/mc']
+
- name: Upload and extract home archive
unarchive:
src: ~/archive/STORE/phd/Home/phd.tar.bz2
dest: /home
+
+ - name: Add alias
+ become: true
+ lineinfile:
+ path: /etc/aliases
+ regexp: "^root: phd$"
+ line: "root: phd"
when: phd_exists.results|selectattr('stat.exists')|list|length != 2