Add hugo playbook after testing it in combination with the nodejs changes.
This commit is contained in:
@@ -2,29 +2,55 @@
|
||||
# 2026-09-11 Hyperling
|
||||
# Move all Hugo development needs to a specific place.
|
||||
|
||||
- name: Workstation | Hugo
|
||||
- name: Workstation | Linux | Software | Hugo
|
||||
block:
|
||||
|
||||
- name: Workstation | Hugo | Facts (pacman)
|
||||
set_fact:
|
||||
- sass_old: ruby-sass
|
||||
- sass_current: dart-sass
|
||||
- name: Workstation | Linux | Software | Hugo | pacman
|
||||
block:
|
||||
|
||||
- name: Workstation | Linux | Software | Hugo | pacman | Facts
|
||||
set_fact:
|
||||
sass_old: ruby-sass
|
||||
sass_current: dart-sass
|
||||
|
||||
- name: Workstation | Linux | Software | Hugo | pacman | Remove Old
|
||||
package:
|
||||
name:
|
||||
- "{{ sass_old }}"
|
||||
state: absent
|
||||
|
||||
- name: Workstation | Linux | Software | Hugo | pacman | Install New
|
||||
package:
|
||||
name:
|
||||
- "{{ sass_current }}"
|
||||
state: present
|
||||
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
#- name: Workstation | Hugo | Facts (apt)
|
||||
# set_fact:
|
||||
# - sass_old: htop
|
||||
# - sass_current: htop
|
||||
# when: ansible_pkg_mgr == "apt"
|
||||
# This must exist after nodejs.yml so that NPM is installed.
|
||||
- name: Workstation | Linux | Software | Hugo | npm
|
||||
block:
|
||||
|
||||
- name: Workstation | Hugo | Remove
|
||||
package:
|
||||
- "{{ sass_old }}"
|
||||
state: absent
|
||||
- name: Workstation | Linux | Software | Hugo | npm | Facts
|
||||
set_fact:
|
||||
sass_old: node-sass
|
||||
sass_current: sass
|
||||
|
||||
- name: Workstation | Hugo | Install
|
||||
package:
|
||||
- "{{ sass_current }}"
|
||||
state: present
|
||||
- name: Workstation | Linux | Software | Hugo | npm | Gather
|
||||
shell: npm prefix -g
|
||||
register: npm_bin_dir # Provides /usr/local/ on Devuan, /usr/ on Artix.
|
||||
changed_when: false
|
||||
|
||||
when: code is true
|
||||
- name: Workstation | Linux | Software | Hugo | npm | Remove Old
|
||||
shell: "npm remove -g {{ sass_old }}"
|
||||
args:
|
||||
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
|
||||
|
||||
- name: Workstation | Linux | Software | Hugo | npm | Install New
|
||||
shell: "npm install -g {{ sass_current }}"
|
||||
args:
|
||||
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
|
||||
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
when: coding is true
|
||||
|
||||
Reference in New Issue
Block a user