1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_sway.git synced 2024-08-16 13:49:49 +02:00
ansible_role_sway/tasks/variables.yml

47 lines
1.4 KiB
YAML
Raw Normal View History

2017-12-31 00:56:01 +01:00
---
2023-05-19 17:07:00 +02:00
- name: Register OS-specific Variables
ansible.builtin.include_vars:
file: "{{ ansible_os_family }}.yml"
2019-07-01 00:32:37 +02:00
when: ansible_distribution != "Fedora"
2023-05-19 17:07:00 +02:00
- name: Register Fedora-specific variables
ansible.builtin.include_vars:
file: "{{ ansible_distribution }}.yml"
2019-07-01 00:32:37 +02:00
when: ansible_distribution == "Fedora"
2017-12-31 00:56:01 +01:00
2023-05-19 17:07:00 +02:00
- name: Define i3_packages
2021-11-08 12:28:11 +01:00
ansible.builtin.set_fact:
2017-12-31 00:56:01 +01:00
i3_packages: "{{ __i3_packages | list }}"
when: i3_packages is not defined
2023-05-19 17:07:00 +02:00
- name: Define i3_packages_extra
2021-11-08 12:28:11 +01:00
ansible.builtin.set_fact:
2017-12-31 00:56:01 +01:00
i3_packages: "{{ i3_packages | list + i3_packages_extra | list }}"
when: i3_packages_extra is defined
2023-05-19 17:07:00 +02:00
- name: Define i3_packages
2021-11-08 12:28:11 +01:00
ansible.builtin.set_fact:
2017-12-31 00:56:01 +01:00
i3_workspaces: "{{ __i3_workspaces | list }}"
when: i3_workspaces is not defined
2023-05-19 17:07:00 +02:00
- name: Define i3_keybindings
2021-11-08 12:28:11 +01:00
ansible.builtin.set_fact:
2017-12-31 00:56:01 +01:00
i3_keybindings: "{{ __i3_keybindings | list }}"
2019-04-24 12:43:25 +02:00
when:
2021-02-26 17:31:17 +01:00
- i3_keybindings is not defined
- __i3_keybindings is defined
2017-12-31 00:56:01 +01:00
2023-05-19 17:07:00 +02:00
- name: Define additional i3 keybindings
2021-11-08 12:28:11 +01:00
ansible.builtin.set_fact:
2019-02-20 11:53:10 +01:00
i3_keybindings: "{{ i3_keybindings_extra | list + i3_keybindings | list }}"
2019-04-24 12:43:25 +02:00
when:
2021-02-26 17:31:17 +01:00
- i3_keybindings_extra is defined
- i3_keybindings is defined
2019-02-20 11:53:10 +01:00
2023-05-19 17:07:00 +02:00
- name: Finalize i3 keybindings definition
2021-11-08 12:28:11 +01:00
ansible.builtin.set_fact:
2019-02-20 11:53:10 +01:00
i3_keybindings: "{{ i3_keybindings_extra | list }}"
2019-04-24 12:43:25 +02:00
when:
2021-02-26 17:31:17 +01:00
- i3_keybindings_extra is defined
- i3_keybindings is not defined