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/config.yml

75 lines
2 KiB
YAML
Raw Normal View History

2021-11-08 12:28:11 +01:00
---
2024-07-17 15:45:32 +02:00
- name: Creates config directory if needed
2021-11-08 12:28:11 +01:00
become: true
ansible.builtin.file:
2024-07-17 15:45:32 +02:00
path: "{{ swayusr.home }}/.config"
2021-11-08 12:28:11 +01:00
state: directory
2024-07-17 15:45:32 +02:00
mode: '0750'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
loop: "{{ sway__user_list | flatten(1) }}"
loop_control:
loop_var: swayusr
label: "{{ swayusr.home }}/.config/"
2021-11-08 12:28:11 +01:00
2024-07-17 15:45:32 +02:00
- name: Create sway config folder
2021-11-15 00:28:35 +01:00
become: true
2021-11-08 19:30:22 +01:00
ansible.builtin.file:
2024-07-17 15:45:32 +02:00
path: "{{ swayusr.home }}/.config/sway/"
2021-11-08 19:30:22 +01:00
state: directory
mode: '0750'
2024-07-17 15:45:32 +02:00
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
loop: "{{ sway__user_list | flatten(1) }}"
loop_control:
loop_var: swayusr
label: "{{ swayusr.home }}/.config/sway/"
2024-07-17 15:45:32 +02:00
- name: Create sway dynamic names
ansible.builtin.include_tasks:
file: "dynamic_names.yml"
loop: "{{ sway__user_list | flatten(1) }}"
loop_control:
loop_var: swayusr
label: "{{ swayusr.home }}/.config/sway/"
2024-07-17 15:45:32 +02:00
when: sway__dynamic_names | bool
2024-07-25 23:17:00 +02:00
- name: Creates swaylock config directory if needed
become: true
ansible.builtin.file:
path: "{{ swayusr.home }}/.swaylock"
state: directory
mode: '0750'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
loop: "{{ sway__user_list | flatten(1) }}"
loop_control:
loop_var: swayusr
label: "{{ swayusr.home }}/.swaylock"
- name: Deploy swaylock config file
become: true
ansible.builtin.template:
src: 'templates/swaylock.j2'
dest: "{{ swayusr.home }}/.swaylock/config"
mode: '0640'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
loop: "{{ sway__user_list | flatten(1) }}"
loop_control:
label: "{{ swayusr.home }}/.swaylock/config"
loop_var: swayusr
2024-07-17 15:45:32 +02:00
- name: Deploy sway config file
2021-11-08 12:28:11 +01:00
become: true
ansible.builtin.template:
2024-07-17 15:45:32 +02:00
src: 'templates/config.j2'
dest: "{{ swayusr.home }}/.config/sway/config"
mode: '0640'
owner: "{{ swayusr.user }}"
group: "{{ swayusr.user }}"
loop: "{{ sway__user_list | flatten(1) }}"
loop_control:
label: "{{ swayusr.home }}/.config/sway/config"
2024-07-17 15:45:32 +02:00
loop_var: swayusr