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:
51
roles/init-server/tasks/contingent/pkg/radicle.yml
Normal file
51
roles/init-server/tasks/contingent/pkg/radicle.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- name: Acquiring home of current user
|
||||
when: ansible_facts["system"] == "Linux"
|
||||
ansible.builtin.shell:
|
||||
cmd: "echo ~{{ ansible_user }}"
|
||||
register: ansible_user_home
|
||||
- name: Acquiring current user
|
||||
when: ansible_facts["system"] == "Linux"
|
||||
ansible.builtin.shell:
|
||||
cmd: "echo {{ ansible_user }}"
|
||||
register: current_user
|
||||
- name: Executing shell-scripted installation process for Radicle
|
||||
become: true
|
||||
become_user: "{{ current_user.stdout }}"
|
||||
ansible.builtin.shell:
|
||||
cmd: "{{ ansible_user_home.stdout }}/.local/bin/radicle-install.sh"
|
||||
creates: "{{ ansible_user_home.stdout }}/.radicle"
|
||||
- name: Bootstrapping Radicle
|
||||
become: true
|
||||
block:
|
||||
- name: Linking binaries to directories already in PATH environment variable
|
||||
ansible.builtin.file:
|
||||
src: "{{ ansible_user_home.stdout }}/.radicle/bin/{{ item }}"
|
||||
dest: "/usr/local/bin/{{ item }}"
|
||||
state: link
|
||||
loop:
|
||||
- rad
|
||||
- radicle-node
|
||||
- git-remote-rad
|
||||
- name: Create man1 subdirectory for man pages
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/share/man/man1
|
||||
recurse: true
|
||||
owner: root
|
||||
group: root
|
||||
mode: "644"
|
||||
state: directory
|
||||
- name: Link manpages to Linux manpage directories
|
||||
ansible.builtin.file:
|
||||
src: "{{ ansible_user_home.stdout }}/.radicle/man/man1/{{ item }}.1"
|
||||
dest: "/usr/local/share/man/man1/{{ item }}.1"
|
||||
state: link
|
||||
loop:
|
||||
- rad
|
||||
- radicle-node
|
||||
- git-remote-rad
|
||||
- rad-id
|
||||
- rad-patch
|
||||
- name: Reboot machine for shell environment change
|
||||
ansible.builtin.reboot:
|
||||
msg: Rebooting machine
|
||||
Reference in New Issue
Block a user