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
|
# work to change things around. Good alternative to DWM and so lightweight that
|
||||||
# it doesn´t even matter if both are installed!!
|
# 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:
|
set_fact:
|
||||||
i3_config: "settings/i3.config"
|
i3_config: "settings/i3.config"
|
||||||
i3_config_dir: "{{ user_user.home }}/.config/i3"
|
i3_config_dir: "{{ user_user.home }}/.config/i3"
|
||||||
@@ -19,18 +19,18 @@
|
|||||||
i3_theme02: arc-theme
|
i3_theme02: arc-theme
|
||||||
i3_theme03: numix-gtk-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:
|
set_fact:
|
||||||
i3_config_file: "{{ i3_config_dir }}/config"
|
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:
|
set_fact:
|
||||||
i3_theme01: htop
|
i3_theme01: htop
|
||||||
i3_theme02: htop
|
i3_theme02: htop
|
||||||
i3_theme03: 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:
|
set_fact:
|
||||||
i3_yay_packages:
|
i3_yay_packages:
|
||||||
- greybird-gtk-theme
|
- greybird-gtk-theme
|
||||||
@@ -38,12 +38,12 @@
|
|||||||
- numix-gtk-theme
|
- numix-gtk-theme
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|
||||||
#- name: Workstation | Linux | Software | i3 | Facts | TBD
|
#- name: Workstation | Shared | Software | i3 | i3 | Facts | TBD
|
||||||
# set_fact:
|
# set_fact:
|
||||||
# i3_package: i3-wm
|
# i3_package: i3-wm
|
||||||
# when: ansible_distribution in ("TBD")
|
# when: ansible_distribution in ("TBD")
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | i3 | Install
|
- name: Workstation | Shared | Software | i3 | i3 | Install
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- "{{ i3_package }}"
|
- "{{ i3_package }}"
|
||||||
@@ -59,14 +59,14 @@
|
|||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
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 }}"
|
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
|
||||||
loop: "{{ i3_yay_packages }}"
|
loop: "{{ i3_yay_packages }}"
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
become_user: "{{ aur_user }}"
|
become_user: "{{ aur_user }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | i3 | Config | Create Dir
|
- name: Workstation | Shared | Software | i3 | i3 | Config | Create Dir
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ i3_config_dir }}"
|
path: "{{ i3_config_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
owner: "{{ user }}"
|
owner: "{{ user }}"
|
||||||
group: "{{ user }}"
|
group: "{{ user }}"
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | i3 | Config | Copy File
|
- name: Workstation | Shared | Software | i3 | i3 | Config | Copy File
|
||||||
copy:
|
copy:
|
||||||
src: "{{ i3_config }}"
|
src: "{{ i3_config }}"
|
||||||
dest: "{{ i3_config_file }}"
|
dest: "{{ i3_config_file }}"
|
||||||
@@ -104,45 +104,49 @@
|
|||||||
# # sudo udevadm trigger
|
# # sudo udevadm trigger
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | i3 | Light | Check Backlights
|
- name: Workstation | Shared | Software | i3 | i3 | Light (Linux Only)
|
||||||
ansible.builtin.find:
|
block:
|
||||||
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: Display var _ DELETEME
|
- name: Workstation | Shared | Software | i3 | i3 | Light | Check Backlights
|
||||||
# ansible.builtin.debug:
|
ansible.builtin.find:
|
||||||
# msg: "{{ i3_light_device_check }}"
|
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
|
#- name: Display var _ DELETEME
|
||||||
set_fact:
|
# ansible.builtin.debug:
|
||||||
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
# msg: "{{ i3_light_device_check }}"
|
||||||
ignore_errors: yes
|
|
||||||
|
|
||||||
#- name: Display var - DELETEME
|
- name: Workstation | Shared | Software | i3 | i3 | Light | Pull Backlight Name
|
||||||
# ansible.builtin.debug:
|
set_fact:
|
||||||
# msg: "{{ i3_light_device_name }}"
|
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | i3 | Light | udev Rules | Create
|
#- name: Display var - DELETEME
|
||||||
ansible.builtin.copy:
|
# ansible.builtin.debug:
|
||||||
dest: /etc/udev/rules.d/backlight.rules
|
# msg: "{{ i3_light_device_name }}"
|
||||||
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 | Linux | Software | i3 | Light | udev Rules | Reload
|
- name: Workstation | Shared | Software | i3 | i3 | Light | udev Rules | Create
|
||||||
command: "{{ item }}"
|
ansible.builtin.copy:
|
||||||
loop:
|
dest: /etc/udev/rules.d/backlight.rules
|
||||||
- udevadm control --reload-rules
|
content: |
|
||||||
- udevadm trigger
|
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
|
#- name: FAIL - DELETEME
|
||||||
# meta: end_play
|
# meta: end_play
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user