created new package tasks for handler-based inclusions, otehrwise got username and home directory of SSH login for path purposes
This commit is contained in:
26
roles/init-server/tasks/contingent/pkg/difftastic.yml
Normal file
26
roles/init-server/tasks/contingent/pkg/difftastic.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: Acquiring home of current user
|
||||
when: ansible_facts["system"] == "Linux"
|
||||
ansible.builtin.shell:
|
||||
cmd: "echo ~{{ ansible_user }}"
|
||||
register: ansible_user_home
|
||||
- name: Linking binaries to directories already in PATH environment variable
|
||||
ansible.builtin.file:
|
||||
src: "{{ ansible_user_home.stdout }}/downloads/archives/released/difftastic/{{ item }}"
|
||||
dest: "{{ ansible_user_home.stdout }}/.local/bin/{{ item }}"
|
||||
state: hard
|
||||
loop:
|
||||
- difft
|
||||
- name: Linking binaries to directories already in PATH environment variable
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
src: "{{ ansible_user_home.stdout }}/downloads/archives/released/difftastic/{{ item }}"
|
||||
dest: "/usr/local/bin/{{ item }}"
|
||||
state: link
|
||||
loop:
|
||||
- difft
|
||||
- name: Configuring usage of Difftastic as default git difference tool for user
|
||||
community.general.git_config:
|
||||
name: diff.tool
|
||||
scope: global
|
||||
value: difftastic
|
||||
Reference in New Issue
Block a user