1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_i3wm.git synced 2024-08-16 10:09:53 +02:00
ansible_role_i3wm/tasks/main.yml

66 lines
1.7 KiB
YAML
Raw Normal View History

2017-12-31 00:56:01 +01:00
---
2019-05-29 11:00:13 +02:00
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
2019-01-19 00:14:00 +01:00
- name: register variables
import_tasks: variables.yml
2017-12-31 00:56:01 +01:00
2018-11-15 15:12:44 +01:00
# ensure i3 packages are installed [Debian].
2017-12-31 00:56:01 +01:00
- include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'
2018-11-17 22:46:13 +01:00
# ensure i3 packages are installed [Archlinux}
2018-11-17 22:56:04 +01:00
- include_tasks: setup-Archlinux.yml
2018-11-17 22:46:13 +01:00
when: ansible_os_family == 'Archlinux'
2018-11-15 15:12:44 +01:00
# ensure i3 packages are installed [RHEL].
- include_tasks: setup-RedHat.yml
when: ansible_os_family == 'Fedora' or ansible_os_family == 'RedHat'
2017-12-31 00:56:01 +01:00
# create i3 config file
2018-11-15 15:12:44 +01:00
- name: Creates directory
2020-10-09 16:46:57 +02:00
become: true
become_user: "{{ i3wm_user }}"
2019-04-24 12:43:25 +02:00
file:
2019-04-24 09:53:29 +02:00
path: '/home/{{ i3wm_user }}/.config'
2018-11-15 15:12:44 +01:00
state: directory
mode: 0750
2019-04-24 09:53:29 +02:00
owner: "{{ i3wm_user }}"
2018-11-15 15:12:44 +01:00
2017-12-31 00:56:01 +01:00
- name: create i3 config folder
2020-10-09 16:46:57 +02:00
become: true
become_user: "{{ i3wm_user }}"
2017-12-31 00:56:01 +01:00
file:
2019-04-24 09:53:29 +02:00
path: '/home/{{ i3wm_user }}/.config/i3/'
2017-12-31 00:56:01 +01:00
state: directory
mode: 0755
2019-04-24 09:53:29 +02:00
owner: "{{ i3wm_user }}"
2017-12-31 00:56:01 +01:00
2020-10-14 13:18:44 +02:00
- name: copy multiple images
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0644
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
2020-10-09 16:46:57 +02:00
- name: copy and validate i3wm config file
become: true
become_user: "{{ i3wm_user }}"
template:
src: templates/config.j2
dest: "/home/{{ i3wm_user }}/.config/i3/config"
mode: 0600
backup: true
validate: i3 -C -c %s
2019-06-10 21:56:11 +02:00
2020-10-14 13:18:44 +02:00
- name: vim - copy bin src folder
become: true
become_user: "{{ i3wm_user }}"
2019-06-11 13:09:08 +02:00
copy:
2020-10-14 13:18:44 +02:00
src: "{{ role_path }}/files/i3blocks/"
dest: "~/.config/i3blocks"
mode: 0755