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

database secrets engine config #133

Merged
merged 23 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
enable tests
  • Loading branch information
drewmullen committed Jun 3, 2019
commit 851ea04c2f2dbb148696a7b2be57a8715a5f149f
1 change: 1 addition & 0 deletions functional/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export HOME

source ./vaultenv.sh
ansible-playbook -v test_enable_kv.yml
ansible-playbook -v test_mounts.yml
ansible-playbook -v test_write.yml
ansible-playbook -v test_check.yml --check
ansible-playbook -v test_read.yml
Expand Down
80 changes: 80 additions & 0 deletions functional/test_mounts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---

- hosts: localhost
gather_facts: no
tasks:
- hashivault_secret_engine:
name: kv
state: absent

- hashivault_secret_engine:
name: blergh
state: absent

- name: enable with config defaults
hashivault_secret_engine:
name: kv
state: present
register: success_config

- assert: { that: "{{ success_config.changed }} == True" }

- name: skip with config defaults
hashivault_secret_engine:
name: kv
state: present
register: skip_config

- assert: { that: "{{ skip_config.changed }} == False" }

- name: changed with config vars
hashivault_secret_engine:
name: kv
state: present
config: {'default_lease_ttl': 1234567}
register: chg_config

- assert: { that: "{{ chg_config.changed }} == True" }

- name: changed to version 2
hashivault_secret_engine:
name: kv
state: present
config: {'default_lease_ttl': 1234567}
options: {'version': '2'}
register: chg_version

- assert: { that: "{{ chg_version.changed }} == True" }

- name: dont fail when options passed to non kv
hashivault_secret_engine:
name: blergh
backend: gcp
state: present
config: {'default_lease_ttl': 1234567}
options: {'version': '2'}
register: dont_pass_options

- assert: { that: "{{ dont_pass_options.changed }} == True" }

- name: cleanup 1
hashivault_secret_engine:
name: blergh
backend: gcp
state: absent
config: {'default_lease_ttl': 1234567}
options: {'version': '2'}
register: disable

- assert: { that: "{{ disable.changed }} == True" }

- name: cleanup 2
hashivault_secret_engine:
name: kv
backend: kv
state: absent
config: {'default_lease_ttl': 1234567}
options: {'version': '2'}
register: disable2

- assert: { that: "{{ disable2.changed }} == True" }