Skip to content

Commit 98fff4b

Browse files
committed
Merge branch 'master' of git.sos.ethz.ch:ansibleroles/tmux
2 parents db8c3d0 + 8e0a5f5 commit 98fff4b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tasks/main.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
---
22
- set_fact:
3-
powerline_packages:
3+
packages:
4+
- tmux
45
- powerline
56
when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
67

78
- set_fact:
8-
powerline_packages:
9+
packages:
10+
- tmux
911
- powerline
1012
- tmux-powerline
1113
when: ansible_distribution == "Fedora"
1214

1315
- name: install packages
1416
become: True
1517
package:
16-
name: "{{ item }}"
18+
name: "{{ packages }}"
1719
state: present
18-
with_items:
19-
- tmux
20-
- "{{ powerline_packages }}"
2120

2221
- name: detect tmux version
2322
shell: tmux -V | cut -d ' ' -f2

templates/tmux.conf.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Managed by ansible
22

3-
{% if tmux_version.stdout is version_compare('2.1', '>=') %}
3+
{% if tmux_version.stdout is version('2.1', '>=') %}
44
# tmux {{ tmux_version.stdout }} is >= 2.1 -> new mouse handling
55
set -g mouse on
66

@@ -52,7 +52,7 @@ set -g base-index 1
5252
setw -g pane-base-index 1
5353

5454
# Activate Powerline. We assume that the most recent version supported in Debian's powerline package is the most recent version of tmux shipped in Debian. Powerline has it's own config...
55-
{% if ansible_distribution == "Debian" %}
55+
{% if ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" %}
5656
source '/usr/share/powerline/bindings/tmux/powerline.conf'
5757
{% elif ansible_distribution == "Fedora" %}
5858
source '/usr/share/tmux/powerline.conf'

0 commit comments

Comments
 (0)