diff --git a/tasks/archive/terraform.yml b/tasks/archive/terraform.yml new file mode 100644 index 0000000..a7eadd4 --- /dev/null +++ b/tasks/archive/terraform.yml @@ -0,0 +1,13 @@ +- name: Download terraform archive + ansible.builtin.get_url: + dest: "{{ d_tempdir.path }}/{{ terraform.file }}" + url: "{{ terraform.url }}/{{ terraform.file }}" + decompress: false + mode: '0644' + +- name: Extract terraform archive + become: "{{ ext_become }}" + ansible.builtin.unarchive: + dest: "{{ path.archive }}/terraform" + src: "{{ d_tempdir.path }}/{{ terraform.file }}" + remote_src: true diff --git a/tasks/config/carapace.yml b/tasks/config/carapace.yml index 1263a5f..37aae70 100644 --- a/tasks/config/carapace.yml +++ b/tasks/config/carapace.yml @@ -3,5 +3,5 @@ - name: Set carapace config ansible.builtin.set_fact: carapace: - pkgs: "{{ pkgconfig.carapace.pkgs[ansible_system] }}" + pkgs: "{{ pkgconfig.carapace.pkgs[ansible_os_family] }}" repo: "{{ pkgconfig.carapace.repo[ansible_os_family] }}" diff --git a/tasks/config/neovide.yml b/tasks/config/neovide.yml index 8f205ac..925acab 100644 --- a/tasks/config/neovide.yml +++ b/tasks/config/neovide.yml @@ -4,6 +4,6 @@ ansible.builtin.set_fact: neovide: name: neovide - deps: "{{ pkgconfig.neovide.build_deps[ansible_os_family] }}" + build_deps: "{{ pkgconfig.neovide.build_deps[ansible_os_family] }}" vers: "{{ pkgconfig.neovide.version }}" locked: true diff --git a/tasks/config/python3.yml b/tasks/config/python3.yml index 986bacb..6ac3e99 100644 --- a/tasks/config/python3.yml +++ b/tasks/config/python3.yml @@ -2,4 +2,4 @@ - name: Set python3 config ansible.builtin.set_fact: python3: - pkgs: "{{ pkgconfig.python3.pkgs[ansible_system] }}" + pkgs: "{{ pkgconfig.python3.pkgs[ansible_os_family] }}" diff --git a/tasks/config/rust.yml b/tasks/config/rust.yml index 56fdcc6..2ca567a 100644 --- a/tasks/config/rust.yml +++ b/tasks/config/rust.yml @@ -3,4 +3,4 @@ - name: Set rust config ansible.builtin.set_fact: rust: - pkgs: "{{ pkgconfig.rust.pkgs[ansible_system] }}" + pkgs: "{{ pkgconfig.rust.pkgs[ansible_os_family] }}" diff --git a/tasks/config/terraform.yml b/tasks/config/terraform.yml index a9081ba..ab98cc3 100644 --- a/tasks/config/terraform.yml +++ b/tasks/config/terraform.yml @@ -1,4 +1,17 @@ +- name: Set terraform install method + ansible.builtin.set_fact: + terraform: + method: "{{ pkgconfig.terraform.method[ansible_os_family] | default(pkgconfig.terraform.method.default) }}" + - name: Set terraform config ansible.builtin.set_fact: terraform: + method: "{{ terraform.method }}" pkgs: "{{ pkgconfig.terraform.pkgs[ansible_system] }}" + +- name: Set terraform archive config + ansible.builtin.set_fact: + terraform: + method: "{{ terraform.method }}" + url: "{{ pkgconfig.terraform.baseurl }}/terraform/{{ pkgconfig.terraform.version }}" + file: "terraform_{{ pkgconfig.terraform.version }}_linux_amd64.zip" diff --git a/tasks/config/tidy.yml b/tasks/config/tidy.yml index 8ea18c2..2a8cd9f 100644 --- a/tasks/config/tidy.yml +++ b/tasks/config/tidy.yml @@ -1,4 +1,4 @@ - name: Set tidy config ansible.builtin.set_fact: tidy: - pkgs: "{{ pkgconfig.tidy.pkgs[ansible_system] }}" + pkgs: "{{ pkgconfig.tidy.pkgs[ansible_os_family] }}" diff --git a/tasks/pkgs/neovide.yml b/tasks/pkgs/neovide.yml index 91ee73b..3294faf 100644 --- a/tasks/pkgs/neovide.yml +++ b/tasks/pkgs/neovide.yml @@ -8,15 +8,20 @@ ansible.builtin.include_tasks: file: config/neovide.yml - - name: Append neovide to pkg_sys and pkg_cargo + - name: Linux based neovide install when: - ansible_system == 'Linux' - notify: - - Depend cargo - changed_when: true - ansible.builtin.set_fact: - pkg_sys: "{{ pkg_sys + neovide.deps }}" - pkg_cargo: "{{ pkg_cargo + [neovide] }}" + block: + - name: Append neovide build_deps to pkg_sys + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + neovide.deps }}" + + - name: Append neovide to pkg_cargo + notify: + - Depend cargo + changed_when: true + ansible.builtin.set_fact: + pkg_cargo: "{{ pkg_cargo + [neovide] }}" - name: Append neovide to pkg_cask when: diff --git a/tasks/pkgs/pandoc.yml b/tasks/pkgs/pandoc.yml index c997547..c414504 100644 --- a/tasks/pkgs/pandoc.yml +++ b/tasks/pkgs/pandoc.yml @@ -7,7 +7,6 @@ - name: Append pandoc to pkg_sys ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + ['pandoc'] }}" - - name: Set pandoc_configured ansible.builtin.set_fact: pandoc_configured: true diff --git a/tasks/src/neovide.yml b/tasks/src/neovide.yml index bd99a09..37f2b41 100644 --- a/tasks/src/neovide.yml +++ b/tasks/src/neovide.yml @@ -1,14 +1,6 @@ # vim: set filetype=yaml.ansible : --- -- ansible.builtin.set_fact: - neovide_cargoversioned: - name: neovide - version: "{{ pkgconfig_neovide.version }}" - path: "{{ pkgconfig_neovide.install_prefix }}" -- ansible.builtin.set_fact: - cargoversioned: "{{ cargoversioned + [neovide_cargoversioned] }}" - -- name: ensure directories exist +- name: Ensure directories exist ansible.builtin.file: state: directory path: "{{ pkgconfig_neovide.install_prefix }}/{{ _dir }}" diff --git a/tasks/src/neovim.yml b/tasks/src/neovim.yml index 20ac6cc..a9f81c3 100644 --- a/tasks/src/neovim.yml +++ b/tasks/src/neovim.yml @@ -1,15 +1,9 @@ # vim: set filetype=yaml.ansible : --- -- name: Create temp path - ansible.builtin.tempfile: - state: directory - prefix: nvim. - register: d_nvim_tmp - - name: Clone neovim git repository ansible.builtin.git: depth: 1 - dest: "{{ d_nvim_tmp.path }}/neovim" + dest: "{{ d_tempdir.path }}/neovim" repo: "{{ pkgconfig_neovim.git_repo }}" version: "{{ pkgconfig_neovim.version }}" diff --git a/vars/pkgs/hyprcursor.yml b/vars/pkgs/hyprcursor.yml index 1dac4f7..0f01f8e 100644 --- a/vars/pkgs/hyprcursor.yml +++ b/vars/pkgs/hyprcursor.yml @@ -13,7 +13,7 @@ hyprcursor: - cairo-dev - libzip-dev - librsvg-dev - - tomlpluplus-dev + - tomlplusplus-dev build_installed_files: - lib64/libhyprcursor.so.0.1.11 - lib64/libhyprcursor.so.0 diff --git a/vars/pkgs/libreoffice.yml b/vars/pkgs/libreoffice.yml index 4f21fb5..70fa673 100644 --- a/vars/pkgs/libreoffice.yml +++ b/vars/pkgs/libreoffice.yml @@ -3,6 +3,7 @@ libreoffice: default: sys Ubuntu: flatpak Fedora: flatpak + Alpine: flatpak MacOSX: cask flatpak: name: org.libreoffice.LibreOffice diff --git a/vars/pkgs/neovim.yml b/vars/pkgs/neovim.yml index a20e4ec..227fdc3 100644 --- a/vars/pkgs/neovim.yml +++ b/vars/pkgs/neovim.yml @@ -6,9 +6,26 @@ neovim: link_name: nvim methods: default: src + Alpine: src Fedora: sys Ubuntu: sys MacOSX: sys pkgs: default: - neovim + build_deps: + RedHat: [] + Debian: [] + Darwin: [] + Alpine: + - build-base + - cmake + - libuv-dev + - libuv + - libluv + - lua-luv-dev + - utf8proc-dev + - luajit-dev + - luajit + - lua-lpeg-dev + - unibilium-dev diff --git a/vars/pkgs/python3.yml b/vars/pkgs/python3.yml index 897216e..1ba2ed4 100644 --- a/vars/pkgs/python3.yml +++ b/vars/pkgs/python3.yml @@ -2,6 +2,12 @@ python3: pkgs: Darwin: - python3 - Linux: + RedHat: - python3 - python3-pip + Debian: + - python3 + - python3-pip + Alpine: + - python3 + - py3-pip diff --git a/vars/pkgs/rust.yml b/vars/pkgs/rust.yml index f7fbc28..b725732 100644 --- a/vars/pkgs/rust.yml +++ b/vars/pkgs/rust.yml @@ -2,6 +2,12 @@ rust: pkgs: Darwin: - rust - Linux: + Debian: - rustc - cargo + RedHat: + - rustc + - cargo + Alpine: + - rust + - cargo diff --git a/vars/pkgs/terraform.yml b/vars/pkgs/terraform.yml index 409abf8..a60bca3 100644 --- a/vars/pkgs/terraform.yml +++ b/vars/pkgs/terraform.yml @@ -1,4 +1,10 @@ terraform: + version: 1.11.1 + archive: + baseurl: https://releases.hashicorp.com + method: + default: sys + Alpine: archive pkgs: Linux: - terraform diff --git a/vars/pkgs/tidy.yml b/vars/pkgs/tidy.yml index be2c764..46950d1 100644 --- a/vars/pkgs/tidy.yml +++ b/vars/pkgs/tidy.yml @@ -2,5 +2,9 @@ tidy: pkgs: Darwin: - tidy-html5 - Linux: + Alpine: + - tidyhtml + Debian: + - tidy + RedHat: - tidy