Modifying default variables and config
Renamed variables for defaults: - flatpak_method -> default_flatpak_method: system - defaults.paths.prefix -> default_install_prefix: /usr/local New variables: - default_install_method: package
This commit is contained in:
5
tasks/helpers/addpkg.yml
Normal file
5
tasks/helpers/addpkg.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: "Add include task for {{ pkg }}"
|
||||
ansible.builtin.include_tasks:
|
||||
file: "pkgs/{{ pkg }}.yml"
|
||||
26
tasks/helpers/appimage.yml
Normal file
26
tasks/helpers/appimage.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install appimage {{ pkg }}
|
||||
become: "{{ ext_become }}"
|
||||
block:
|
||||
- name: Ensure appimage path exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ path.appimage }}/{{ appimage_link_name }}"
|
||||
mode: '0755'
|
||||
state: directory
|
||||
|
||||
- name: Fetch appimage
|
||||
become: "{{ ext_become }}"
|
||||
ansible.builtin.get_url:
|
||||
mode: '0755'
|
||||
decompress: false
|
||||
backup: true
|
||||
url: "{{ appimage_url }}"
|
||||
dest: "{{ path.appimage }}/{{ appimage_link_name }}/{{ appimage_file }}"
|
||||
|
||||
- name: Link appimage to bin
|
||||
become: "{{ ext_become }}"
|
||||
ansible.builtin.file:
|
||||
state: link
|
||||
src: "{{ path.appimage }}/{{ appimage_link_name }}/{{ appimage_file }}"
|
||||
path: "{{ path.bindir }}/{{ appimage_link_name }}"
|
||||
11
tasks/helpers/cargo.yml
Normal file
11
tasks/helpers/cargo.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
# vim: set filetype=yaml.ansible
|
||||
---
|
||||
- name: Install cargo {{ pkg }}
|
||||
become: "{{ ext_become }}"
|
||||
environment:
|
||||
RUSTONIG_SYSTEM_LIBONIG: 1
|
||||
community.general.cargo:
|
||||
name: "{{ pkg.name | default(pkg) }}"
|
||||
version: "{{ pkg.vers | default(omit) }}"
|
||||
path: "{{ path.cargo | default(path.prefix) }}"
|
||||
locked: "{{ pkg.locked | default(omit) }}"
|
||||
@@ -50,6 +50,7 @@
|
||||
group: root
|
||||
mode: "0755"
|
||||
state: directory
|
||||
|
||||
- name: Copy extra files
|
||||
loop: "{{ install_files | dict2items }}"
|
||||
loop_control:
|
||||
|
||||
9
tasks/helpers/flatpak.yml
Normal file
9
tasks/helpers/flatpak.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install flatpak
|
||||
become: "{{ ext_become }}"
|
||||
community.general.flatpak:
|
||||
method: "{{ pkg_method }}"
|
||||
remote: "{{ pkg_remote }}"
|
||||
name: "{{ pkg_name }}"
|
||||
state: present
|
||||
10
tasks/helpers/flatpak_remote.yml
Normal file
10
tasks/helpers/flatpak_remote.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Add flatpak remote
|
||||
become: "{{ ext_become }}"
|
||||
community.general.flatpak_remote:
|
||||
enabled: "{{ remote_enabled }}"
|
||||
flatpakrepo_url: "{{ remote_url }}"
|
||||
method: "{{ remote_method }}"
|
||||
name: "{{ remote_name }}"
|
||||
state: "{{ remote_state }}"
|
||||
9
tasks/helpers/go.yml
Normal file
9
tasks/helpers/go.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install go package {{ pkg }}
|
||||
become: "{{ ext_become }}"
|
||||
environment:
|
||||
GOBIN: "{{ path.bin }}"
|
||||
PATH: "{{ path.go }}/bin:$PATH"
|
||||
ansible.builtin.command:
|
||||
cmd: go install {{ pkg }}
|
||||
8
tasks/helpers/npm.yml
Normal file
8
tasks/helpers/npm.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install npm {{ pkg }}
|
||||
become: true
|
||||
community.general.npm:
|
||||
global: true
|
||||
name: "{{ pkg }}"
|
||||
state: present
|
||||
11
tasks/helpers/pipx.yml
Normal file
11
tasks/helpers/pipx.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Install pipx {{ pkg }}
|
||||
become: "{{ ext_become }}"
|
||||
environment:
|
||||
PIPX_HOME: "{{ path.pipx }}"
|
||||
PIPX_BIN_DIR: "{{ path.bin }}"
|
||||
community.general.pipx:
|
||||
executable: "{{ pipx_exec }}"
|
||||
name: "{{ pkg }}"
|
||||
state: latest
|
||||
Reference in New Issue
Block a user