X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian%2Froles%2Froot%2Ftasks%2Fmc.yml;h=ec8052308c4f808397fb43f591ce2b20c19ca81f;hb=2e89ce86ff469b61661a0c7335b75ba6d5bcf05f;hp=dbb78bad25e8639dc1a4e7d4f3e34284f15d6bdf;hpb=34ee94071359b7e0e18c1365730fda2aff634fd5;p=ansible.git diff --git a/playbooks/debian/roles/root/tasks/mc.yml b/playbooks/debian/roles/root/tasks/mc.yml index dbb78ba..ec80523 100644 --- a/playbooks/debian/roles/root/tasks/mc.yml +++ b/playbooks/debian/roles/root/tasks/mc.yml @@ -7,7 +7,7 @@ - debug: msg: "mc links have already been created" - when: links_exist.results|selectattr('stat.islnk')|list|length == 3 + when: links_exist.results|selectattr('stat.exists')|selectattr('stat.islnk')|list|length == 3 - name: "Setup root mc - create directories for mc links" become: true @@ -16,7 +16,7 @@ state: directory mode: "0700" loop: ['.cache', '.config', '.local/share'] - when: links_exist.results|selectattr('stat.islnk')|list|length == 3 + when: links_exist.results|selectattr('stat.exists')|selectattr('stat.islnk')|list|length != 3 - name: "Setup root mc - remove mc directories" become: true @@ -24,7 +24,7 @@ path: "~root/{{ item }}" state: absent loop: ['.cache/mc', '.config/mc', '.local/share/mc'] - when: links_exist.results|selectattr('stat.islnk')|list|length == 3 + when: links_exist.results|selectattr('stat.exists')|selectattr('stat.islnk')|list|length != 3 - name: "Setup root mc - link mc directories (1)" become: true @@ -34,7 +34,7 @@ src: "../.mc" force: yes loop: ['.cache/mc', '.config/mc'] - when: links_exist.results|selectattr('stat.islnk')|list|length == 3 + when: links_exist.results|selectattr('stat.exists')|selectattr('stat.islnk')|list|length != 3 - name: "Setup root mc - link mc directories (2)" become: true @@ -44,7 +44,7 @@ src: "../../.mc" force: yes loop: ['.local/share/mc'] - when: links_exist.results|selectattr('stat.islnk')|list|length == 3 + when: links_exist.results|selectattr('stat.exists')|selectattr('stat.islnk')|list|length != 3 - name: "Setup root mc - overwrite files from ~phd/admin" become: true