i3, prepare to move playbook to shared from linux.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
# work to change things around. Good alternative to DWM and so lightweight that
|
||||
# it doesn´t even matter if both are installed!!
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | General [1/2]
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts 01
|
||||
set_fact:
|
||||
i3_config: "settings/i3.config"
|
||||
i3_config_dir: "{{ user_user.home }}/.config/i3"
|
||||
@@ -19,18 +19,18 @@
|
||||
i3_theme02: arc-theme
|
||||
i3_theme03: numix-gtk-theme
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | General [1/2]
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts 02
|
||||
set_fact:
|
||||
i3_config_file: "{{ i3_config_dir }}/config"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | pacman
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts | non-apt
|
||||
set_fact:
|
||||
i3_theme01: htop
|
||||
i3_theme02: htop
|
||||
i3_theme03: htop
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
when: ansible_pkg_mgr != "apt"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | yay
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Facts | yay
|
||||
set_fact:
|
||||
i3_yay_packages:
|
||||
- greybird-gtk-theme
|
||||
@@ -38,12 +38,12 @@
|
||||
- numix-gtk-theme
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
#- name: Workstation | Linux | Software | i3 | Facts | TBD
|
||||
#- name: Workstation | Shared | Software | i3 | i3 | Facts | TBD
|
||||
# set_fact:
|
||||
# i3_package: i3-wm
|
||||
# when: ansible_distribution in ("TBD")
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Install
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Install
|
||||
package:
|
||||
name:
|
||||
- "{{ i3_package }}"
|
||||
@@ -59,14 +59,14 @@
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Install (yay)
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Install (yay)
|
||||
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
|
||||
loop: "{{ i3_yay_packages }}"
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
become_user: "{{ aur_user }}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Config | Create Dir
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Config | Create Dir
|
||||
ansible.builtin.file:
|
||||
path: "{{ i3_config_dir }}"
|
||||
state: directory
|
||||
@@ -74,7 +74,7 @@
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Config | Copy File
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Config | Copy File
|
||||
copy:
|
||||
src: "{{ i3_config }}"
|
||||
dest: "{{ i3_config_file }}"
|
||||
@@ -104,45 +104,49 @@
|
||||
# # sudo udevadm trigger
|
||||
#
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | Check Backlights
|
||||
ansible.builtin.find:
|
||||
paths: /sys/class/backlight
|
||||
file_type: any # Options: file, directory, any
|
||||
patterns: "*" # Wildcard patterns (e.g., "*.log")
|
||||
recurse: no # Set to 'yes' for subdirectories
|
||||
register: i3_light_device_check
|
||||
ignore_errors: yes
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light (Linux Only)
|
||||
block:
|
||||
|
||||
#- name: Display var _ DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_check }}"
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | Check Backlights
|
||||
ansible.builtin.find:
|
||||
paths: /sys/class/backlight
|
||||
file_type: any # Options: file, directory, any
|
||||
patterns: "*" # Wildcard patterns (e.g., "*.log")
|
||||
recurse: no # Set to 'yes' for subdirectories
|
||||
register: i3_light_device_check
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | Pull Backlight Name
|
||||
set_fact:
|
||||
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
||||
ignore_errors: yes
|
||||
#- name: Display var _ DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_check }}"
|
||||
|
||||
#- name: Display var - DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_name }}"
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | Pull Backlight Name
|
||||
set_fact:
|
||||
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | udev Rules | Create
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/udev/rules.d/backlight.rules
|
||||
content: |
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
ignore_errors: yes
|
||||
#- name: Display var - DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_name }}"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | udev Rules | Reload
|
||||
command: "{{ item }}"
|
||||
loop:
|
||||
- udevadm control --reload-rules
|
||||
- udevadm trigger
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | udev Rules | Create
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/udev/rules.d/backlight.rules
|
||||
content: |
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Workstation | Shared | Software | i3 | i3 | Light | udev Rules | Reload
|
||||
command: "{{ item }}"
|
||||
loop:
|
||||
- udevadm control --reload-rules
|
||||
- udevadm trigger
|
||||
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
#- name: FAIL - DELETEME
|
||||
# meta: end_play
|
||||
|
||||
|
||||
Reference in New Issue
Block a user