mirror of
https://github.com/roles-ansible/ansible_role_i3wm.git
synced 2024-08-16 10:09:53 +02:00
Compare commits
22 commits
Author | SHA1 | Date | |
---|---|---|---|
9790aca7c3 | |||
26ef328412 | |||
31c8ca4dbf | |||
28c20809f3 | |||
ed08078c36 | |||
5215dafd14 | |||
|
96532eae4c | ||
|
71965db634 | ||
d3a2cdb28c | |||
|
0cc20cebc9 | ||
4c8b9fc9a9 | |||
3d089ed140 | |||
7fefc89bdb | |||
998a7fc1cc | |||
a60b64e241 | |||
0150fb1c45 | |||
3c16e7d5e5 | |||
cce2f3f419 | |||
6a46e8741c | |||
|
1a4aca308c | ||
9cc6a6cb72 | |||
|
f80522ce09 |
12 changed files with 46 additions and 27 deletions
3
.github/workflows/ansible-linting-check.yml
vendored
3
.github/workflows/ansible-linting-check.yml
vendored
|
@ -17,6 +17,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Run ansible-lint
|
||||
uses: ansible-actions/ansible-lint-action@v1.0.2
|
||||
uses: ansible-actions/ansible-lint-action@v1.0.3
|
||||
with:
|
||||
target: "./"
|
||||
collections_yml: "requirements.yml"
|
||||
|
|
2
.github/workflows/galaxy.yml
vendored
2
.github/workflows/galaxy.yml
vendored
|
@ -19,6 +19,6 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: 'Release on galaxy'
|
||||
uses: ansible-actions/ansible-galaxy-action@v1.0.1
|
||||
uses: ansible-actions/ansible-galaxy-action@v1.2.0
|
||||
with:
|
||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
||||
|
|
2
.github/workflows/yamllint-check.yml
vendored
2
.github/workflows/yamllint-check.yml
vendored
|
@ -17,6 +17,6 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Run yamllint
|
||||
uses: ansible-actions/yamllint-action@v0.0.1
|
||||
uses: ansible-actions/yamllint-action@v0.0.2
|
||||
with:
|
||||
target: "./"
|
||||
|
|
11
README.md
11
README.md
|
@ -11,7 +11,7 @@ If you want to use wayland instead of xorg, think about using [sway](https://swa
|
|||
|
||||
### Get it directly from Ansible Galaxy
|
||||
```bash
|
||||
$ ansible-galaxy install l3d.i3wm
|
||||
$ ansible-galaxy install roles-ansible.i3wm
|
||||
```
|
||||
|
||||
Role Variables
|
||||
|
@ -26,7 +26,7 @@ For a good overview about possible variables, please have a look into ``defaults
|
|||
vars_files:
|
||||
- vars/main.yml
|
||||
roles:
|
||||
- {role: l3d.i3wm, tags[i3, i3wm]}
|
||||
- {role: roles-ansible.i3wm, tags[i3, i3wm]}
|
||||
```
|
||||
*`vars/main.yml`*
|
||||
|
||||
|
@ -100,3 +100,10 @@ For a good overview about possible variables, please have a look into ``defaults
|
|||
# choose rofi theme
|
||||
i3_rofi_config_file: 'files/rofi/dracula_dark.rasi'
|
||||
```
|
||||
|
||||
## Requirements
|
||||
The ``community.general`` collection is required for some parts of this ansible role.
|
||||
You can install it with this command:
|
||||
```bash
|
||||
ansible-galaxy collection install -r requirements.yml --upgrade
|
||||
```
|
||||
|
|
4
requirements.yml
Normal file
4
requirements.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
collections:
|
||||
- name: 'community.general'
|
||||
version: ">=7.5.0,<=8.0.0"
|
|
@ -25,9 +25,9 @@
|
|||
mode: 0644
|
||||
owner: "{{ i3wm_usr.user }}"
|
||||
group: "{{ i3wm_usr.user }}"
|
||||
with_items:
|
||||
- { src: 'files/background.png', dest: "{{ i3wm_usr.home }}/.config/background.png" }
|
||||
- { src: 'files/lockscreen.png', dest: '{{ i3wm_usr.home }}/.config/lockscreen.png' }
|
||||
loop:
|
||||
- {src: 'files/background.png', dest: "{{ i3wm_usr.home }}/.config/background.png"}
|
||||
- {src: 'files/lockscreen.png', dest: '{{ i3wm_usr.home }}/.config/lockscreen.png'}
|
||||
when: i3wm_copy_wallpapers | bool
|
||||
|
||||
- name: Copy and validate i3wm config file
|
||||
|
@ -67,7 +67,7 @@
|
|||
mode: 0750
|
||||
owner: "{{ i3wm_usr.user }}"
|
||||
group: "{{ i3wm_usr.user }}"
|
||||
with_items:
|
||||
loop:
|
||||
- 'volume.sh'
|
||||
- 'wlan.py'
|
||||
- 'battery.py'
|
||||
|
|
|
@ -1,25 +1,31 @@
|
|||
---
|
||||
- name: Run optional versionscheck
|
||||
ansible.builtin.include_tasks: versioncheck.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: versioncheck.yml
|
||||
when: submodules_versioncheck | bool
|
||||
|
||||
- name: Register variables
|
||||
ansible.builtin.import_tasks: variables.yml
|
||||
ansible.builtin.import_tasks:
|
||||
file: variables.yml
|
||||
|
||||
- name: Ensure i3 packages are installed [Debian]
|
||||
ansible.builtin.include_tasks: setup-Debian.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: setup-Debian.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Ensure i3 packages are installed [Archlinux}
|
||||
ansible.builtin.include_tasks: setup-Archlinux.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: setup-Archlinux.yml
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
||||
- name: Ensure i3 packages are installed [RHEL].
|
||||
ansible.builtin.include_tasks: setup-RedHat.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: setup-RedHat.yml
|
||||
when: ansible_os_family == 'Fedora' or ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Create i3 config file
|
||||
ansible.builtin.include_tasks: config.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: config.yml
|
||||
loop: "{{ i3wm_user_list | flatten(1) }}"
|
||||
loop_control:
|
||||
loop_var: i3wm_usr
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: Ensure i3 packages are installed.
|
||||
- name: Ensure i3 packages are installed # noqa: H1901
|
||||
community.general.pacman:
|
||||
name: "{{ i3_packages }}"
|
||||
state: present
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
- name: Register OS-specific Variables
|
||||
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
||||
ansible.builtin.include_vars:
|
||||
file: "{{ ansible_os_family }}.yml"
|
||||
when: ansible_distribution != "Fedora"
|
||||
|
||||
- name: Register Fedora-specific variables
|
||||
ansible.builtin.include_vars: "{{ ansible_distribution }}.yml"
|
||||
ansible.builtin.include_vars:
|
||||
file: "{{ ansible_distribution }}.yml"
|
||||
when: ansible_distribution == "Fedora"
|
||||
|
||||
- name: Define i3_packages
|
||||
|
|
|
@ -14,17 +14,16 @@
|
|||
become: true
|
||||
ansible.builtin.slurp:
|
||||
src: "/etc/.ansible-version/{{ playbook_version_path }}"
|
||||
register: i3wm_playbook_version
|
||||
register: playbook_version
|
||||
when: submodules_versioncheck | bool
|
||||
ignore_errors: true
|
||||
failed_when: false
|
||||
|
||||
- name: Print remote role version
|
||||
- name: Print remote role version # noqa: H500
|
||||
ansible.builtin.debug:
|
||||
msg: "Remote role version: {{ i3wm_playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
|
||||
msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
|
||||
when: submodules_versioncheck | bool
|
||||
|
||||
- name: Print locale role version
|
||||
- name: Print locale role version # noqa: H500
|
||||
ansible.builtin.debug:
|
||||
msg: "Local role version: '{{ playbook_version_number | string }}'."
|
||||
when: submodules_versioncheck | bool
|
||||
|
@ -33,7 +32,7 @@
|
|||
ansible.builtin.fail:
|
||||
msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
|
||||
when:
|
||||
- i3wm_playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool
|
||||
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool
|
||||
|
||||
- name: Write new version to remote disk
|
||||
become: true
|
||||
|
|
|
@ -195,11 +195,11 @@ exec xautolock -time {{ lock_after_time }} -locker 'maim /tmp/screen_locked.png;
|
|||
|
||||
# Start Default Applications
|
||||
{% for application in i3_applications if application.on_startup %}
|
||||
exec sleep 3 && {{ application.name }}
|
||||
exec sleep 5 && {{ application.name }}
|
||||
{% endfor %}
|
||||
|
||||
{% for app in i3_run_on_startup %}
|
||||
exec sleep 4 && {{ app }}
|
||||
exec sleep 12 && {{ app }}
|
||||
{% endfor %}
|
||||
|
||||
# Register Keybindings
|
||||
|
|
|
@ -33,5 +33,5 @@ __i3_workspaces:
|
|||
|
||||
user: "{{ i3wm_user }}"
|
||||
|
||||
playbook_version_number: 9026 # should be int
|
||||
playbook_version_number: 9027 # should be int
|
||||
playbook_version_path: 'role-i3wm_chaos-bodensee_github.com.version'
|
||||
|
|
Loading…
Add table
Reference in a new issue