summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-11 17:08:37 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-11 18:25:58 +0100
commit2f756cbbc66ec03fdc0ca9eaeafd2fb5620f431c (patch)
tree3b485b97ecff6bc18e9373dbe4ecb72b54890650
parentb4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43 (diff)
downloadAnsible-2f756cbbc66ec03fdc0ca9eaeafd2fb5620f431c.tar.gz
Ansible-2f756cbbc66ec03fdc0ca9eaeafd2fb5620f431c.tar.zst
Ansible-2f756cbbc66ec03fdc0ca9eaeafd2fb5620f431c.zip
Add zeal docsets
-rw-r--r--roles/contexts/fretlink/defaults/main.yml15
-rw-r--r--roles/contexts/fretlink/tasks/main.yml19
-rw-r--r--roles/init/templates/pam_environment.j23
-rw-r--r--site.yml3
4 files changed, 39 insertions, 1 deletions
diff --git a/roles/contexts/fretlink/defaults/main.yml b/roles/contexts/fretlink/defaults/main.yml
new file mode 100644
index 0000000..ee9836f
--- /dev/null
+++ b/roles/contexts/fretlink/defaults/main.yml
@@ -0,0 +1,15 @@
1---
2zeal_roles:
3 - Ansible
4 - Bash
5 - Docker
6 - Haskell
7 - MongoDB
8 - NodeJS
9 - PostgreSQL
10 - Puppet
11 - React
12 - Redis
13 - Rust
14 - Vim
15 - XSLT
diff --git a/roles/contexts/fretlink/tasks/main.yml b/roles/contexts/fretlink/tasks/main.yml
index 07861ed..78f733a 100644
--- a/roles/contexts/fretlink/tasks/main.yml
+++ b/roles/contexts/fretlink/tasks/main.yml
@@ -28,6 +28,25 @@
28 - [ "docsets", "path", "{{ lookup('env', 'XDG_DATA_HOME') }}/Zeal/Zeal/docsets" ] 28 - [ "docsets", "path", "{{ lookup('env', 'XDG_DATA_HOME') }}/Zeal/Zeal/docsets" ]
29 - [ "search", "fuzzy_search_enabled", "false" ] 29 - [ "search", "fuzzy_search_enabled", "false" ]
30 - [ "tabs", "open_new_tab_after_active", "false" ] 30 - [ "tabs", "open_new_tab_after_active", "false" ]
31- name: Zeal docsets
32 block:
33 - name: Check missing Zeal docsets
34 register: zeal_missing_docsets
35 shell: "for i in {{ zeal_roles | join(' ') }}; do [ -d $XDG_DATA_HOME/Zeal/Zeal/docsets/$i.docset ] || echo $i; done"
36 changed_when: zeal_missing_docsets.stdout != ""
37 check_mode: no
38 - name: Ask for Zeal docsets
39 when: zeal_missing_docsets.stdout != ""
40 pause:
41 prompt: "install Zeal docsets ? [y/N]"
42 register: zeal_install_docsets
43 check_mode: no
44 - name: Zeal docsets
45 when: zeal_missing_docsets.stdout != "" and zeal_install_docsets.user_input.startswith("y")
46 shell: "dasht-docsets-install {{ item }}"
47 args:
48 creates: "$XDG_DATA_HOME/Zeal/Zeal/docsets/{{ item }}.docset"
49 loop: "{{ zeal_missing_docsets.stdout.split('\n') }}"
31- name: Create pm2 config dir 50- name: Create pm2 config dir
32 file: 51 file:
33 path: $XDG_CONFIG_HOME/pm2 52 path: $XDG_CONFIG_HOME/pm2
diff --git a/roles/init/templates/pam_environment.j2 b/roles/init/templates/pam_environment.j2
index fc65a10..3b8e96e 100644
--- a/roles/init/templates/pam_environment.j2
+++ b/roles/init/templates/pam_environment.j2
@@ -65,6 +65,9 @@ NPM_CONFIG_USERCONFIG DEFAULT="${XDG_CONFIG_HOME}/npm/npmrc"
65# TMUX 65# TMUX
66TMUX_TMPDIR DEFAULT="${XDG_RUNTIME_DIR}" 66TMUX_TMPDIR DEFAULT="${XDG_RUNTIME_DIR}"
67 67
68# Zeal
69DASHT_DOCSETS_DIR DEFAULT="${XDG_DATA_HOME}/Zeal/Zeal/docsets/"
70
68# node_modules/pm2/paths.js 71# node_modules/pm2/paths.js
69PM2_HOME DEFAULT="${XDG_DATA_HOME}/pm2" 72PM2_HOME DEFAULT="${XDG_DATA_HOME}/pm2"
70PM2_CONF_FILE DEFAULT="${XDG_CONFIG_HOME}/pm2/conf.js" 73PM2_CONF_FILE DEFAULT="${XDG_CONFIG_HOME}/pm2/conf.js"
diff --git a/site.yml b/site.yml
index 87f4858..28a64ed 100644
--- a/site.yml
+++ b/site.yml
@@ -22,4 +22,5 @@
22 - tools 22 - tools
23 - gnupg 23 - gnupg
24 - cron 24 - cron
25 - contexts/fretlink 25 - role: contexts/fretlink
26 tags: ["fretlink"]