X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Froles%2Fphd%2Ftasks%2Fmain.yml;h=163a34bc0b6a468ae646ac1488e744198bc2e7ce;hb=7a7816e08468f05474b5cd246a945d82e15fbbfd;hp=cb36caa7276bb51b725765e795f14361c1f3af50;hpb=821cc704535e7fb9a2aaafc5692ad68e38308786;p=ansible.git diff --git a/playbooks/roles/phd/tasks/main.yml b/playbooks/roles/phd/tasks/main.yml index cb36caa..163a34b 100644 --- a/playbooks/roles/phd/tasks/main.yml +++ b/playbooks/roles/phd/tasks/main.yml @@ -30,7 +30,7 @@ group: phd groups: "{{ system_groups }}" - - name: Remove mc directories + - name: Remove default mc directories file: path: "{{ item }}" state: absent @@ -40,8 +40,10 @@ unarchive: src: ~/archive/STORE/phd/Home/phd.tar.bz2 dest: /home + 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 @@ -50,7 +52,7 @@ 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