working on helpers
This commit is contained in:
123
tasks/main.yml
123
tasks/main.yml
@@ -1,5 +1,9 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Show indev warning
|
||||
ansible.builtin.debug:
|
||||
msg: "This software is in development. Use at your own risk"
|
||||
|
||||
- name: Set installation facts
|
||||
ansible.builtin.include_tasks:
|
||||
file: facts.yml
|
||||
@@ -85,63 +89,73 @@
|
||||
ansible.builtin.include_tasks:
|
||||
file: pkgs/pipx.yml
|
||||
|
||||
- name: Ensure pipx path exists
|
||||
when: pkg_pipx|length > 0
|
||||
become: "{{ ext_become }}"
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ path.pipx }}"
|
||||
- name: Ensure pipx path exists
|
||||
when: pkg_pipx|length > 0
|
||||
become: "{{ ext_become }}"
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ path.pipx }}"
|
||||
|
||||
- name: Ensure nodejs and npm are installed
|
||||
when: pkg_npm|length > 0
|
||||
vars:
|
||||
pkg: nodejs
|
||||
ansible.builtin.include_tasks:
|
||||
file: addpkg.yml
|
||||
- name: Ensure nodejs and npm are installed
|
||||
when: pkg_npm|length > 0
|
||||
vars:
|
||||
pkg: nodejs
|
||||
ansible.builtin.include_tasks:
|
||||
file: addpkg.yml
|
||||
|
||||
- name: Ensure flatpak is installed
|
||||
when:
|
||||
- pkg_flatpak is defined
|
||||
- pkg_flatpak|length > 0
|
||||
vars:
|
||||
pkg: flatpak
|
||||
ansible.builtin.include_tasks:
|
||||
file: addpkg.yml
|
||||
- name: Ensure flatpak is installed
|
||||
when:
|
||||
- pkg_flatpak is defined
|
||||
- pkg_flatpak|length > 0
|
||||
vars:
|
||||
pkg: flatpak
|
||||
ansible.builtin.include_tasks:
|
||||
file: addpkg.yml
|
||||
|
||||
- name: Ensure appimage path exists
|
||||
when:
|
||||
- pkg_appimage is defined
|
||||
- pkg_appimage|length > 0
|
||||
become: "{{ ext_become }}"
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ path.appimage }}"
|
||||
- name: Ensure appimage path exists
|
||||
when:
|
||||
- pkg_appimage is defined
|
||||
- pkg_appimage|length > 0
|
||||
become: "{{ ext_become }}"
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ path.appimage }}"
|
||||
|
||||
- name: Ensure archive path exists
|
||||
when:
|
||||
- pkg_archive|length > 0
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ path_archive }}"
|
||||
- name: Ensure archive path exists
|
||||
when:
|
||||
- pkg_archive|length > 0
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: "{{ path_archive }}"
|
||||
|
||||
- name: Depend zig
|
||||
when: pkg_zig|length > 0
|
||||
vars:
|
||||
pkg: zig
|
||||
ansible.builtin.include_tasks:
|
||||
file: addpkg.yml
|
||||
- name: Depend zig
|
||||
when: pkg_zig|length > 0
|
||||
vars:
|
||||
pkg: zig
|
||||
ansible.builtin.include_tasks:
|
||||
file: addpkg.yml
|
||||
|
||||
- name: Install sys_pkgs list using system package manager
|
||||
become: "{{ sys_pkg_become }}"
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
ansible.builtin.package:
|
||||
name: "{{ pkg_sys | unique }}"
|
||||
state: present
|
||||
|
||||
- name: Install pkg_archive
|
||||
when:
|
||||
- pkg_archive|length > 0
|
||||
loop: "{{ pkg_archive }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/archive.yml
|
||||
|
||||
- name: Linux specific tasks
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
@@ -154,15 +168,6 @@
|
||||
ansible.builtin.include_tasks:
|
||||
file: macos.yml
|
||||
|
||||
- name: Install pkg_archive
|
||||
when:
|
||||
- pkg_archive|length > 0
|
||||
loop: "{{ pkg_archive }}"
|
||||
loop_control:
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: "helpers/archive.yml"
|
||||
|
||||
- name: Install cargo packages
|
||||
when:
|
||||
- pkg_cargo|length > 0
|
||||
@@ -238,11 +243,3 @@
|
||||
loop_var: pkg
|
||||
ansible.builtin.include_tasks:
|
||||
file: "src/{{ pkg }}.yml"
|
||||
|
||||
- name: Cleanup {{ d_tempdir.path }}
|
||||
become: true
|
||||
when:
|
||||
- not debug
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: "{{ d_tempdir.path }}"
|
||||
|
||||
Reference in New Issue
Block a user