-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49af898
commit f61c3f8
Showing
4 changed files
with
66 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
- name: Configuring Conjur identity on remote hosts fails when missing required SSL config | ||
hosts: testapp | ||
tasks: | ||
- name: Attempt to configure Conjur identity | ||
block: | ||
- import_role: | ||
name: "cyberark.conjur.conjur-host-identity" | ||
vars: | ||
conjur_account: cucumber | ||
conjur_appliance_url: "https://conjur-proxy-nginx" | ||
conjur_host_factory_token: "{{lookup('env', 'HFTOKEN')}}" | ||
conjur_host_name: "conjur_{{ ansible_hostname }}" | ||
# conjur_ssl_certificate: "{{lookup('file', '/cyberark/dev/conjur.pem')}}" | ||
conjur_validate_certs: yes | ||
rescue: | ||
- name: Confirm Role setup fails with message | ||
assert: | ||
that: ansible_failed_result.failed == true | ||
fail_msg: "Variable 'conjur_ssl_certificate' is not set!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
- name: Un-Conjurize remote hosts | ||
hosts: testapp | ||
tasks: | ||
- name: Remove identity file | ||
file: | ||
path: /etc/conjur.identity | ||
state: absent | ||
|
||
- name: Configuring Conjur identity on not-Conjurized hosts requires HF token | ||
hosts: testapp | ||
tasks: | ||
- name: Attempt to configure Conjur identity | ||
block: | ||
- import_role: | ||
name: "cyberark.conjur.conjur-host-identity" | ||
vars: | ||
conjur_account: "{{lookup('env', 'CONJUR_ACCOUNT')}}" | ||
conjur_appliance_url: "{{lookup('env', 'CONJUR_APPLIANCE_URL')}}" | ||
# conjur_host_factory_token: "{{lookup('env', 'HFTOKEN')}}" | ||
conjur_host_name: "conjur_{{ ansible_hostname }}" | ||
conjur_ssl_certificate: "{{lookup('file', '/cyberark/dev/conjur.pem')}}" | ||
conjur_validate_certs: yes | ||
rescue: | ||
- name: Conjur Role setup fails with message | ||
assert: | ||
that: ansible_failed_result.failed == true | ||
fail_msg: "Variable 'conjur_host_factory_token' is not set!" |