Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): ignore examples dir in ansible lint #327

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ skip_list:
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern`
- 'fqcn-builtins' # For ansible 2.7 - 2.9 compatibility
- 'fqcn' # For ansible 2.7 - 2.9 compatibility
- jinja

exclude_paths:
- molecule/_tests/
- examples/
- tests/
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
default: help

.PHONY: help
help: ## list makefile targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: lint
lint: ## lint
ansible-lint -c .ansible-lint
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ vault_plugins_src_dir_local: "{{ role_path }}/files/plugins" # Directory for st
vault_plugins_src_dir_cleanup: false # Cleanup vault plugin src/zip dir after plugin install. WARNING: could cause plugins to be downloaded each time.

# vault acme plugin
vault_plugin_install: false
vault_plugin_acme_install: remote # remote / local
vault_plugin_acme_sidecar_install: false
vault_plugin_acme_version: "latest"
Expand Down
3 changes: 3 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
- name: Enable non root mlock capability
become: true
command: "setcap cap_ipc_lock=+ep {{ vault_bin_path }}/vault"
register: output
changed_when: output.rc != 0
when: vault_mlock_capability is failed

- name: Create directories
Expand Down Expand Up @@ -404,6 +406,7 @@
VAULT_CACERT: "{{ lookup('env', 'VAULT_CACERT') |
default(vault_tls_config_path ~ '/' ~ vault_tls_ca_file if not (vault_tls_disable) else '', true) }}"
VAULT_TOKEN: "{{ lookup('env', 'VAULT_TOKEN') | default(lookup('file', '~/.vault-token', errors='ignore'), true) }}"
when: vault_plugin_install | bool

- name: Vault status
debug:
Expand Down