From 4f8db6e14e7a41820752225d342a7c265ca196a0 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 1 Jul 2019 00:32:37 +0200 Subject: [PATCH] Improve Fedora support --- tasks/variables.yml | 5 +++++ templates/config.j2 | 5 +++-- vars/Fedora.yml | 12 ++++++++++++ vars/main.yml | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 vars/Fedora.yml diff --git a/tasks/variables.yml b/tasks/variables.yml index ea78157..899c48e 100644 --- a/tasks/variables.yml +++ b/tasks/variables.yml @@ -1,6 +1,11 @@ --- - name: register os-specific variables include_vars: "{{ ansible_os_family }}.yml" + when: ansible_distribution != "Fedora" + +- name: register Fedora variables + include_vars: "{{ ansible_distribution }}.yml" + when: ansible_distribution == "Fedora" # i3 packages - name: define i3_packages diff --git a/templates/config.j2 b/templates/config.j2 index 37dc5d7..2b10001 100644 --- a/templates/config.j2 +++ b/templates/config.j2 @@ -17,10 +17,11 @@ bindsym $mod+Shift+Return exec $term -e tmux # kill focused window bindsym $mod+Shift+q kill -{% if ansible_distribution == 'Redhat' or ansible_distribution == 'Fedora' %} +{% if ansible_distribution == 'Redhat' or ansible_distribution == 'CentOS' %} # bindsym $mod+d exec dmenu_run (a program launcher) bindsym $mod+d exec dmenu_run -{% else %}bindsym $mod+d exec rofi -show run +{%- else -%} +bindsym $mod+d exec rofi -show run # bindsym $mod+d exec rofi (a program launcher) bindsym $mod+Shift+d exec rofi -show window bindsym $mod+Shift+s exec rofi -show ssh diff --git a/vars/Fedora.yml b/vars/Fedora.yml new file mode 100644 index 0000000..0f50f33 --- /dev/null +++ b/vars/Fedora.yml @@ -0,0 +1,12 @@ +--- +__i3_packages: + - i3 + - compton + - feh + - tmux + - terminator + - i3lock + - rofi + - xautolock + - scrot + - ImageMagick diff --git a/vars/main.yml b/vars/main.yml index 3aee354..e7db3b1 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -33,5 +33,5 @@ __i3_workspaces: user: "{{ i3wm_user }}" -playbook_version_number: 9009 # should be over ninethousand +playbook_version_number: 9010 # should be over ninethousand playbook_version_path: '/etc/ansible-version/role-i3wm_chaos-bodensee_github.com.version'