2021-11-08 12:28:11 +01:00
|
|
|
---
|
|
|
|
- name: Creates directory
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: '/home/{{ i3wm_user }}/.config'
|
|
|
|
state: directory
|
|
|
|
mode: 0750
|
|
|
|
owner: "{{ i3wm_user }}"
|
|
|
|
group: "{{ i3wm_user }}"
|
|
|
|
|
|
|
|
- name: create i3 config folder
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: '/home/{{ i3wm_user }}/.config/i3/'
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
owner: "{{ i3wm_user }}"
|
|
|
|
group: "{{ i3wm_user }}"
|
|
|
|
|
|
|
|
- name: copy multiple images
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0644
|
|
|
|
owner: "{{ i3wm_user }}"
|
|
|
|
group: "{{ i3wm_user }}"
|
|
|
|
with_items:
|
|
|
|
- { src: 'files/background.png', dest: "/home/{{ i3wm_user }}/.config/background.png" }
|
|
|
|
- { src: 'files/lockscreen.png', dest: '/home/{{ i3wm_user }}/.config/lockscreen.png' }
|
|
|
|
when: i3wm_copy_wallpapers | bool
|
|
|
|
|
|
|
|
- name: copy and validate i3wm config file
|
|
|
|
become: true
|
2021-11-08 13:55:47 +01:00
|
|
|
ansible.builtin.template:
|
2021-11-08 12:28:11 +01:00
|
|
|
src: templates/config.j2
|
|
|
|
dest: "/home/{{ i3wm_user }}/.config/i3/config"
|
|
|
|
mode: 0600
|
|
|
|
backup: true
|
|
|
|
validate: i3 -C -c %s
|
|
|
|
owner: "{{ i3wm_user }}"
|
|
|
|
group: "{{ i3wm_user }}"
|
|
|
|
|
|
|
|
- name: copy bin src folder
|
|
|
|
become: true
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ role_path }}/files/i3blocks/"
|
|
|
|
dest: "~/.config/i3blocks"
|
|
|
|
mode: 0755
|
|
|
|
owner: "{{ i3wm_user }}"
|
|
|
|
group: "{{ i3wm_user }}"
|