Create config file directories before copy

This commit is contained in:
Jake Howard 2018-10-06 12:23:08 +01:00
parent 030f007bc7
commit 3263f1a36f
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -4,30 +4,6 @@
mode: 0644 mode: 0644
owner: "{{ user }}" owner: "{{ user }}"
- copy:
src: ./files/terminator.conf
dest: "{{ home }}/.config/terminator/config"
mode: 0644
owner: "{{ user }}"
- copy:
src: ./files/uniemoji.json
dest: "{{ home }}/.config/uniemoji/custom.json"
mode: 0644
owner: "{{ user }}"
- copy:
src: ./files/assh.yml
dest: "{{ home}}/.ssh/assh.yml"
mode: 0644
owner: "{{ user }}"
- copy:
src: ./files/gitignore_global
dest: "{{ home }}/.config/.gitignore"
mode: 0644
owner: "{{ user }}"
- template: - template:
src: ./files/gitconfig.conf src: ./files/gitconfig.conf
dest: "{{ home }}/.gitconfig" dest: "{{ home }}/.gitconfig"
@ -35,12 +11,6 @@
owner: "{{ user }}" owner: "{{ user }}"
group: users group: users
- copy:
src: ./files/rofi.conf
dest: "{{ home }}/.config/rofi/config"
mode: 0644
owner: "{{ user }}"
- copy: - copy:
src: ./files/touchpad.conf src: ./files/touchpad.conf
dest: /usr/share/X11/xorg.conf.d/30-touchpad.conf dest: /usr/share/X11/xorg.conf.d/30-touchpad.conf
@ -48,20 +18,33 @@
owner: "{{ user }}" owner: "{{ user }}"
- copy: - copy:
src: ./files/caret-preferences.md src: ./files/assh.yml
dest: "{{ home }}/.config/Caret/Preferences.md" dest: "{{ home}}/.ssh/assh.yml"
mode: 0644 mode: 0644
owner: "{{ user }}" owner: "{{ user }}"
- copy: - set_fact:
src: ./files/alacritty.yml user_config_files:
dest: "{{ home }}/.config/alacritty/alacritty.yml" - { src: "terminator.conf", dest: "{{ home }}/.config/terminator/config" }
- { src: "uniemoji.json", dest: "{{ home }}/.config/uniemoji/custom.json" }
- { src: "gitignore_global", dest: "{{ home }}/.config/.gitignore" }
- { src: "rofi.conf", dest: "{{ home }}/.config/rofi/config" }
- { src: "caret-preferences.md", dest: "{{ home }}/.config/Caret/Preferences.md" }
- { src: "alacritty.yml", dest: "{{ home }}/.config/alacritty/alacritty.yml" }
- name: "Create config file directories"
with_items: "{{ user_config_files }}"
file:
path: '{{ item.dest | dirname }}'
state: directory
owner: "{{ user }}"
mode: 0755
- name: "Copy config files"
with_items: "{{ user_config_files }}"
copy:
src: './files/{{ item.src }}'
dest: '{{ item.dest }}'
mode: 0644 mode: 0644
owner: "{{ user }}" owner: "{{ user }}"
# - name: Tilix config
# shell: "dconf load /etc/gexperts/Tilix/"
# args:
# stdin: "{{ lookup('file', './files/tilix.conf') }}"
# become: true
# become_user: jake