Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
62636c3
Add base/template content
ferricoxide Apr 10, 2026
ad246c5
Run EXE-based installer
ferricoxide Apr 10, 2026
d55bd62
Set all 'notepad__plusplus' references to 'notepad_plusplus'
ferricoxide Apr 10, 2026
c9fb0f2
Update onlyif requisite
ferricoxide Apr 10, 2026
c59954d
Use 'latest' logic if no URI specified
ferricoxide Apr 10, 2026
0225fee
assign dynami vars to 'npp' namespace
ferricoxide Apr 10, 2026
e46b60e
Remove calls to not-implemented 'service' and 'subcomponent' modules
ferricoxide Apr 13, 2026
e228e68
Configure appropriate update-nagging
ferricoxide Apr 13, 2026
cea3645
Externalize the EXE-installer logic
ferricoxide Apr 13, 2026
9561e6e
Use better onlyif condition
ferricoxide Apr 13, 2026
96a1937
Disable auto-updater service
ferricoxide Apr 13, 2026
ce15930
oops: don't hardcode the version!
ferricoxide Apr 13, 2026
aaec568
Illustrate pillar content
ferricoxide Apr 13, 2026
19a63dd
Add some nice-to-have registry values
ferricoxide Apr 13, 2026
11809ed
Move 'fallback' logic to map.jinja
ferricoxide Apr 14, 2026
c408085
fix attribute-type
ferricoxide Apr 14, 2026
e56ee8e
Replace 'value' with 'vname' and 'vdata' attributes
ferricoxide Apr 14, 2026
d82a74b
Ensure only the EXE is pulled
ferricoxide Apr 14, 2026
db988de
Make script exit properly on install-failures
ferricoxide Apr 14, 2026
104f30c
Need to nest these to aligne to Pillar
ferricoxide Apr 14, 2026
52d5f35
Start adding 'clean' logic (packages only)
ferricoxide Apr 14, 2026
c96a00d
Iterate through HKeys and nuke
ferricoxide Apr 14, 2026
446c6f0
Localize templated README content
ferricoxide Apr 14, 2026
0c1e921
Address tardigradelint findings
ferricoxide Apr 14, 2026
01abcc6
Construct test-matrix for Windows envs
ferricoxide Apr 14, 2026
be66ea3
Update Windows 'test' workflow commit-id
ferricoxide Apr 14, 2026
f225867
Add config:npp_admins as an empty list
ferricoxide Apr 14, 2026
6d5ae49
Define a default list of privileged users
ferricoxide Apr 14, 2026
6598af5
Add testing Pillar-content
ferricoxide Apr 14, 2026
4f0208d
Moar repo-std actions
ferricoxide Apr 14, 2026
87e4595
Try to make more resilient
ferricoxide Apr 15, 2026
f7df02f
Use trim() method to clip off extraneous single-quotes
ferricoxide Apr 15, 2026
2344083
Try to add Windows PS linting
ferricoxide Apr 16, 2026
d58df51
Ensure a more-easily visible job-label
ferricoxide Apr 16, 2026
0c2e435
Make PS-linting output more verbose
ferricoxide Apr 16, 2026
1671f12
Provide more-definitive check-output
ferricoxide Apr 16, 2026
5d81227
Try to force github to display per-file test-statuses
ferricoxide Apr 16, 2026
afea39a
Provoke CI warnings
ferricoxide Apr 16, 2026
f783a88
Lower the bar...
ferricoxide Apr 16, 2026
dc89ddb
Nuke the intentional failures
ferricoxide Apr 16, 2026
cdf981e
Enhance validation-testing
ferricoxide Apr 16, 2026
0c32d1f
Change Write-Host to Write-Output
ferricoxide Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.2.1
current_version = 0.0.1
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
55 changes: 52 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run test jobs
name: Run salt tests
on:
pull_request:

Expand All @@ -7,5 +7,54 @@ concurrency:
cancel-in-progress: true

jobs:
test:
uses: plus3it/actions-workflows/.github/workflows/test.yml@ce3cef72cf4ac9605a29350d1d4387dfb86cd7a8
windows:
uses: plus3it/actions-workflows/.github/workflows/test-salt-windows.yml@00ff10246f901f01818db412fa99124dbed4a00c
strategy:
matrix:
os_version:
- windows-2019
- windows-2022
- windows-2025
salt_state:
- notepad-plusplus
salt_pillar_root:
- ./tests/pillar/test-main
with:
salt-os-version: ${{ matrix.os_version }}
salt-state: ${{ matrix.salt_state }}
salt-pillar-root: ${{ matrix.salt_pillar_root }}

