move a lot of configuration around
This commit is contained in:
@@ -12,14 +12,14 @@
|
||||
- name: Set bitwarden facts
|
||||
ansible.builtin.set_fact:
|
||||
bw:
|
||||
appimg: pkgconfig_bitwarden.appimage
|
||||
become: pkgconfig_bitwarden.dobecome
|
||||
flatpak: pkgconfig_bitwarden.flatpak
|
||||
group: pkgconfig_bitwarden.group
|
||||
instdir: pkgconfig_bitwarden.install_dir
|
||||
instmtd: pkgconfig_bitwarden.install_method
|
||||
instpfx: pkgconfig_bitwarden.install_prefix
|
||||
owner: pkgconfig_bitwarden.owner
|
||||
appimg: "{{ pkgconfig_bitwarden.appimage }}"
|
||||
become: "{{ pkgconfig_bitwarden.dobecome }}"
|
||||
flatpak: "{{ pkgconfig_bitwarden.flatpak }}"
|
||||
group: "{{ pkgconfig_bitwarden.group }}"
|
||||
instdir: "{{ pkgconfig_bitwarden.install_dir }}"
|
||||
instmtd: "{{ pkgconfig_bitwarden.install_method }}"
|
||||
bindir: "{{ pkgconfig_bitwarden.install_prefix }}/bin"
|
||||
owner: "{{ pkgconfig_bitwarden.owner }}"
|
||||
|
||||
- name: Append to flatpkgs
|
||||
when:
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- ansible.builtin.set_fact:
|
||||
- name: Set hashicorp flag
|
||||
ansible.builtin.set_fact:
|
||||
hashicorp: true
|
||||
|
||||
- name: RedHat repository
|
||||
when: ansible_os_family == 'RedHat'
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
block:
|
||||
- name: enable hashicorp repo for fedora >=41
|
||||
- name: Enable hashicorp repo for fedora >=41
|
||||
become: true
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
@@ -15,7 +17,7 @@
|
||||
creates: /etc/yum.repos.d/hashicorp.repo
|
||||
cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.hashicorp.Linux.Fedora.repo }}"
|
||||
|
||||
- name: enable hashicorp repo for fedora <41
|
||||
- name: Enable hashicorp repo for fedora <41
|
||||
become: true
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
@@ -24,7 +26,7 @@
|
||||
creates: /etc/yum.repos.d/hashicorp.repo
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.Fedora.repo }}"
|
||||
|
||||
- name: enable hashicorp repo for RHEL like distribution
|
||||
- name: Enable hashicorp repo for RHEL like distribution
|
||||
become: true
|
||||
when:
|
||||
- ansible_distribution != 'Fedora'
|
||||
@@ -33,21 +35,25 @@
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.RedHat.repo }}"
|
||||
|
||||
- name: Debian based repository
|
||||
when: ansible_os_family == 'Debian'
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
block:
|
||||
- ansible.builtin.tempfile:
|
||||
- name: Create temporary directory
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
prefix: hashicorp.
|
||||
register: d_hashicorp_tmp
|
||||
|
||||
- name: get hashicorp archive gpg key
|
||||
- name: Get hashicorp archive gpg key
|
||||
ansible.builtin.get_url:
|
||||
dest: "{{ d_hashicorp_tmp.path }}/gpg"
|
||||
url: https://apt.releases.hashicorp.com/gpg
|
||||
mode: '0644'
|
||||
|
||||
- name: install hashicorp archive gpg key
|
||||
- name: Install hashicorp archive gpg key
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
creates: /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
||||
cmd:
|
||||
- gpg
|
||||
- --dearmor
|
||||
@@ -55,13 +61,17 @@
|
||||
- /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
||||
- "{{ d_hashicorp_tmp.path }}/gpg"
|
||||
|
||||
- name: enable hasicorp repo for debian
|
||||
- name: Enable hasicorp repo for debian
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}"
|
||||
state: present
|
||||
update_cache: false
|
||||
|
||||
- name: enable hashicorp homebrew tap
|
||||
when: ansible_os_family == 'Darwin'
|
||||
ansible.builtin.set_fact:
|
||||
brewtaps: "{{ brewtaps + ['hashicorp/tap'] }}"
|
||||
- name: MacOS specific configuration
|
||||
when:
|
||||
- ansible_distribution == 'MacOSX'
|
||||
block:
|
||||
- name: Enable hashicorp homebrew tap
|
||||
when: ansible_os_family == 'Darwin'
|
||||
ansible.builtin.set_fact:
|
||||
brewtaps: "{{ brewtaps + ['hashicorp/tap'] }}"
|
||||
|
||||
@@ -1,17 +1,50 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
- name: Load neovim config
|
||||
ansible.builtin.include_vars:
|
||||
file: neovim.yml
|
||||
name: _neovim
|
||||
- ansible.builtin.set_fact:
|
||||
|
||||
- name: Combine neovim default and user config
|
||||
ansible.builtin.set_fact:
|
||||
pkgconfig_neovim: "{{ _neovim | ansible.builtin.combine(pkgconfig.neovim) }}"
|
||||
|
||||
- name: append neovim to srcpkgs
|
||||
- name: Set neovim facts
|
||||
ansible.builtin.set_fact:
|
||||
srcpkgs: "{{ srcpkgs + ['neovim'] }}"
|
||||
when: not pkgconfig_neovim.use_syspkg
|
||||
nvim:
|
||||
appimg: "{{ pkgconfig_neovim.appimage }}"
|
||||
become: "{{ pkgconfig_neovim.dobecome }}"
|
||||
bldtype: "{{ pkgconfig_neovim.build_type }}"
|
||||
group: "{{ pkgconfig_neovim.group }}"
|
||||
instdir: "{{ pkgconfig_neovim.install_dir }}"
|
||||
instmtd: "{{ pkgconfig_neovim.install_method }}"
|
||||
instpfx: "{{ pkgconfig_neovim.install_prefix }}"
|
||||
owner: "{{ pkgconfig_neovim.owner }}"
|
||||
ver: "{{ pkgconfig_neovim.version }}"
|
||||
|
||||
- name: append neovim to syspkgs
|
||||
- name: Linux specific install
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
block:
|
||||
# install system package when on an up to date distro
|
||||
- name: Append to syspkgs
|
||||
when:
|
||||
- (ansible_distribution == 'Fedora') or
|
||||
(ansible_distribution == 'Ubuntu')
|
||||
|
||||
- name: Append to appimages
|
||||
when:
|
||||
- nvim.instmtd == 'appimage'
|
||||
ansible.builtin.set_fact:
|
||||
appimages: "{{ appimages + ['neovim'] }}"
|
||||
- name: Append neovim to syspkgs
|
||||
when:
|
||||
- ansible_os_family == 'Darwin'
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + ['neovim'] }}"
|
||||
when: pkgconfig_neovim.use_syspkg
|
||||
|
||||
- name: Append neovim to srcpkgs
|
||||
when:
|
||||
- nvim.instmtd == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
srcpkgs: "{{ srcpkgs + ['neovim'] }}"
|
||||
|
||||
Reference in New Issue
Block a user