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/surge.yml
Normal file
26
roles/init-server/tasks/contingent/pkg/surge.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
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
src: "{{ ansible_user_home.stdout }}/downloads/archives/released/surge/{{ item }}"
|
||||
dest: "/usr/local/bin/{{ item }}"
|
||||
state: link
|
||||
loop:
|
||||
- surge
|
||||
- name: Installing accompanying complementary Surge system service
|
||||
ansible.builtin.command:
|
||||
cmd: surge service install
|
||||
- name: Acquiring API token for remote Surge service control
|
||||
ansible.builtin.command:
|
||||
cmd: surge token
|
||||
register: surge_token
|
||||
- name: Presenting Surge API token to Control Node
|
||||
ansible.builtin.debug:
|
||||
msg: "Make sure to store the following API token for Surge:\n {{ surge_token.stdout }}"
|
||||
- name: Pausing to ensure completion of manual act
|
||||
ansible.builtin.pause:
|
||||
Reference in New Issue
Block a user