--- - name: install homebrew packages homebrew: name: - tmux - reattach-to-user-namespace - urlview state: latest - name: check terminal info description exists command: /usr/bin/infocmp -x tmux-256color changed_when: false failed_when: false register: terminfo_exists - name: download latest terminfo description when: terminfo_exists.rc == 1 get_url: url: https://gist.githubusercontent.com/nicm/ea9cf3c93f22e0246ec858122d9abea1/raw/37ae29fc86e88b48dbc8a674478ad3e7a009f357/tmux-256color dest: ~/tmux-256color - name: compile terminal info when: terminfo_exists.rc == 1 command: /usr/bin/tic -x ~/tmux-256color - name: cleanup downloaded terminfo description when: terminfo_exists.rc == 1 file: path: ~/tmux-256color state: absent - name: check terminal info description exists when: terminfo_exists.rc == 1 command: /usr/bin/infocmp -x tmux-256color changed_when: false register: terminfo_exists