mirror of
https://github.com/roles-ansible/ansible_role_i3wm.git
synced 2024-08-16 10:09:53 +02:00
update ansible to use FQCN
This commit is contained in:
parent
f996a044ef
commit
6b69eeda4f
7 changed files with 72 additions and 66 deletions
|
@ -5,7 +5,6 @@ Install and deploy a basic configuration of [I3 Window Manager](https://i3wm.org
|
|||
Optionally configure your resolution, which applications will be bound to which screen and what will be included in the autostart.<br/>
|
||||
If you want to use wayland instead of xorg, think about using [sway](https://swaywm.org/) as window manager. The corresponding ansible is located on [github.com/roles-ansible/role-sway](https://github.com/roles-ansible/role-sway.git).
|
||||
|
||||
[![Build Status](https://travis-ci.org/chaos-bodensee/role-i3wm.svg?branch=master)](https://travis-ci.org/chaos-bodensee/role-i3wm)
|
||||
[![MIT License](https://raw.githubusercontent.com/chaos-bodensee/role-i3wm/master/.github/license.svg?sanitize=true)](https://github.com/chaos-bodensee/role-i3wm/blob/master/LICENSE)
|
||||
[![MIT License](https://raw.githubusercontent.com/chaos-bodensee/role-i3wm/master/.github/galaxy.svg?sanitize=true)](https://galaxy.ansible.com/do1jlr/i3wm)
|
||||
|
||||
|
|
50
tasks/config.yml
Normal file
50
tasks/config.yml
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
- name: Creates directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: '/home/{{ i3wm_user }}/.config'
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
|
||||
- name: create i3 config folder
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: '/home/{{ i3wm_user }}/.config/i3/'
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
|
||||
- name: copy multiple images
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0644
|
||||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
with_items:
|
||||
- { src: 'files/background.png', dest: "/home/{{ i3wm_user }}/.config/background.png" }
|
||||
- { src: 'files/lockscreen.png', dest: '/home/{{ i3wm_user }}/.config/lockscreen.png' }
|
||||
when: i3wm_copy_wallpapers | bool
|
||||
|
||||
- name: copy and validate i3wm config file
|
||||
become: true
|
||||
tansible.builtin.emplate:
|
||||
src: templates/config.j2
|
||||
dest: "/home/{{ i3wm_user }}/.config/i3/config"
|
||||
mode: 0600
|
||||
backup: true
|
||||
validate: i3 -C -c %s
|
||||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
|
||||
- name: copy bin src folder
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: "{{ role_path }}/files/i3blocks/"
|
||||
dest: "~/.config/i3blocks"
|
||||
mode: 0755
|
||||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
|
@ -1,65 +1,22 @@
|
|||
---
|
||||
- include_tasks: versioncheck.yml
|
||||
- name: run optional versionscheck
|
||||
ansible.builtin.include_tasks: versioncheck.yml
|
||||
when: submodules_versioncheck|bool
|
||||
|
||||
- name: register variables
|
||||
import_tasks: variables.yml
|
||||
ansible.builtin.import_tasks: variables.yml
|
||||
|
||||
# ensure i3 packages are installed [Debian].
|
||||
- include_tasks: setup-Debian.yml
|
||||
- name: ensure i3 packages are installed [Debian]
|
||||
ansible.builtin.include_tasks: setup-Debian.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
# ensure i3 packages are installed [Archlinux}
|
||||
- include_tasks: setup-Archlinux.yml
|
||||
- name: ensure i3 packages are installed [Archlinux}
|
||||
ansible.builtin.include_tasks: setup-Archlinux.yml
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
||||
# ensure i3 packages are installed [RHEL].
|
||||
- include_tasks: setup-RedHat.yml
|
||||
- name: ensure i3 packages are installed [RHEL].
|
||||
ansible.builtin.include_tasks: setup-RedHat.yml
|
||||
when: ansible_os_family == 'Fedora' or ansible_os_family == 'RedHat'
|
||||
|
||||
# create i3 config file
|
||||
- name: Creates directory
|
||||
become: true
|
||||
become_user: "{{ i3wm_user }}"
|
||||
file:
|
||||
path: '/home/{{ i3wm_user }}/.config'
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ i3wm_user }}"
|
||||
|
||||
- name: create i3 config folder
|
||||
become: true
|
||||
become_user: "{{ i3wm_user }}"
|
||||
file:
|
||||
path: '/home/{{ i3wm_user }}/.config/i3/'
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: "{{ i3wm_user }}"
|
||||
|
||||
- name: copy multiple images
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0644
|
||||
with_items:
|
||||
- { src: 'files/background.png', dest: "/home/{{ i3wm_user }}/.config/background.png" }
|
||||
- { src: 'files/lockscreen.png', dest: '/home/{{ i3wm_user }}/.config/lockscreen.png' }
|
||||
when: i3wm_copy_wallpapers | bool
|
||||
|
||||
- name: copy and validate i3wm config file
|
||||
become: true
|
||||
become_user: "{{ i3wm_user }}"
|
||||
template:
|
||||
src: templates/config.j2
|
||||
dest: "/home/{{ i3wm_user }}/.config/i3/config"
|
||||
mode: 0600
|
||||
backup: true
|
||||
validate: i3 -C -c %s
|
||||
|
||||
- name: vim - copy bin src folder
|
||||
become: true
|
||||
become_user: "{{ i3wm_user }}"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/i3blocks/"
|
||||
dest: "~/.config/i3blocks"
|
||||
mode: 0755
|
||||
- name: create i3 config file
|
||||
ansible.builtin.include_tasks: config.yml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: ensure i3 packages are installed.
|
||||
pacman:
|
||||
ansible.builtin.pacman:
|
||||
name: "{{ i3_packages }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: ensure i3 packages are installed.
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: "{{ i3_packages }}"
|
||||
state: "present"
|
||||
become: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: ensure i3 packages are installed.
|
||||
dnf:
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ i3_packages }}"
|
||||
state: present
|
||||
become: true
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
---
|
||||
- name: register os-specific variables
|
||||
include_vars: "{{ ansible_os_family }}.yml"
|
||||
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
||||
when: ansible_distribution != "Fedora"
|
||||
|
||||
- name: register Fedora variables
|
||||
include_vars: "{{ ansible_distribution }}.yml"
|
||||
ansible.builtin.include_vars: "{{ ansible_distribution }}.yml"
|
||||
when: ansible_distribution == "Fedora"
|
||||
|
||||
# i3 packages
|
||||
- name: define i3_packages
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
i3_packages: "{{ __i3_packages | list }}"
|
||||
when: i3_packages is not defined
|
||||
|
||||
- name: define i3_packages_extra
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
i3_packages: "{{ i3_packages | list + i3_packages_extra | list }}"
|
||||
when: i3_packages_extra is defined
|
||||
|
||||
# i3 workspaces
|
||||
- name: define i3_packages
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
i3_workspaces: "{{ __i3_workspaces | list }}"
|
||||
when: i3_workspaces is not defined
|
||||
|
||||
# i3 keybindings
|
||||
- name: define i3_packages
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
i3_keybindings: "{{ __i3_keybindings | list }}"
|
||||
when:
|
||||
- i3_keybindings is not defined
|
||||
- __i3_keybindings is defined
|
||||
|
||||
- name: define extra i3 keybindings
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
i3_keybindings: "{{ i3_keybindings_extra | list + i3_keybindings | list }}"
|
||||
when:
|
||||
- i3_keybindings_extra is defined
|
||||
- i3_keybindings is defined
|
||||
|
||||
- name: define extra i3 keybindings
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
i3_keybindings: "{{ i3_keybindings_extra | list }}"
|
||||
when:
|
||||
- i3_keybindings_extra is defined
|
||||
|
|
Loading…
Reference in a new issue