lint_powershell:
name: PowerShell Linting
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Run PSScriptAnalyzer
shell: pwsh
run: |
$files = Get-ChildItem -Path ./ -Include *.ps1 -Recurse
Write-Host "--- Starting PowerShell Static Analysis ---"

$anyErrors = $false

foreach ($file in $files) {
$relativePath = $file.FullName.Replace($PWD.ProviderPath, ".")
$results = Invoke-ScriptAnalyzer -Path $file.FullName -Severity Warning

if ($results) {
Write-Host "FAIL: $relativePath" -ForegroundColor Red
$results | Format-Table -AutoSize
$anyErrors = $true
} else {
Write-Host "PASS: $relativePath" -ForegroundColor Green
}
}

if ($anyErrors) {
Write-Error "Static analysis failed. Please fix the errors above."
exit 1
} else {
Write-Host "--- All files passed analysis! ---"
}
31 changes: 8 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,22 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### [1.2.1] (https://github.com/plus3it/repo-template/releases/tag/1.2.1)
### [0.0.1] (https://github.com/plus3it/repo-template/releases/tag/0.0.1)

**Summary**:

* Updated README.md to include config settings for github
* Updated LICENSE copyright year

### [1.2.0] (https://github.com/plus3it/repo-template/releases/tag/1.2.0)
**Released**: 2026.04.14

**Summary**:

* Updated SHA value for Github Actions Workflows
* Updated CHANGELOG.template.md file
* Added Master branch in release workflow logic to make migration to Github Actions more efficient

### 1.1.0

**Commit Delta**: N/A

**Released**: 2023.01.27

