Skip to content

Commit

Permalink
fix(ci): ignore examples dir in ansible lint (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
FalcoSuessgott authored Mar 10, 2023
1 parent a7a314c commit 0f9d34c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
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

0 comments on commit 0f9d34c

Please sign in to comment.