1 - name: Test if user phd already exists
5 changed_when: not phd_exists.stat.exists
6 loop: ['~/.profile', '~/.shellrc']
9 msg: "User phd has already been created"
10 when: phd_exists.results|selectattr('stat.exists')|list|length == 2
12 - name: Create and setup user phd
14 - name: Create system groups
19 loop: "{{ system_groups.split(',') }}"
21 - name: Create group phd
31 groups: "{{ system_groups }}"
33 - name: Upload and extract home archive
35 src: ~/archive/STORE/phd/Home/phd.tar.bz2
37 when: phd_exists.results|selectattr('stat.exists')|list|length != 2