Skip to content

Commit

Permalink
chore(pre-commit): pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Morelly committed Dec 12, 2024
1 parent be56aef commit 2edfc4b
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 60 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
uses: ansible/ansible-lint@main
with:
requirements_file: molecule/requirements.yml

16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-case-conflict
- id: check-symlinks
- id: check-json
- id: mixed-line-ending
args: ["--fix=lf"]
- id: no-commit-to-branch
args: [--branch, main]
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
84 changes: 42 additions & 42 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"branches": [
"main",
"master"
"branches": [
"main",
"master"
],
"ci": false,
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
"ci": false,
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/github",
{
"successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
"labels": false,
"releasedLabels": false
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file."
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
],
"message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/github",
{
"successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
"labels": false,
"releasedLabels": false
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file."
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
],
"message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
}
]
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
## v2.5.5
- become_user vault_user when modifying files in vault_home

## v2.5.4
## v2.5.4
- New installation instructions

## v2.5.3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ help: ## list makefile targets

.PHONY: lint
lint: ## lint
ansible-lint -c .ansible-lint
ansible-lint -c .ansible-lint
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
ignores: [(message) => /^Bumps \[.+]\(.+\) from .+ to .+\.$/m.test(message)],
}
}
2 changes: 1 addition & 1 deletion examples/README_VAGRANT.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ If you notice an error like *vm: The '' provisioner could not be found.* make su
7. http://www.vagrantup.com/
8. https://www.virtualbox.org/
9. https://github.com/adrienthebo/vagrant-hosts
10. https://vagrant-libvirt.github.io/vagrant-libvirt
10. https://vagrant-libvirt.github.io/vagrant-libvirt
2 changes: 1 addition & 1 deletion examples/bin/preinstall
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ function add_host {
fi
}

add_host
add_host
1 change: 0 additions & 1 deletion molecule/debian-11-enterprise/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ provisioner:
vault_install_hashi_repo: true
vault_bin_path: /usr/bin
vault_group: vault

11 changes: 5 additions & 6 deletions molecule/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@
register: download_goss
until: download_goss is succeeded
retries: 3

- name: Copy Goss tests to remote
template:
src: "{{ item }}"
dest: "{{ goss_test_directory }}/{{ item | basename | splitext | first }}"
mode: 0644
with_fileglob:
- "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/_tests/test_*.j2"

- name: Register test files
shell: "ls {{ goss_test_directory }}/test_*.yml"
changed_when: false
register: test_files

- name: Execute Goss tests
environment:
# yamllint disable-line rule:line-length
Expand All @@ -50,15 +50,14 @@
changed_when: false
register: test_results
with_items: "{{ test_files.stdout_lines }}"

- name: Display details about the Goss results
debug:
msg: "{{ item.stdout_lines }}"
with_items: "{{ test_results.results }}"

- name: Fail when tests fail
fail:
msg: "Goss failed to validate"
when: item.rc != 0
with_items: "{{ test_results.results }}"

2 changes: 1 addition & 1 deletion role_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ variable. Attempts to download the package from `vault_zip_url` if zip is not fo

Since v2.5.9 of this role you can also install Vault Enterprise via the HashiCorp Repo. In order to install Vault Enterprise via the HashiCorp Repo, set `vault_install_hashi_repo: true*` as well as `vault_enterprise: true`.

**Warning:** Non-Enterprise Package will be removed if already installed and vault_enterprise is set to *true* and vice versa.
**Warning:** Non-Enterprise Package will be removed if already installed and vault_enterprise is set to *true* and vice versa.

# Vault Enterprise with HSM

Expand Down
1 change: 0 additions & 1 deletion templates/vault_backend_dynamodb.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ backend "dynamodb" {
session_token = "{{ vault_dynamodb_session_token }}"
{% endif %}
}

1 change: 0 additions & 1 deletion templates/vault_backend_etcd.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ backend "etcd" {
tls_key_file = "{{ vault_backend_tls_private_path }}/{{ vault_backend_tls_key_file }}"
{% endif -%}
}

2 changes: 1 addition & 1 deletion templates/vault_seal_gcpkms.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ seal "gcpckms" {
region = "{{ vault_gkms_region }}"
key_ring = "{{ vault_gkms_key_ring }}"
crypto_key = "{{ vault_gkms_crypto_key }}"
}
}
2 changes: 1 addition & 1 deletion vault_releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ To install a specific version of a package, the version is added to the package
```
$ dnf install vault-enterprise-1.18.2+ent
```
Notice that, different to the Debian package, the trailing `-1` is not required.
Notice that, different to the Debian package, the trailing `-1` is not required.

0 comments on commit 2edfc4b

Please sign in to comment.