# vim: set filetype=yaml.ansible : # ## Package: cheet ## Description: create and view interactive cheat sheets ## Version: latest ## Methods: source ## Helpers: go_install --- - name: Set cheat default facts # {{{ ansible.builtin.set_fact: cheat: install_methods: - source go_pkg: github.com/cheat/cheat/cmd/cheat version: latest # }}} - name: Configure cheat when: - "'cheat' not in __configured" block: - name: Set cheat install method when: - cheat_install_method is undefined ansible.builtin.set_fact: cheat_install_method: "{{ install_method if install_method in cheat.install_methods else cheat.install_methods[0] }}" - name: Configure cheat source install when: - cheat_install_method == 'source' block: - name: Configure cheat go install ansible.builtin.set_fact: cheat_go_install: url: "{{ cheat.go_pkg }}@{{ cheat.version }}" bin: "{{ path_bin }}/cheat" - name: Append cheat to pkg_go ansible.builtin.set_fact: pkg_go: "{{ pkg_go + [cheat_go_install] }}" - name: Set cheat_configured ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'cheat': cheat_install_method } ) }}"