diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 9edd0443..d46f5772 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -15,4 +15,3 @@ jobs: uses: ansible/ansible-lint@main with: requirements_file: molecule/requirements.yml - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..dedddd18 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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] diff --git a/.releaserc.json b/.releaserc.json index e26b4457..66b3eefd 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -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}" + } ] - } \ No newline at end of file + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index d51465be..2c5fa247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Makefile b/Makefile index 668d52cd..6ee7ae9f 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,4 @@ help: ## list makefile targets .PHONY: lint lint: ## lint - ansible-lint -c .ansible-lint \ No newline at end of file + ansible-lint -c .ansible-lint diff --git a/commitlint.config.js b/commitlint.config.js index 3628b5fa..e2b685b1 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -2,4 +2,4 @@ module.exports = { extends: ['@commitlint/config-conventional'], ignores: [(message) => /^Bumps \[.+]\(.+\) from .+ to .+\.$/m.test(message)], - } \ No newline at end of file + } diff --git a/examples/README_VAGRANT.md b/examples/README_VAGRANT.md index 2c9a6495..4bc38719 100644 --- a/examples/README_VAGRANT.md +++ b/examples/README_VAGRANT.md @@ -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 \ No newline at end of file +10. https://vagrant-libvirt.github.io/vagrant-libvirt diff --git a/examples/bin/preinstall b/examples/bin/preinstall index 2752f83d..fdea71b2 100755 --- a/examples/bin/preinstall +++ b/examples/bin/preinstall @@ -50,4 +50,4 @@ function add_host { fi } -add_host \ No newline at end of file +add_host diff --git a/molecule/debian-11-enterprise/molecule.yml b/molecule/debian-11-enterprise/molecule.yml index 7cc7dfca..f9506f57 100644 --- a/molecule/debian-11-enterprise/molecule.yml +++ b/molecule/debian-11-enterprise/molecule.yml @@ -30,4 +30,3 @@ provisioner: vault_install_hashi_repo: true vault_bin_path: /usr/bin vault_group: vault - diff --git a/molecule/verify.yml b/molecule/verify.yml index b310867f..be22d216 100644 --- a/molecule/verify.yml +++ b/molecule/verify.yml @@ -28,7 +28,7 @@ register: download_goss until: download_goss is succeeded retries: 3 - + - name: Copy Goss tests to remote template: src: "{{ item }}" @@ -36,12 +36,12 @@ 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 @@ -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 }}" - diff --git a/role_variables.md b/role_variables.md index afcfbd87..e0f6630e 100644 --- a/role_variables.md +++ b/role_variables.md @@ -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 diff --git a/templates/vault_backend_dynamodb.j2 b/templates/vault_backend_dynamodb.j2 index 62caf45d..3a67c0c1 100644 --- a/templates/vault_backend_dynamodb.j2 +++ b/templates/vault_backend_dynamodb.j2 @@ -30,4 +30,3 @@ backend "dynamodb" { session_token = "{{ vault_dynamodb_session_token }}" {% endif %} } - diff --git a/templates/vault_backend_etcd.j2 b/templates/vault_backend_etcd.j2 index 89e1e30b..3edfcf20 100644 --- a/templates/vault_backend_etcd.j2 +++ b/templates/vault_backend_etcd.j2 @@ -20,4 +20,3 @@ backend "etcd" { tls_key_file = "{{ vault_backend_tls_private_path }}/{{ vault_backend_tls_key_file }}" {% endif -%} } - diff --git a/templates/vault_seal_gcpkms.j2 b/templates/vault_seal_gcpkms.j2 index c8a6ee3c..e6189a08 100644 --- a/templates/vault_seal_gcpkms.j2 +++ b/templates/vault_seal_gcpkms.j2 @@ -6,4 +6,4 @@ seal "gcpckms" { region = "{{ vault_gkms_region }}" key_ring = "{{ vault_gkms_key_ring }}" crypto_key = "{{ vault_gkms_crypto_key }}" -} \ No newline at end of file +} diff --git a/vault_releases.md b/vault_releases.md index cf642289..6af215b7 100644 --- a/vault_releases.md +++ b/vault_releases.md @@ -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. \ No newline at end of file +Notice that, different to the Debian package, the trailing `-1` is not required.