From 12c9d38f653c81ff2c74ecdd28f9cc3d23fffa59 Mon Sep 17 00:00:00 2001 From: Peter Keresztes Schmidt Date: Tue, 29 Jan 2019 02:48:15 +0100 Subject: [PATCH 1/2] Fix deprecation warnings --- templates/tmux.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/tmux.conf.j2 b/templates/tmux.conf.j2 index 8b73904..ac00063 100644 --- a/templates/tmux.conf.j2 +++ b/templates/tmux.conf.j2 @@ -1,6 +1,6 @@ # Managed by ansible -{% if tmux_version.stdout is version_compare('2.1', '>=') %} +{% if tmux_version.stdout is version('2.1', '>=') %} # tmux {{ tmux_version.stdout }} is >= 2.1 -> new mouse handling set -g mouse on From 8e0a5f57a82ed90935d4eb6de065605545a73ae8 Mon Sep 17 00:00:00 2001 From: Peter Keresztes Schmidt Date: Tue, 29 Jan 2019 18:15:16 +0100 Subject: [PATCH 2/2] Fix Ubuntu support --- tasks/main.yml | 11 +++++------ templates/tmux.conf.j2 | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index dd1a97c..14bce04 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,11 +1,13 @@ --- - set_fact: - powerline_packages: + packages: + - tmux - powerline when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" - set_fact: - powerline_packages: + packages: + - tmux - powerline - tmux-powerline when: ansible_distribution == "Fedora" @@ -13,11 +15,8 @@ - name: install packages become: True package: - name: "{{ item }}" + name: "{{ packages }}" state: present - with_items: - - tmux - - "{{ powerline_packages }}" - name: detect tmux version shell: tmux -V | cut -d ' ' -f2 diff --git a/templates/tmux.conf.j2 b/templates/tmux.conf.j2 index ac00063..af14dae 100644 --- a/templates/tmux.conf.j2 +++ b/templates/tmux.conf.j2 @@ -52,7 +52,7 @@ set -g base-index 1 setw -g pane-base-index 1 # 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... -{% if ansible_distribution == "Debian" %} +{% if ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" %} source '/usr/share/powerline/bindings/tmux/powerline.conf' {% elif ansible_distribution == "Fedora" %} source '/usr/share/tmux/powerline.conf'