]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blob - roles/tools/tasks/main.yml
Cleanup item loop controls
[perso/Immae/Config/Ansible.git] / roles / tools / tasks / main.yml
1 ---
2 - name: Import other tools
3 include_role:
4 name: "{{ tool_import_item }}"
5 loop:
6 - git
7 - gnupg
8 loop_control:
9 loop_var: tool_import_item
10 - name: Config dirs
11 file:
12 state: directory
13 path: "$XDG_CONFIG_HOME/{{ item }}"
14 loop:
15 - htop
16 - mplayer
17 - psql
18 - vim
19 - tmux
20 - youtube-viewer
21 - remind
22 - systemd/user
23 - name: config files
24 copy:
25 src: "{{ item }}"
26 dest: "$XDG_CONFIG_HOME/{{ item }}"
27 loop:
28 - htop/htoprc
29 - mplayer/config
30 - name: template config files
31 template:
32 src: "{{ item }}.j2"
33 dest: "$XDG_CONFIG_HOME/{{ item }}"
34 loop:
35 - wgetrc
36 - name: postgresql
37 block:
38 - name: psql config file
39 copy:
40 src: psqlrc
41 dest: $XDG_CONFIG_HOME/psql/psqlrc
42 - name: psql history directory
43 file:
44 path: $XDG_STATE_HOME/psql
45 state: directory
46 - name: vim config file
47 copy:
48 src: vimrc
49 dest: $XDG_CONFIG_HOME/vim/vimrc
50 notify:
51 - run PlugInstall
52 - meta: flush_handlers
53 - name: tmux config file
54 template:
55 src: tmux.conf.j2
56 dest: $XDG_CONFIG_HOME/tmux/tmux.conf
57 - name: youtube viewer config file
58 template:
59 src: youtube-viewer.conf.j2
60 dest: $XDG_CONFIG_HOME/youtube-viewer/youtube-viewer.conf
61 - name: remind config file
62 copy:
63 src: "remind/commands/{{ item }}"
64 dest: "$XDG_CONFIG_HOME/remind/{{ item }}"
65 loop:
66 - work
67 - name: remind service file
68 copy:
69 src: remind/remind@.service
70 dest: $XDG_CONFIG_HOME/systemd/user/
71 notify:
72 - reload systemd
73 - meta: flush_handlers
74 - name: Clone password store
75 git:
76 dest: "$XDG_DATA_HOME/pass"
77 repo: gitolite@git.immae.eu:perso/Immae/Prive/Password_store
78 - name: dconf configuration
79 # check: `dconf dump /` or `dconf-editor`
80 dconf:
81 key: "{{ item.0 }}"
82 value: "{{ item.1 }}"
83 loop:
84 - ["/org/gnome/evince/default/continuous", "true"]
85 - ["/org/gnome/evince/default/fullscreen", "true"]
86 - ["/org/gtk/settings/file-chooser/sort-column", "'name'"]
87 - ["/org/gtk/settings/file-chooser/show-size-column", "true"]
88 - ["/org/gtk/settings/file-chooser/show-hidden", "true"]
89 - ["/org/gtk/settings/file-chooser/location-mode", "'path-bar'"]
90 - ["/org/gtk/settings/file-chooser/sort-directories-first", "false"]
91 - ["/org/gtk/settings/file-chooser/sort-order", "'ascending'"]
92 - ["/org/gtk/settings/file-chooser/startup-mode", "'recent'"]
93 - name: gtk2 configuration
94 ini_file:
95 path: "$XDG_CONFIG_HOME/gtk-2.0/gtkfilechooser.ini"
96 section: "Filechooser Settings"
97 option: "{{ item.0 }}"
98 value: "{{ item.1 }}"
99 no_extra_spaces: true
100 loop:
101 - [ "SortColumn", "name" ]
102 - [ "ShowSizeColumn", "true" ]
103 - [ "ShowHidden", "true" ]
104 - [ "LocationMode", "path-bar" ]
105 - [ "SortOrder", "ascending" ]
106 - [ "StartupMode", "recent" ]
107 - name: pavucontrol configuration
108 ini_file:
109 path: "$XDG_CONFIG_HOME/pavucontrol.ini"
110 section: "window"
111 option: "{{ item.0 }}"
112 value: "{{ item.1 }}"
113 no_extra_spaces: true
114 loop:
115 - [ "sinkInputType", "0" ]
116 - [ "sourceOutputType", "0" ]
117 - [ "sinkType", "0" ]
118 - [ "sourceType", "0" ]
119 - [ "showVolumeMeters", "1" ]
120 - name: ssh config dirs
121 file:
122 state: directory
123 path: "$HOME/.ssh"
124 - name: ssh files
125 copy:
126 src: "ssh/{{ item }}"
127 dest: "$HOME/.ssh/{{ item }}"
128 loop:
129 - known_hosts
130 - rc
131 - name: ssh configuration
132 template:
133 src: ssh_config.j2
134 dest: $HOME/.ssh/config