]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/tools/tasks/main.yml
Add dir creation
[perso/Immae/Config/Ansible.git] / roles / tools / tasks / main.yml
index aa61aabd39bb29af87ef873adf8fe9fd554747c2..94324fc87a2dca44cde4ab67dced97a5e91dd6dd 100644 (file)
@@ -5,26 +5,49 @@
   loop:
     - git
     - gnupg
-- name: mplayer config file
-  copy:
-    src: mplayer
-    dest: $XDG_CONFIG_HOME/mplayer/config
-- name: psql config file
-  copy:
-    src: psqlrc
-    dest: $XDG_CONFIG_HOME/psql/psqlrc
-- name: psql history directory
+- name: Config dirs
   file:
-    path: $XDG_STATE_HOME/psql
     state: directory
+    path: "$XDG_CONFIG_HOME/{{ item }}"
+  loop:
+    - htop
+    - mplayer
+    - psql
+    - vim
+    - tmux
+    - youtube-viewer
+    - remind
+    - systemd/user
+- name: config files
+  copy:
+    src: "{{ item }}"
+    dest: "$XDG_CONFIG_HOME/{{ item }}"
+  loop:
+    - htop/htoprc
+    - mplayer/config
+- name: template config files
+  template:
+    src: "{{ item }}.j2"
+    dest: "$XDG_CONFIG_HOME/{{ item }}"
+  loop:
+    - wgetrc
+- name: postgresql
+  block:
+    - name: psql config file
+      copy:
+        src: psqlrc
+        dest: $XDG_CONFIG_HOME/psql/psqlrc
+    - name: psql history directory
+      file:
+        path: $XDG_STATE_HOME/psql
+        state: directory
 - name: vim config file
-  register: vim_result
   copy:
     src: vimrc
     dest: $XDG_CONFIG_HOME/vim/vimrc
-- name: run PlugInstall
-  shell: vim -c PlugInstall -c qa
-  when: vim_result.changed
+  notify:
+    - run PlugInstall
+- meta: flush_handlers
 - name: tmux config file
   template:
     src: tmux.conf.j2
     src: youtube-viewer.conf.j2
     dest: $XDG_CONFIG_HOME/youtube-viewer/youtube-viewer.conf
 - name: remind config file
-  synchronize:
-    recursive: yes
-    archive: no
-    checksum: yes
-    src: remind/commands/
-    dest: /$XDG_CONFIG_HOME/remind/
+  copy:
+    src: "remind/commands/{{ item }}"
+    dest: "$XDG_CONFIG_HOME/remind/{{ item }}"
+  loop:
+    - work
 - name: remind service file
   copy:
     src: remind/remind@.service
     dest: $XDG_CONFIG_HOME/systemd/user/
   notify:
     - reload systemd
+- meta: flush_handlers
+- name: Clone password store
+  git:
+    dest: "$XDG_DATA_HOME/pass"
+    repo: gitolite@git.immae.eu:perso/Immae/Prive/Password_store
+- name: dconf configuration
+  # check: `dconf dump /` or `dconf-editor`
+  dconf:
+    key: "{{ item.0 }}"
+    value: "{{ item.1 }}"
+  loop:
+    - ["/org/gnome/evince/default/continuous", "true"]
+    - ["/org/gnome/evince/default/fullscreen", "true"]
+    - ["/org/gtk/settings/file-chooser/sort-column", "'name'"]
+    - ["/org/gtk/settings/file-chooser/show-size-column", "true"]
+    - ["/org/gtk/settings/file-chooser/show-hidden", "true"]
+    - ["/org/gtk/settings/file-chooser/location-mode", "'path-bar'"]
+    - ["/org/gtk/settings/file-chooser/sort-directories-first", "false"]
+    - ["/org/gtk/settings/file-chooser/sort-order", "'ascending'"]
+    - ["/org/gtk/settings/file-chooser/startup-mode", "'recent'"]
+- name: gtk2 configuration
+  ini_file:
+    path: "$XDG_CONFIG_HOME/gtk-2.0/gtkfilechooser.ini"
+    section: "Filechooser Settings"
+    option: "{{ item.0 }}"
+    value: "{{ item.1 }}"
+    no_extra_spaces: true
+  loop:
+    - [ "SortColumn", "name" ]
+    - [ "ShowSizeColumn", "true" ]
+    - [ "ShowHidden", "true" ]
+    - [ "LocationMode", "path-bar" ]
+    - [ "SortOrder", "ascending" ]
+    - [ "StartupMode", "recent" ]
+- name: pavucontrol configuration
+  ini_file:
+    path: "$XDG_CONFIG_HOME/pavucontrol.ini"
+    section: "window"
+    option: "{{ item.0 }}"
+    value: "{{ item.1 }}"
+    no_extra_spaces: true
+  loop:
+    - [ "sinkInputType", "0" ]
+    - [ "sourceOutputType", "0" ]
+    - [ "sinkType", "0" ]
+    - [ "sourceType", "0" ]
+    - [ "showVolumeMeters", "1" ]
+- name: ssh config dirs
+  file:
+    state: directory
+    path: "$HOME/.ssh"
+- name: ssh files
+  copy:
+    src: "ssh/{{ item }}"
+    dest: "$HOME/.ssh/{{ item }}"
+  loop:
+    - known_hosts
+    - rc
+- name: ssh configuration
+  template:
+    src: ssh_config.j2
+    dest: $HOME/.ssh/config