mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
Treat Org home as a normal directory
This commit is contained in:
@@ -390,34 +390,13 @@
|
|||||||
mode: "0755"
|
mode: "0755"
|
||||||
- path: "{{ user_home }}/.local/share/keyrings"
|
- path: "{{ user_home }}/.local/share/keyrings"
|
||||||
mode: "0700"
|
mode: "0700"
|
||||||
|
- path: "{{ user_home }}/Org"
|
||||||
|
mode: "0755"
|
||||||
- path: "{{ user_home }}/Remotes"
|
- path: "{{ user_home }}/Remotes"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
- path: /usr/src
|
- path: /usr/src
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
- name: Check whether Org home path already exists
|
|
||||||
tags: [dotfiles, dotfiles:desktop]
|
|
||||||
ansible.builtin.stat:
|
|
||||||
path: "{{ user_home }}/Org"
|
|
||||||
follow: false
|
|
||||||
register: org_home_path
|
|
||||||
|
|
||||||
- name: Fail when Org home path conflicts with managed symlink
|
|
||||||
tags: [dotfiles, dotfiles:desktop]
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: "{{ user_home }}/Org already exists and is not the managed symlink to {{ user_home }}/Remotes/pCloud/Org"
|
|
||||||
when:
|
|
||||||
- org_home_path.stat.exists | default(false)
|
|
||||||
- not (org_home_path.stat.islnk | default(false) and org_home_path.stat.lnk_source | default('') == user_home + '/Remotes/pCloud/Org')
|
|
||||||
|
|
||||||
- name: Ensure Org home path points to pCloud Org directory
|
|
||||||
tags: [dotfiles, dotfiles:desktop]
|
|
||||||
ansible.builtin.file:
|
|
||||||
src: "{{ user_home }}/Remotes/pCloud/Org"
|
|
||||||
dest: "{{ user_home }}/Org"
|
|
||||||
state: link
|
|
||||||
force: true
|
|
||||||
|
|
||||||
- name: Ensure maildir directories exist
|
- name: Ensure maildir directories exist
|
||||||
tags: [dotfiles, dotfiles:desktop]
|
tags: [dotfiles, dotfiles:desktop]
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
Reference in New Issue
Block a user