1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_i3wm.git synced 2024-08-16 10:09:53 +02:00

Compare commits

...

22 commits
2.2.1 ... main

Author SHA1 Message Date
L3D
9790aca7c3
Merge pull request #27 from roles-ansible/r
Update role name
2024-07-27 16:55:59 +02:00
L3D
26ef328412
Update role name 2024-07-27 16:50:45 +02:00
L3D
31c8ca4dbf
Merge pull request #26 from roles-ansible/s
Expand sleep
2024-05-24 11:19:58 +02:00
L3D
28c20809f3
Expand sleep 2024-05-24 11:18:03 +02:00
L3D
ed08078c36
Merge pull request #25 from roles-ansible/dependabot/github_actions/ansible-actions/ansible-lint-action-1.0.3
Bump ansible-actions/ansible-lint-action from 1.0.2 to 1.0.3
2024-03-22 14:50:06 +01:00
L3D
5215dafd14
Merge pull request #24 from roles-ansible/dependabot/github_actions/ansible-actions/yamllint-action-0.0.2
Bump ansible-actions/yamllint-action from 0.0.1 to 0.0.2
2024-03-22 14:04:56 +01:00
dependabot[bot]
96532eae4c
Bump ansible-actions/ansible-lint-action from 1.0.2 to 1.0.3
Bumps [ansible-actions/ansible-lint-action](https://github.com/ansible-actions/ansible-lint-action) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/ansible-actions/ansible-lint-action/releases)
- [Commits](https://github.com/ansible-actions/ansible-lint-action/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: ansible-actions/ansible-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 11:12:41 +00:00
dependabot[bot]
71965db634
Bump ansible-actions/yamllint-action from 0.0.1 to 0.0.2
Bumps [ansible-actions/yamllint-action](https://github.com/ansible-actions/yamllint-action) from 0.0.1 to 0.0.2.
- [Release notes](https://github.com/ansible-actions/yamllint-action/releases)
- [Commits](https://github.com/ansible-actions/yamllint-action/compare/v0.0.1...v0.0.2)

---
updated-dependencies:
- dependency-name: ansible-actions/yamllint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 11:12:37 +00:00
L3D
d3a2cdb28c
Merge pull request #23 from roles-ansible/dependabot/github_actions/ansible-actions/ansible-galaxy-action-1.2.0
Bump ansible-actions/ansible-galaxy-action from 1.1.1 to 1.2.0
2024-01-25 00:25:24 +01:00
dependabot[bot]
0cc20cebc9
Bump ansible-actions/ansible-galaxy-action from 1.1.1 to 1.2.0
Bumps [ansible-actions/ansible-galaxy-action](https://github.com/ansible-actions/ansible-galaxy-action) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/ansible-actions/ansible-galaxy-action/releases)
- [Commits](https://github.com/ansible-actions/ansible-galaxy-action/compare/v1.1.1...v1.2.0)

---
updated-dependencies:
- dependency-name: ansible-actions/ansible-galaxy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 11:57:29 +00:00
L3D
4c8b9fc9a9
Merge pull request #22 from roles-ansible/b
Update quality assurance
2023-10-28 17:58:10 +02:00
L3D
3d089ed140
Update quality assurance 2023-10-28 17:56:01 +02:00
L3D
7fefc89bdb
Merge pull request #21 from roles-ansible/DO1JLR-patch-1
increase version
2023-10-28 16:33:55 +02:00
L3D
998a7fc1cc
increase version
Signed-off-by: L3D <l3d@c3woc.de>
2023-10-28 16:32:20 +02:00
L3D
a60b64e241
Merge pull request #20 from roles-ansible/DO1JLR-patch-1
Update ansible-linting-check.yml
2023-10-28 16:31:50 +02:00
L3D
0150fb1c45
Update ansible-linting-check.yml
Signed-off-by: L3D <l3d@c3woc.de>
2023-10-28 16:30:16 +02:00
L3D
3c16e7d5e5
Merge pull request #19 from roles-ansible/f
improve linting and adding requirements
2023-10-28 16:27:32 +02:00
L3D
cce2f3f419
improve linting and adding requirements 2023-10-28 16:25:06 +02:00
L3D
6a46e8741c
Merge pull request #18 from roles-ansible/dependabot/github_actions/ansible-actions/ansible-galaxy-action-1.1.1
Bump ansible-actions/ansible-galaxy-action from 1.1.0 to 1.1.1
2023-10-27 14:14:07 +02:00
dependabot[bot]
1a4aca308c
Bump ansible-actions/ansible-galaxy-action from 1.1.0 to 1.1.1
Bumps [ansible-actions/ansible-galaxy-action](https://github.com/ansible-actions/ansible-galaxy-action) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/ansible-actions/ansible-galaxy-action/releases)
- [Commits](https://github.com/ansible-actions/ansible-galaxy-action/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: ansible-actions/ansible-galaxy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 11:38:32 +00:00
L3D
9cc6a6cb72
Merge pull request #17 from roles-ansible/dependabot/github_actions/ansible-actions/ansible-galaxy-action-1.1.0
Bump ansible-actions/ansible-galaxy-action from 1.0.1 to 1.1.0
2023-10-26 14:32:48 +02:00
dependabot[bot]
f80522ce09
Bump ansible-actions/ansible-galaxy-action from 1.0.1 to 1.1.0
Bumps [ansible-actions/ansible-galaxy-action](https://github.com/ansible-actions/ansible-galaxy-action) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/ansible-actions/ansible-galaxy-action/releases)
- [Commits](https://github.com/ansible-actions/ansible-galaxy-action/compare/v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: ansible-actions/ansible-galaxy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 11:49:53 +00:00
12 changed files with 46 additions and 27 deletions

View file

@ -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"

View file

@ -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 }}

View file

@ -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: "./"

View file

@ -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
View file

@ -0,0 +1,4 @@
---
collections:
- name: 'community.general'
version: ">=7.5.0,<=8.0.0"

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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'