]>
Commit | Line | Data |
---|---|---|
397c4fed IB |
1 | --- |
2 | - name: Import roles | |
3 | include_role: | |
e1c588d3 | 4 | name: "{{ fretlink_import_item }}" |
397c4fed IB |
5 | loop: |
6 | - programming/python | |
7 | - programming/haskell | |
8 | - programming/nodejs | |
e1c588d3 IB |
9 | loop_control: |
10 | loop_var: fretlink_import_item | |
587b6dd6 IB |
11 | - name: Config dirs |
12 | file: | |
13 | state: directory | |
14 | path: "$XDG_CONFIG_HOME/{{ item }}" | |
15 | loop: | |
16 | - autostart | |
17 | - Zeal | |
18 | - pm2 | |
397c4fed | 19 | - name: Config files |
eac82f28 IB |
20 | copy: |
21 | src: "config_files/{{ item }}" | |
22 | dest: "$XDG_CONFIG_HOME/{{ item }}" | |
23 | loop: | |
587b6dd6 | 24 | - autostart/zeal.desktop |
3dd3d428 IB |
25 | - name: zeal configuration |
26 | ini_file: | |
27 | path: "$XDG_CONFIG_HOME/Zeal/Zeal.conf" | |
28 | section: "{{ item.0 }}" | |
29 | option: "{{ item.1 }}" | |
30 | value: "{{ item.2 }}" | |
31 | no_extra_spaces: true | |
32 | loop: | |
33 | - [ "General", "check_for_update", "true" ] | |
34 | - [ "General", "hide_on_close", "true" ] | |
35 | - [ "General", "minimize_to_systray", "true" ] | |
36 | - [ "General", "show_systray_icon", "true" ] | |
37 | - [ "General", "start_minimized", "true" ] | |
38 | - [ "docsets", "path", "{{ lookup('env', 'XDG_DATA_HOME') }}/Zeal/Zeal/docsets" ] | |
39 | - [ "search", "fuzzy_search_enabled", "false" ] | |
40 | - [ "tabs", "open_new_tab_after_active", "false" ] | |
2f756cbb IB |
41 | - name: Zeal docsets |
42 | block: | |
43 | - name: Check missing Zeal docsets | |
44 | register: zeal_missing_docsets | |
45 | shell: "for i in {{ zeal_roles | join(' ') }}; do [ -d $XDG_DATA_HOME/Zeal/Zeal/docsets/$i.docset ] || echo $i; done" | |
46 | changed_when: zeal_missing_docsets.stdout != "" | |
47 | check_mode: no | |
48 | - name: Ask for Zeal docsets | |
49 | when: zeal_missing_docsets.stdout != "" | |
50 | pause: | |
51 | prompt: "install Zeal docsets ? [y/N]" | |
52 | register: zeal_install_docsets | |
53 | check_mode: no | |
54 | - name: Zeal docsets | |
55 | when: zeal_missing_docsets.stdout != "" and zeal_install_docsets.user_input.startswith("y") | |
56 | shell: "dasht-docsets-install {{ item }}" | |
57 | args: | |
58 | creates: "$XDG_DATA_HOME/Zeal/Zeal/docsets/{{ item }}.docset" | |
59 | loop: "{{ zeal_missing_docsets.stdout.split('\n') }}" | |
cf86d448 IB |
60 | - name: workdir |
61 | block: | |
587b6dd6 IB |
62 | - name: Workdir |
63 | file: | |
64 | state: directory | |
65 | path: $HOME/workdir | |
cf86d448 | 66 | - name: workdir scripts |
eac82f28 | 67 | copy: |
cf86d448 | 68 | mode: 0755 |
eac82f28 IB |
69 | src: "workdir/{{ item }}" |
70 | dest: "$HOME/workdir/{{ item }}" | |
71 | loop: | |
72 | - start | |
cf86d448 IB |
73 | - name: environment variables file |
74 | block: | |
75 | - name: extract environment | |
76 | shell: "pass show Travail/Fretlink/Environment" | |
77 | register: fretlink_environment | |
78 | changed_when: false | |
79 | check_mode: no | |
80 | - name: store environment | |
81 | copy: | |
82 | dest: $HOME/workdir/environment | |
83 | content: "{{ fretlink_environment.stdout }}" | |
e7e024a9 IB |
84 | rescue: |
85 | - debug: | |
86 | msg: "Could not read password store, continuing" | |
397c4fed IB |
87 | - name: enable remind service |
88 | systemd: | |
89 | state: started | |
90 | scope: user | |
91 | name: remind@work.service | |
92 | enabled: true |