SHA256
1
0

Add scripts to role

This commit is contained in:
2026-01-29 01:06:09 -05:00
parent 62c413d42d
commit b5e082e400
23 changed files with 8 additions and 23 deletions

View File

@@ -1,25 +1,10 @@
--- ---
- name: Copy repo scripts to local bin (for remote hosts) - name: Deploy scripts to user's local bin
ansible.builtin.copy: ansible.builtin.include_tasks: ../../deploy_files.yml
src: "{{ item }}" vars:
dest: "{{ local_bin_dir | default(ansible_facts['env']['HOME'] ~ '/.local/bin') }}/{{ item | basename }}" var_prefix: scripts
mode: "0755" subdir: ''
owner: "{{ local_bin_owner | default(ansible_facts['user_id']) }}" target_root: "{{ ansible_facts.env.HOME }}/.local/bin"
group: "{{ local_bin_group | default(ansible_facts['user_gid']) }}" use_symlinks: true
with_fileglob: become_root: false
- "{{ scripts_src_glob | default(playbook_dir + '/scripts/*') }}"
when: ansible_connection not in ['local', 'localhost'] and item is file
- name: Symlink repo scripts into local bin (stow-like, for local hosts)
ansible.builtin.file:
src: "{{ item }}"
dest: "{{ local_bin_dir | default(ansible_facts['env']['HOME'] ~ '/.local/bin') }}/{{ item | basename }}"
state: link
force: true
owner: "{{ local_bin_owner | default(ansible_facts['user_id']) }}"
group: "{{ local_bin_group | default(ansible_facts['user_gid']) }}"
follow: false
with_fileglob:
- "{{ scripts_src_glob | default(playbook_dir + '/scripts/*') }}"
when: ansible_connection in ['local', 'localhost'] and item is file