**Summary**:
* Adds all necessary, initial install and configuration content for the Notepad++ application to be installed and ready-to-run
* Adds all necessary "clean" content for the Notepad++ application to be fully removed (binaries, config-files and registry-settings
* Activates initial CI content from repo-template repository

* Updated workflow files to be consumable and reusable, and now points to actions-workflows repo

### 1.0.0

**Commit Delta**: N/A
### [0.0.0] (https://github.com/plus3it/repo-template/releases/tag/0.0.0)

**Released**: 2023.01.10
**Released**: 2026.04.09

**Summary**:

* Initial release of capability
* "Skeleton" content cloned from [repo-template](https://github.com/plus3it/repo-template) repository
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2024 Maintainers of plus3it/repo-template
Copyright 2026 Maintainers of plus3it/repo-template

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
92 changes: 40 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,40 @@
# repo-template
Generic repo template for Plus3IT repositories

To use this template:

1. Select the green "Use this template" button, or [click here](https://github.com/plus3it/repo-template/generate).
2. Select the repo Owner, give the repo a name, enter a description, select Public or Private, and click "Create repository from template".
3. Clone the repository and create a new branch.
4. Configure the following settings on your new repo.
* `GENERAL`
* `Features`
* Turn off Wikis, Sponsorships, Discussions, and Projects
* `Pull Requests`
* Turn off Squash Merging
* Turn off Rebase Merging
* Turn on Allow Auto-Merge
* Turn on Automatically delete head branches
* `Pushes`
* Limit how many branches can be updated in a single push: 2
* `COLLABORATORS and TEAMS`
* `Manage Access`
* Add relevant team roles, for example
* `tardigrade-admins` (Admin)
* `terraform` (Write)
* `releasebot` (Write)
* `Branches`
* `Create Branch Protection rule` for `main`
* Turn on Require pull request before merging
* Turn on Require approvals
* Turn on Dismiss stale pull requests...
* `Required Status Checks`
* As relevant to projects, for example
* WIP
* lint/actionlint
* lint/tardigradelint
* test / mockstacktest
* Turn on Do not allow bypassing the above settings
5. Edit the following files to customize them for the new repository:
* `LICENSE`
* Near the end of the file, edit the date and change the repository name
* `CHANGELOG.template.md`
* Rename to `CHANGELOG.md`, replacing the repo-template changelog
* Edit templated items for the new repo
* `.bumpversion.cfg`
* Edit the version number for the new repo, ask team if not sure what to
start with
* `README.md`
* Replace contents for the new repo
* `.github/`
* Inspect dependabot and workflow files in case changes are needed for
the new repo
6. Commit the changes and open a pull request
# notepad-plusplus-formula

A Saltstack formula designed to install and configure the [Notepad++](https://notepad-plus-plus.org/) text-editor (and to uninstall it later).

It is primarily expected that this formula will be run via [P3](https://www.plus3it.com/)'s "[watchmaker](https://watchmaker.readthedocs.io/en/stable/)" framework.

This formula is able to install and configure the Notepad++ text-editor on Windows-based systems. Linux functionality would also have been provided, but there's currently no Linux variant from the same makers.

## Available states

- [notepad-plusplus](#notepad-plusplus)
- [notepad-plusplus.clean](#notepad-plusplus.clean)
- [notepad-plusplus.package](#notepad-plusplus.package)
- [notepad-plusplus.package.clean](#notepad-plusplus.package.clean)
- [notepad-plusplus.config](#notepad-plusplus.config)
- [notepad-plusplus.config.clean](#notepad-plusplus.config.clean)

### notepad-plusplus

Executes the `package` and `config` states to install and configure the Notepad++ editor. This includes the editor binaries, as well as some Windows Registry settings and user-configuration template files.

### notepad-plusplus.clean

Executes the `package` and `config` states' `clean` actions to fully uninstall the Notepad++ editor and associated registry entries

### notepad-plusplus.package

Executes _just_ the `package` state to install the Notepad++ package.

### notepad-plusplus.package.clean

Executes _just_ the `package` state's `clean` module to uninstall the Notepad++ binaries.

### notepad-plusplus.config

Executes _just_ the `config` state to install registry-keys and other configuration-items to support the healthy running of the Notepad++ application

### notepad-plusplus.config.clean

Executes _just_ the `config` state's `clean` module to uninstall the Notepad++ application's registry keys and other configuration-items set up during a prior, formula-managed installation.
13 changes: 13 additions & 0 deletions notepad-plusplus/_mapdata/_mapdata.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yamllint disable rule:indentation rule:line-length
# {{ grains.get("osfinger", grains.os) }}
---
{#- use salt.slsutil.serialize to avoid encoding errors on some platforms #}
{{ salt["slsutil.serialize"](
"yaml",
map,
default_flow_style=False,
allow_unicode=True,
)
| regex_replace("^\s+'$", "'", multiline=True)
| trim
}}
22 changes: 22 additions & 0 deletions notepad-plusplus/_mapdata/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
---
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split("/")[0] %}
{%- from tplroot ~ "/map.jinja" import mapdata with context %}

{%- set _mapdata = {
"values": mapdata,
} %}
{%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}

{%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
{%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}

{{ tplroot }}-mapdata-dump:
file.managed:
- name: {{ output_file }}
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
- template: jinja
- context:
map: {{ _mapdata | yaml }}
6 changes: 6 additions & 0 deletions notepad-plusplus/clean.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

include:
- .config.clean
- .package.clean
37 changes: 37 additions & 0 deletions notepad-plusplus/config/clean.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import mapdata as notepad_plusplus with context %}
{%- set npp_admins = notepad_plusplus.config.npp_admins or ['Administrator'] %}
{%- set npp_dir = 'C:\\Program Files\\Notepad++' %}

{# Map descriptive IDs to their respective Registry paths #}
{%- set npp_registry_map = {
'NPP Application Path': 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\notepad++.exe',
'NPP Context Menu Entry': 'HKEY_CLASSES_ROOT\\*\\shell\\Open with Notepad++',
'NPP MuiCache Entry': 'HKEY_CLASSES_ROOT\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\MuiCache',
'NPP OpenWithList txt': 'HKEY_CLASSES_ROOT\\.txt\\OpenWithList\\notepad++.exe',
'NPP System Notepad Replacement': 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Opt
ions\\notepad.exe'
}
%}

{%- for desc, reg_path in npp_registry_map.items() %}
Remove {{ desc }}:
reg.absent:
- name: '{{ reg_path }}'
{%- endfor %}

{%- for admin in npp_admins %}
Remove NPP AppData for {{ admin }}:
file.absent:
- name: 'C:\Users\{{ admin }}\AppData\Roaming\Notepad++'
{%- endfor %}

Remove NPP System Config Files:
file.absent:
- names:
- '{{ npp_dir }}\updater\gup.xml'
- '{{ npp_dir }}\config.model.xml'
Loading
Loading