summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cyberark
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:22:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 06:22:15 +0000
commit0202b47f95a87598276869ab7f07f57e8a4c8a87 (patch)
tree21f101dcceb98166b117c40dab3d79d5b2ad8eed /ansible_collections/cyberark
parentAdding upstream version 10.0.1+dfsg. (diff)
downloadansible-0202b47f95a87598276869ab7f07f57e8a4c8a87.tar.xz
ansible-0202b47f95a87598276869ab7f07f57e8a4c8a87.zip
Adding upstream version 10.1.0+dfsg.upstream/10.1.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/cyberark')
-rw-r--r--ansible_collections/cyberark/conjur/.github/workflows/ansible-test.yml2
-rw-r--r--ansible_collections/cyberark/conjur/.gitignore1
-rw-r--r--ansible_collections/cyberark/conjur/CHANGELOG.md6
-rw-r--r--ansible_collections/cyberark/conjur/CONTRIBUTING.md28
-rw-r--r--ansible_collections/cyberark/conjur/FILES.json595
-rw-r--r--ansible_collections/cyberark/conjur/MANIFEST.json4
-rw-r--r--ansible_collections/cyberark/conjur/plugins/lookup/conjur_variable.py164
-rw-r--r--ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/cleanup-conjur-identity2
-rw-r--r--ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/configure-conjur-identity2
-rwxr-xr-xansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test.sh4
-rw-r--r--ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml2
-rw-r--r--ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/playbook.yml4
-rw-r--r--ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/playbook.yml2
-rw-r--r--ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity/playbook.yml2
-rw-r--r--ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert2
-rw-r--r--ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret2
-rwxr-xr-xansible_collections/cyberark/conjur/tests/conjur_variable/test.sh3
-rw-r--r--ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt6
-rw-r--r--ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt6
-rw-r--r--ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt6
-rw-r--r--ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt8
-rw-r--r--ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt8
-rw-r--r--ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt8
-rw-r--r--ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt4
-rw-r--r--ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/__init__.py0
-rw-r--r--ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py79
34 files changed, 533 insertions, 433 deletions
diff --git a/ansible_collections/cyberark/conjur/.github/workflows/ansible-test.yml b/ansible_collections/cyberark/conjur/.github/workflows/ansible-test.yml
index aa74f4dea..091efc318 100644
--- a/ansible_collections/cyberark/conjur/.github/workflows/ansible-test.yml
+++ b/ansible_collections/cyberark/conjur/.github/workflows/ansible-test.yml
@@ -74,7 +74,7 @@ jobs:
# The docker container has all the pinned dependencies that are required.
# Explicitly specify the version of Python we want to test
- name: Run sanity tests
- run: ansible-test sanity --docker -v --color --python ${{ matrix.python }}
+ run: ansible-test sanity --docker -v --color --python ${{ matrix.python }} --exclude dev/ --exclude ci/ --exclude secrets.yml
working-directory: ./ansible_collections/cyberark/conjur
###
diff --git a/ansible_collections/cyberark/conjur/.gitignore b/ansible_collections/cyberark/conjur/.gitignore
index c7b557863..abf17ead9 100644
--- a/ansible_collections/cyberark/conjur/.gitignore
+++ b/ansible_collections/cyberark/conjur/.gitignore
@@ -21,6 +21,7 @@ reports
*.js
*.html
output/
+importer_result.json
# Pycache directories and files
**/__pycache__/
diff --git a/ansible_collections/cyberark/conjur/CHANGELOG.md b/ansible_collections/cyberark/conjur/CHANGELOG.md
index 887e2a89b..048c56f3f 100644
--- a/ansible_collections/cyberark/conjur/CHANGELOG.md
+++ b/ansible_collections/cyberark/conjur/CHANGELOG.md
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
+## [1.3.0] - 2024-05-23
+
+### Added
+- Lookup plugin supports configuration by Ansible variables
+ [cyberark/ansible-conjur-collection#203](https://github.com/cyberark/ansible-conjur-collection/pull/203)
+
## [1.2.2] - 2023-09-28
### Changed
diff --git a/ansible_collections/cyberark/conjur/CONTRIBUTING.md b/ansible_collections/cyberark/conjur/CONTRIBUTING.md
index 82319a287..7f232a2cd 100644
--- a/ansible_collections/cyberark/conjur/CONTRIBUTING.md
+++ b/ansible_collections/cyberark/conjur/CONTRIBUTING.md
@@ -38,7 +38,7 @@ Before getting started, the following tools need to be installed:
## Set up a development environment
-The `dev` directory contains a `docker-compose` file which creates a development
+The `dev` directory contains a `docker-compose.yml` file which creates a development
environment :
- A Conjur Open Source instance
- An Ansible control node
@@ -142,7 +142,7 @@ Generate the master key, which will be used to encrypt Conjur's database. Store
this value as an environment variable.
```sh-session
-docker-compose run --no-deps --rm conjur data-key generate > data_key
+docker compose run --no-deps --rm conjur data-key generate > data_key
export CONJUR_DATA_KEY="$(< data_key)"
```
@@ -150,20 +150,20 @@ Start the Conjur OSS environment. An account, named `cucumber`, will be
automatically created.
```sh-session
-docker-compose up -d conjur
+docker compose up -d conjur
```
Retrieve the admin user's API key, and store the value in an environment variable.
```sh-session
-export CLI_CONJUR_AUTHN_API_KEY="$(docker-compose exec conjur conjurctl role retrieve-key cucumber:user:admin)"
+export CLI_CONJUR_AUTHN_API_KEY="$(docker compose exec conjur conjurctl role retrieve-key cucumber:user:admin)"
```
Start the Conjur CLI container. The CLI will be automatically authenticated as
the user `cucumber:user:admin`.
```sh-session
-docker-compose up -d conjur_cli
+docker compose up -d conjur_cli
```
## Load policy to set up Conjur Ansible integration
@@ -174,15 +174,15 @@ be a policy, a host, a user, a layer, a group, or a variable.
Check out the policy file, and load it into Conjur:
```sh-session
-docker-compose exec conjur_cli cat /policy/root.yml
-docker-compose exec conjur_cli conjur policy load root /policy/root.yml
+docker compose exec conjur_cli cat /policy/root.yml
+docker compose exec conjur_cli conjur policy load root /policy/root.yml
```
Also, load a dummy secret value into the `ansible/target-password` variable.
This is a variable required by remote nodes in order to complete their workloads.
```sh-session
-docker-compose exec conjur_cli conjur variable values add ansible/target-password S3cretV@lue
+docker compose exec conjur_cli conjur variable values add ansible/target-password S3cretV@lue
```
## Create Ansible managed nodes
@@ -192,15 +192,15 @@ nodes. First, retrieve the API key for the Conjur host representing the control
node, then create it:
```sh-session
-export ANSIBLE_CONJUR_AUTHN_API_KEY="$(docker-compose exec conjur conjurctl role retrieve-key cucumber:host:ansible/ansible-master)"
-docker-compose up -d ansible
+export ANSIBLE_CONJUR_AUTHN_API_KEY="$(docker compose exec conjur conjurctl role retrieve-key cucumber:host:ansible/ansible-master)"
+docker compose up -d ansible
```
Next, create two instances of each managed node:
```sh-session
-docker-compose up -d --scale test_app_ubuntu=2 test_app_ubuntu
-docker-compose up -d --scale test_app_centos=2 test_app_centos
+docker compose up -d --scale test_app_ubuntu=2 test_app_ubuntu
+docker compose up -d --scale test_app_centos=2 test_app_centos
```
## Use Conjur Ansible Role to set up identity on managed nodes
@@ -209,13 +209,13 @@ To grant your Ansible host a Conjur identity, first install the Conjur
Collection on your Ansible control node:
```sh-session
-docker-compose exec ansible ansible-galaxy collection install cyberark.conjur
+docker compose exec ansible ansible-galaxy collection install cyberark.conjur
```
Set up the host factory token in the HFTOKEN env var
```sh-session
-export HFTOKEN="$(docker-compose exec conjur_cli conjur hostfactory tokens create ansible/ansible-factory | jq -r '.[0].token')"
+export HFTOKEN="$(docker compose exec conjur_cli conjur hostfactory tokens create ansible/ansible-factory | jq -r '.[0].token')"
```
Once you've done this, you can configure each Ansible node with a Conjur
diff --git a/ansible_collections/cyberark/conjur/FILES.json b/ansible_collections/cyberark/conjur/FILES.json
index 4ae72bb59..a0df958ea 100644
--- a/ansible_collections/cyberark/conjur/FILES.json
+++ b/ansible_collections/cyberark/conjur/FILES.json
@@ -8,38 +8,73 @@
"format": 1
},
{
- "name": "README.md",
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "91243325e5fdfc7e9f6a4b5bbbab1b91c433349af7df860af23d5e1932d8a341",
+ "chksum_sha256": "de1872da7735269d370a0ea862d4776d2910afc36ec88476f7d2785941027389",
"format": 1
},
{
- "name": ".github",
+ "name": "plugins",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": ".github/workflows",
+ "name": "plugins/lookup",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": ".github/workflows/ansible-test.yml",
+ "name": "plugins/lookup/conjur_variable.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "dee0253dc4b4a22ee8eb759ff1edb195e903f44911341e7f6389d0a3bb29f63f",
+ "chksum_sha256": "6af3ac635df7b6ab2aefe766a466ad774a8221ef18ad4e7707552eb1fcbac1bc",
"format": 1
},
{
- "name": ".github/CODEOWNERS",
+ "name": "LICENSE",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "f1dee7b6ae693cebe88547d034b17710489e515c3def06dad75252c8b19bfc51",
+ "chksum_sha256": "e092618211b1d864e3caf325abbd567f997e6ffb98d9fb97188d4fa280334bbe",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "91243325e5fdfc7e9f6a4b5bbbab1b91c433349af7df860af23d5e1932d8a341",
+ "format": 1
+ },
+ {
+ "name": "Jenkinsfile",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b064c627bfc189a0e5ba53ca39f939799a86a95848fd89f72629aaa15ab8f266",
+ "format": 1
+ },
+ {
+ "name": ".gitmodules",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6204ac468423a4b2a3796e91656026cb91670ce5ab56a95bc756f42418d3dc60",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8ffcd5f648c85b61d3b612fc3d5e838ea49b7e217869e7b1a1f527bf094a3eb4",
"format": 1
},
{
@@ -50,24 +85,31 @@
"format": 1
},
{
- "name": "plugins",
+ "name": ".github",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "plugins/lookup",
+ "name": ".github/workflows",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "plugins/lookup/conjur_variable.py",
+ "name": ".github/workflows/ansible-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a34673fa117a06bedb8444f0685cb9f726e1c9f34a770f6e92d20e57a1262e2e",
+ "format": 1
+ },
+ {
+ "name": ".github/CODEOWNERS",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "071df1f77b15701960faf7cee3ce8967143abedf76953f71550645068a57fcb2",
+ "chksum_sha256": "f1dee7b6ae693cebe88547d034b17710489e515c3def06dad75252c8b19bfc51",
"format": 1
},
{
@@ -85,24 +127,24 @@
"format": 1
},
{
- "name": "roles/conjur_host_identity/README.md",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "a712c1e5c56fb9a3917ebfd4a55109801da9e57dff304d1941aaf2cf2ab471ca",
- "format": 1
- },
- {
- "name": "roles/conjur_host_identity/defaults",
+ "name": "roles/conjur_host_identity/meta",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/defaults/main.yml",
+ "name": "roles/conjur_host_identity/meta/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c7f30d049a541e0fd98faeb5dcd8d83839e00db1f68ece8b14431630fb779e13",
+ "chksum_sha256": "0103f8e65603e7da7511224456dacf19c6a0e92c6e6f1fbf152f171d33741f80",
+ "format": 1
+ },
+ {
+ "name": "roles/conjur_host_identity/README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a712c1e5c56fb9a3917ebfd4a55109801da9e57dff304d1941aaf2cf2ab471ca",
"format": 1
},
{
@@ -113,38 +155,38 @@
"format": 1
},
{
- "name": "roles/conjur_host_identity/tasks/uninstall.yml",
+ "name": "roles/conjur_host_identity/tasks/summon-conjur.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d40f3bd7fdddbd8eddeb983e28ba959685e086d7382789b717e54a7f469d1f77",
+ "chksum_sha256": "b75ef3c1b8db527e7469e50d3b1f4f13ce09cc17ccec05ec598273f2afb79f34",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tasks/identity.yml",
+ "name": "roles/conjur_host_identity/tasks/summon.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e4a249b32c8b6d90b37e9787c6a22f6683820cf03af4f1038b8d73dbabf3fd1b",
+ "chksum_sha256": "40ad1a387e7f7a0a7c342614d9cdd5cd7ad4334634f4da733929e8e3b0a7ab4f",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tasks/install.yml",
+ "name": "roles/conjur_host_identity/tasks/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "723de78f2785f8cb7737c2e0e0801d674eba41636a7b1c5915dd41cec7083fed",
+ "chksum_sha256": "5f2195992211d603a73dead76e8e60e511ae0da2293a8a3167836d129ffe9bbf",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tasks/main.yml",
+ "name": "roles/conjur_host_identity/tasks/identity.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5f2195992211d603a73dead76e8e60e511ae0da2293a8a3167836d129ffe9bbf",
+ "chksum_sha256": "e4a249b32c8b6d90b37e9787c6a22f6683820cf03af4f1038b8d73dbabf3fd1b",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tasks/summon.yml",
+ "name": "roles/conjur_host_identity/tasks/uninstall.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "40ad1a387e7f7a0a7c342614d9cdd5cd7ad4334634f4da733929e8e3b0a7ab4f",
+ "chksum_sha256": "d40f3bd7fdddbd8eddeb983e28ba959685e086d7382789b717e54a7f469d1f77",
"format": 1
},
{
@@ -155,10 +197,10 @@
"format": 1
},
{
- "name": "roles/conjur_host_identity/tasks/summon-conjur.yml",
+ "name": "roles/conjur_host_identity/tasks/install.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b75ef3c1b8db527e7469e50d3b1f4f13ce09cc17ccec05ec598273f2afb79f34",
+ "chksum_sha256": "723de78f2785f8cb7737c2e0e0801d674eba41636a7b1c5915dd41cec7083fed",
"format": 1
},
{
@@ -183,17 +225,17 @@
"format": 1
},
{
- "name": "roles/conjur_host_identity/meta",
+ "name": "roles/conjur_host_identity/defaults",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/meta/main.yml",
+ "name": "roles/conjur_host_identity/defaults/main.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0103f8e65603e7da7511224456dacf19c6a0e92c6e6f1fbf152f171d33741f80",
+ "chksum_sha256": "c7f30d049a541e0fd98faeb5dcd8d83839e00db1f68ece8b14431630fb779e13",
"format": 1
},
{
@@ -204,27 +246,6 @@
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/junit",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
- "format": 1
- },
- {
- "name": "roles/conjur_host_identity/tests/junit/configure-conjur-identity",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "43eeedf90a26a10532a10c174115a19abc03be3cb49b55b233b0041a0588f1d1",
- "format": 1
- },
- {
- "name": "roles/conjur_host_identity/tests/junit/cleanup-conjur-identity",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "9a5067e650b6e98e39eda4bc661a1199a64b45206713e7fb52dfdb9751a418d7",
- "format": 1
- },
- {
"name": "roles/conjur_host_identity/tests/test_cases",
"ftype": "dir",
"chksum_type": null,
@@ -232,136 +253,136 @@
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity",
+ "name": "roles/conjur_host_identity/tests/test_cases/not-conjurized",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/playbook.yml",
+ "name": "roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "18dec0d8ca7c324adae8bcf96843531e568799a23237b93be089989a46baf0a2",
+ "chksum_sha256": "741c4dcf1a42dfb96f2485d3b2a2230fbec440fcad165c063b555bac3ccdabc6",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/tests",
+ "name": "roles/conjur_host_identity/tests/test_cases/bad-ssl-config",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/tests/test_default.py",
+ "name": "roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2f668ca0bbd274a6b5f6b3894ee901a9240d68015153d78b4fd79308152de3a2",
+ "chksum_sha256": "63ef031c2940fba555a7bdfa5304ddee32917d6ad77cab0cf00666d89a3ec9bb",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity",
+ "name": "roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/playbook.yml",
+ "name": "roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7d1c3f284f2be73ce5f3f533fb67b0e26f5809704e11f74965d1a2de1e5bb608",
+ "chksum_sha256": "60531ded85de255ac154c919bd9a093c81bf021d17127d9c8c52b5f257b3b086",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/tests",
+ "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/tests/test_default.py",
+ "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "2390200888250358407b3ae321abb9fb0d4dbef50cf330438b00f3e207f938b4",
+ "chksum_sha256": "885a58b434a59e6321bab832ff84e6d6320545d3799fa32b7af39a414af3cdf5",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/not-conjurized",
+ "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml",
+ "name": "roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "1eaabc866dada7379694872a1aa3e1ccff58ba60c589c58c0db0173b1d8f9d68",
+ "chksum_sha256": "2f668ca0bbd274a6b5f6b3894ee901a9240d68015153d78b4fd79308152de3a2",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity",
+ "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity/playbook.yml",
+ "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b7b3002d1d9927f3aa012e8abba3164c3c822d0e6830ab9b463341e839bb82b6",
+ "chksum_sha256": "57b7637ac64e48f434942aaa9843573b0b83eedec3a990135f682eb0c9b4fc08",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/bad-ssl-config",
+ "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml",
+ "name": "roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7d215e320462650efd9a1fa88f8fa769620377c9d8b1b0b1df0275ccf64bc241",
+ "chksum_sha256": "2390200888250358407b3ae321abb9fb0d4dbef50cf330438b00f3e207f938b4",
"format": 1
},
{
"name": "roles/conjur_host_identity/tests/test.sh",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "ca5f445a253831f7d22c2bb208e42307253086115644ca0edf11ae7c950f7861",
+ "chksum_sha256": "4470918bf5bbb2cc8a29d33a667ec086741f9da48db477dbb219fc67d6d669ea",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/.pytest_cache",
+ "name": "roles/conjur_host_identity/tests/junit",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/.pytest_cache/README.md",
+ "name": "roles/conjur_host_identity/tests/junit/configure-conjur-identity",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "73fd6fccdd802c419a6b2d983d6c3173b7da97558ac4b589edec2dfe443db9ad",
+ "chksum_sha256": "d9ce4ce1faeb20918127918421a1b20b9fd2a6d24283ed26fd6708d978f718dd",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/.pytest_cache/.gitignore",
+ "name": "roles/conjur_host_identity/tests/junit/cleanup-conjur-identity",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "3ed731b65d06150c138e2dadb0be0697550888a6b47eb8c45ecc9adba8b8e9bd",
+ "chksum_sha256": "25033a22dba4a120c623e43344ffd6c8185f0cbf8151680b42ca830745ea3b83",
"format": 1
},
{
- "name": "roles/conjur_host_identity/tests/.pytest_cache/CACHEDIR.TAG",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "37dc88ef9a0abeddbe81053a6dd8fdfb13afb613045ea1eb4a5c815a74a3bde4",
+ "name": "roles/conjur_host_identity/tests/.pytest_cache",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
@@ -393,73 +414,38 @@
"format": 1
},
{
- "name": "CONTRIBUTING.md",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "51665e44857e861e04b64120a17ea6f6960a1ca496d9ef6e2fec24bc01f585b6",
- "format": 1
- },
- {
- "name": ".gitignore",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "b87b7493010ee0eaff5a1e8b2b20a403e03e0a9970b282d28c70cc34679df409",
- "format": 1
- },
- {
- "name": "SECURITY.md",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "1e913fcef04d2f2652839b896dd875dd3268b67d4669105e0e4b1a0249ef843a",
- "format": 1
- },
- {
- "name": "requirements.txt",
+ "name": "roles/conjur_host_identity/tests/.pytest_cache/README.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0a2f8c8f38472c11f47c93fe7ac69bb6e08b2d09dcc5a2b9fdd7054366822a21",
- "format": 1
- },
- {
- "name": "examples",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "chksum_sha256": "73fd6fccdd802c419a6b2d983d6c3173b7da97558ac4b589edec2dfe443db9ad",
"format": 1
},
{
- "name": "examples/test.yml",
+ "name": "roles/conjur_host_identity/tests/.pytest_cache/CACHEDIR.TAG",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "94fcc880e144e39d06fb0fd4957ca4aac77578627b509a110f4ec5b2ffc7f9ff",
+ "chksum_sha256": "37dc88ef9a0abeddbe81053a6dd8fdfb13afb613045ea1eb4a5c815a74a3bde4",
"format": 1
},
{
- "name": "Jenkinsfile",
+ "name": "roles/conjur_host_identity/tests/.pytest_cache/.gitignore",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "b064c627bfc189a0e5ba53ca39f939799a86a95848fd89f72629aaa15ab8f266",
+ "chksum_sha256": "3ed731b65d06150c138e2dadb0be0697550888a6b47eb8c45ecc9adba8b8e9bd",
"format": 1
},
{
- "name": ".gitmodules",
+ "name": "SECURITY.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6204ac468423a4b2a3796e91656026cb91670ce5ab56a95bc756f42418d3dc60",
- "format": 1
- },
- {
- "name": "meta",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "chksum_sha256": "1e913fcef04d2f2652839b896dd875dd3268b67d4669105e0e4b1a0249ef843a",
"format": 1
},
{
- "name": "meta/runtime.yml",
+ "name": "CONTRIBUTING.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "de1872da7735269d370a0ea862d4776d2910afc36ec88476f7d2785941027389",
+ "chksum_sha256": "fbb106317526ffc7993cdea0a385432ec8ae1db6ea090cd8262fc821af9fe7a1",
"format": 1
},
{
@@ -494,14 +480,7 @@
"name": "tests/unit/plugins/lookup/test_conjur_variable.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "61fd56fd948d13be3d30094d2b6ccd2828585a2f851ea64448a8f59dfc5682fe",
- "format": 1
- },
- {
- "name": "tests/unit/plugins/lookup/__init__.py",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "chksum_sha256": "fd97e205015ff8784b511ce645e3961117c48fe893391b7549fdb0dd0635c1b9",
"format": 1
},
{
@@ -519,178 +498,157 @@
"format": 1
},
{
- "name": "tests/sanity",
+ "name": "tests/conjur_variable",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/sanity/ignore-2.10.txt",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "f045d340441215a5303e2854a50b88c7656ee4e603331cb50f42f99d0b8161bf",
- "format": 1
- },
- {
- "name": "tests/sanity/ignore-2.15.txt",
+ "name": "tests/conjur_variable/pytest.ini",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5fb43913e33d45cc72021c443619154459a731ee3213afdc81f0af6e0caa157b",
+ "chksum_sha256": "4b8dce177a1820e68b4a821d858669035b849f9c5fbc4cfd6d4718325a7e69c8",
"format": 1
},
{
- "name": "tests/sanity/ignore-2.12.txt",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "91fd6123db0c8a19145dd93733f8dfb3ea537ef9ddbc0f0568c2a8121ea023f3",
+ "name": "tests/conjur_variable/test_cases",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
- "name": "tests/sanity/ignore-2.9.txt",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "3193867f74b8b551868226d231cd572d45f541838294893a32ef46193cdc031f",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
- "name": "tests/sanity/ignore-2.13.txt",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/env",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5fb43913e33d45cc72021c443619154459a731ee3213afdc81f0af6e0caa157b",
+ "chksum_sha256": "e1d90dec2be9f840d4f27dcfd2bf1c67be44c5d801ee57ea45c94ff6895ddf62",
"format": 1
},
{
- "name": "tests/sanity/ignore-2.14.txt",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/bad-cert.pem",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5fb43913e33d45cc72021c443619154459a731ee3213afdc81f0af6e0caa157b",
+ "chksum_sha256": "7529afc89345f5dde282fb51014d158769d3fb22ddf20744d093eb8fa820b8d3",
"format": 1
},
{
- "name": "tests/sanity/ignore-2.11.txt",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "c81b4555220e56eb03ee55d1d12c2f38a6c4b27b0e6b798d29e71d19ac205c2c",
- "format": 1
- },
- {
- "name": "tests/conjur_variable",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "chksum_sha256": "bb4764e18fcc10f83c16d10cbc4b7eac8c0abd2668f1b158649fc1a0d47df2c8",
"format": 1
},
{
- "name": "tests/conjur_variable/junit",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable-with-spaces-secret",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "739441ec5ebe746549090a0c2c622c477bc7c675c8e227ff35c69a3d2e96158d",
- "format": 1
- },
- {
- "name": "tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e39962d8d46d3ce0e86e15e5853168d8e825cadc62341dd199709dacd7e7b08c",
+ "chksum_sha256": "5f2cb44532e32a0e4c55aa765c53cf52728d8c1c512e0eb606a5460cfc06532b",
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable-bad-cert-path",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "c5cbf82d39043d5cd79c45b6c83b69c12f7949777e3e1b2b6356ee184c6c5c46",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable-no-cert-provided",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0c692b3d4d648d53411adb491a16b9fef7242338f14e3e0c4b3605e0c659d2d4",
+ "chksum_sha256": "d94bc0b090fc07e738c0bfc05b3b6747850b8f06e5e290771d200efeb3044e35",
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "aeccf0044a93b226d471017be1d7a8a906661565e6f32abb6f9fb3f9443b3a9c",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable-into-file",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "311ba1466f21f2377778c95d8eea977faaed8df674cdf5fd6fd52fbd12a99dde",
+ "chksum_sha256": "e6b50f356ee08724cd4535c1831566274c2b913fe9b24d85deb2c695a3c422a9",
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable-with-authn-token",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "30c648fa1e7599e0e098ed8afb4c1dffff299f7c697febc381941b5769640374",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable-bad-certs",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/env",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "315ac99b99c9ca992510859ce660641275f859caf504c2ee41d82d39198197aa",
+ "chksum_sha256": "0f79221a2dba5e7c47cf03aed09ac314d3a0185b73d98735c499d3bfabc01c26",
"format": 1
},
{
- "name": "tests/conjur_variable/junit/retrieve-variable-disable-verify-certs",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d3b1c3e40859a1321db5f0928383f6b8b2fc1f1656176cb2ceb27f712829ef3c",
+ "chksum_sha256": "a57510d743d358c0405b3de73cbae3e5945c492fb8ca64be0d3777f1e4de811e",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests/test_default.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6b50f356ee08724cd4535c1831566274c2b913fe9b24d85deb2c695a3c422a9",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/env",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "bf54c0c9c02929e148e92803bfe2e2daa791960688f6c2f8f4330241bec77068",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/playbook.yml",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e1a6f8f4cded9369fbf9c6bc55f725cd0aa8da7ff1fba59e91b338511ed20736",
+ "chksum_sha256": "bb4764e18fcc10f83c16d10cbc4b7eac8c0abd2668f1b158649fc1a0d47df2c8",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "8ed19681bbd132fe9faf61bafa8f1039de0e315ae62c78ba48ede77027d1bfd2",
+ "chksum_sha256": "5f2cb44532e32a0e4c55aa765c53cf52728d8c1c512e0eb606a5460cfc06532b",
"format": 1
},
{
@@ -736,101 +694,108 @@
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/env",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/env",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "9f5febf65f45e537c0666df07ea12f0568f1ee5afa7bc9eef5a36370e6b5dfa4",
+ "chksum_sha256": "bf54c0c9c02929e148e92803bfe2e2daa791960688f6c2f8f4330241bec77068",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/playbook.yml",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "bb4764e18fcc10f83c16d10cbc4b7eac8c0abd2668f1b158649fc1a0d47df2c8",
+ "chksum_sha256": "e1a6f8f4cded9369fbf9c6bc55f725cd0aa8da7ff1fba59e91b338511ed20736",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests/test_default.py",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-with-spaces-secret/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5f2cb44532e32a0e4c55aa765c53cf52728d8c1c512e0eb606a5460cfc06532b",
+ "chksum_sha256": "8ed19681bbd132fe9faf61bafa8f1039de0e315ae62c78ba48ede77027d1bfd2",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/playbook.yml",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable/env",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "bb4764e18fcc10f83c16d10cbc4b7eac8c0abd2668f1b158649fc1a0d47df2c8",
+ "chksum_sha256": "bf54c0c9c02929e148e92803bfe2e2daa791960688f6c2f8f4330241bec77068",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable/playbook.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6bce626301d8259174bfa57b2bc7ff543b267f2f93be4a1a77df69b8cf515801",
+ "format": 1
+ },
+ {
+ "name": "tests/conjur_variable/test_cases/retrieve-variable/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-no-cert-provided/tests/test_default.py",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5f2cb44532e32a0e4c55aa765c53cf52728d8c1c512e0eb606a5460cfc06532b",
+ "chksum_sha256": "dee229d35c099b379b2e11d1c502ca0158eb506c9065358b969213ccdb489693",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable/env",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/env",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "bf54c0c9c02929e148e92803bfe2e2daa791960688f6c2f8f4330241bec77068",
+ "chksum_sha256": "9f5febf65f45e537c0666df07ea12f0568f1ee5afa7bc9eef5a36370e6b5dfa4",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable/playbook.yml",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/playbook.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "6bce626301d8259174bfa57b2bc7ff543b267f2f93be4a1a77df69b8cf515801",
+ "chksum_sha256": "bb4764e18fcc10f83c16d10cbc4b7eac8c0abd2668f1b158649fc1a0d47df2c8",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable/tests",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable/tests/test_default.py",
+ "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-cert-path/tests/test_default.py",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "dee229d35c099b379b2e11d1c502ca0158eb506c9065358b969213ccdb489693",
+ "chksum_sha256": "5f2cb44532e32a0e4c55aa765c53cf52728d8c1c512e0eb606a5460cfc06532b",
"format": 1
},
{
@@ -869,192 +834,220 @@
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token",
+ "name": "tests/conjur_variable/test.sh",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d461af6848ab63aefea2ef7c5465ff2c6bc72578920c7a2e12c1465325b2381",
+ "format": 1
+ },
+ {
+ "name": "tests/conjur_variable/junit",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/env",
+ "name": "tests/conjur_variable/junit/retrieve-variable-bad-certs",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "0f79221a2dba5e7c47cf03aed09ac314d3a0185b73d98735c499d3bfabc01c26",
+ "chksum_sha256": "0ef55c7934d417649a1313aae4b0b7eabb404f3cf64ff6ff2e6c37cbd39d4d05",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/playbook.yml",
+ "name": "tests/conjur_variable/junit/retrieve-variable-disable-verify-certs",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a57510d743d358c0405b3de73cbae3e5945c492fb8ca64be0d3777f1e4de811e",
+ "chksum_sha256": "77156f57f44418b716a535a663b0b155cb6975720cc256e2fac3fbb598b2db82",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "name": "tests/conjur_variable/junit/retrieve-variable-with-authn-token",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "550be09b44f712be5a7eb5f2cc825caca21cac4ed18dd81b2dbbf2443ce496fc",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-with-authn-token/tests/test_default.py",
+ "name": "tests/conjur_variable/junit/retrieve-variable-no-cert-provided",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e6b50f356ee08724cd4535c1831566274c2b913fe9b24d85deb2c695a3c422a9",
+ "chksum_sha256": "78603c751dec995c32becb12177ff1bf9c6789f739f7001c9f69b5a004c44b0b",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "name": "tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "334595eecd27a5e40344583b59d2c8c1e5010f870dcf37ff03b4b4e342e5cc51",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/env",
+ "name": "tests/conjur_variable/junit/retrieve-variable-with-spaces-secret",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e1d90dec2be9f840d4f27dcfd2bf1c67be44c5d801ee57ea45c94ff6895ddf62",
+ "chksum_sha256": "51ed0f376d250f01bff8b43b5e302685b3b06059aa909692bb841a6f9a226bc4",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/bad-cert.pem",
+ "name": "tests/conjur_variable/junit/retrieve-variable",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7529afc89345f5dde282fb51014d158769d3fb22ddf20744d093eb8fa820b8d3",
+ "chksum_sha256": "079a81b156f581d0f2370377b2c8a8e515518da0f217fd3acc2f2f931e91fdaf",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/playbook.yml",
+ "name": "tests/conjur_variable/junit/retrieve-variable-bad-cert-path",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "bb4764e18fcc10f83c16d10cbc4b7eac8c0abd2668f1b158649fc1a0d47df2c8",
+ "chksum_sha256": "f497365b2e3f719a6210a71a277e6969bf0634398153d057d308828697a5cf02",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests",
+ "name": "tests/conjur_variable/junit/retrieve-variable-into-file",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f919784a4b1ce86f8dc683a4d1405fb2651752517f163d8325d69015f7c31951",
+ "format": 1
+ },
+ {
+ "name": "tests/conjur_variable/.pytest_cache",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-bad-certs/tests/test_default.py",
- "ftype": "file",
- "chksum_type": "sha256",
- "chksum_sha256": "5f2cb44532e32a0e4c55aa765c53cf52728d8c1c512e0eb606a5460cfc06532b",
+ "name": "tests/conjur_variable/.pytest_cache/v",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs",
+ "name": "tests/conjur_variable/.pytest_cache/v/cache",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/playbook.yml",
+ "name": "tests/conjur_variable/.pytest_cache/v/cache/nodeids",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d94bc0b090fc07e738c0bfc05b3b6747850b8f06e5e290771d200efeb3044e35",
+ "chksum_sha256": "d6a49f2d4432db81b4a2d792008159f6cff2deffb9a47c45718eff2b23bc075e",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "name": "tests/conjur_variable/.pytest_cache/v/cache/stepwise",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
"format": 1
},
{
- "name": "tests/conjur_variable/test_cases/retrieve-variable-disable-verify-certs/tests/test_default.py",
+ "name": "tests/conjur_variable/.pytest_cache/README.md",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e6b50f356ee08724cd4535c1831566274c2b913fe9b24d85deb2c695a3c422a9",
+ "chksum_sha256": "73fd6fccdd802c419a6b2d983d6c3173b7da97558ac4b589edec2dfe443db9ad",
"format": 1
},
{
- "name": "tests/conjur_variable/pytest.ini",
+ "name": "tests/conjur_variable/.pytest_cache/CACHEDIR.TAG",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "4b8dce177a1820e68b4a821d858669035b849f9c5fbc4cfd6d4718325a7e69c8",
+ "chksum_sha256": "37dc88ef9a0abeddbe81053a6dd8fdfb13afb613045ea1eb4a5c815a74a3bde4",
"format": 1
},
{
- "name": "tests/conjur_variable/test.sh",
+ "name": "tests/conjur_variable/.pytest_cache/.gitignore",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "a0e338fdee47ad4ca994120b6e97ee50c556391b2ca8f8a7cb0af14bb5fae2cc",
+ "chksum_sha256": "3ed731b65d06150c138e2dadb0be0697550888a6b47eb8c45ecc9adba8b8e9bd",
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache",
+ "name": "tests/sanity",
"ftype": "dir",
"chksum_type": null,
"chksum_sha256": null,
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache/README.md",
+ "name": "tests/sanity/ignore-2.11.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "73fd6fccdd802c419a6b2d983d6c3173b7da97558ac4b589edec2dfe443db9ad",
+ "chksum_sha256": "f79319d5da69edbabc9e008b849cc9fac2a60e75eea8c974f82e33aff3b6ec90",
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache/.gitignore",
+ "name": "tests/sanity/ignore-2.13.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "3ed731b65d06150c138e2dadb0be0697550888a6b47eb8c45ecc9adba8b8e9bd",
+ "chksum_sha256": "b8e334841d92f6524a674975c27baf4559d939485530318bb057ce77af6ee7d2",
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache/CACHEDIR.TAG",
+ "name": "tests/sanity/ignore-2.9.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "37dc88ef9a0abeddbe81053a6dd8fdfb13afb613045ea1eb4a5c815a74a3bde4",
+ "chksum_sha256": "1deb934aa3193bb20d8fd05c0ae18d90b7cf354e81535cf70732eacae73033f6",
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache/v",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f79319d5da69edbabc9e008b849cc9fac2a60e75eea8c974f82e33aff3b6ec90",
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache/v/cache",
- "ftype": "dir",
- "chksum_type": null,
- "chksum_sha256": null,
+ "name": "tests/sanity/ignore-2.12.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a23220bdf7d5aee641cc7e9a2549c5c631b02d41e97079430265cbe5255a875a",
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache/v/cache/nodeids",
+ "name": "tests/sanity/ignore-2.15.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "d6a49f2d4432db81b4a2d792008159f6cff2deffb9a47c45718eff2b23bc075e",
+ "chksum_sha256": "b8e334841d92f6524a674975c27baf4559d939485530318bb057ce77af6ee7d2",
"format": 1
},
{
- "name": "tests/conjur_variable/.pytest_cache/v/cache/stepwise",
+ "name": "tests/sanity/ignore-2.14.txt",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
+ "chksum_sha256": "b8e334841d92f6524a674975c27baf4559d939485530318bb057ce77af6ee7d2",
"format": 1
},
{
- "name": "LICENSE",
+ "name": ".gitignore",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "e092618211b1d864e3caf325abbd567f997e6ffb98d9fb97188d4fa280334bbe",
+ "chksum_sha256": "4e04ac42de48a1b26574f63c37c1bdcd6ec3a0497fc82906cb015f5f4225bc6b",
"format": 1
},
{
- "name": "CHANGELOG.md",
+ "name": "examples",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "examples/test.yml",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "7194fe5e661a279cedfd17870f63d1e6c6682b3c5cfc785780cc8e54bbf3f735",
+ "chksum_sha256": "94fcc880e144e39d06fb0fd4957ca4aac77578627b509a110f4ec5b2ffc7f9ff",
+ "format": 1
+ },
+ {
+ "name": "requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0a2f8c8f38472c11f47c93fe7ac69bb6e08b2d09dcc5a2b9fdd7054366822a21",
"format": 1
}
],
diff --git a/ansible_collections/cyberark/conjur/MANIFEST.json b/ansible_collections/cyberark/conjur/MANIFEST.json
index 94249cfd4..82ee35c8b 100644
--- a/ansible_collections/cyberark/conjur/MANIFEST.json
+++ b/ansible_collections/cyberark/conjur/MANIFEST.json
@@ -2,7 +2,7 @@
"collection_info": {
"namespace": "cyberark",
"name": "conjur",
- "version": "1.2.2",
+ "version": "1.3.0",
"authors": [
"CyberArk Business Development (@cyberark-bizdev)",
"(@cyberark/community-and-integrations-team)"
@@ -36,7 +36,7 @@
"name": "FILES.json",
"ftype": "file",
"chksum_type": "sha256",
- "chksum_sha256": "5eef7fc8156f49fae3c3f275f146563380090cf88f9d722f421d15917eb8a0bb",
+ "chksum_sha256": "f68cdfd855c5490531761c6f094397f42929d7884d7340214dce8350cfb1eecd",
"format": 1
},
"format": 1
diff --git a/ansible_collections/cyberark/conjur/plugins/lookup/conjur_variable.py b/ansible_collections/cyberark/conjur/plugins/lookup/conjur_variable.py
index db3d209e4..fd3bf5c28 100644
--- a/ansible_collections/cyberark/conjur/plugins/lookup/conjur_variable.py
+++ b/ansible_collections/cyberark/conjur/plugins/lookup/conjur_variable.py
@@ -15,9 +15,10 @@ DOCUMENTATION = """
author:
- CyberArk BizDev (@cyberark-bizdev)
description:
- Retrieves credentials from Conjur using the controlling host's Conjur identity
- or environment variables.
+ Retrieves credentials from Conjur using the controlling host's Conjur identity,
+ environment variables, or extra-vars.
Environment variables could be CONJUR_ACCOUNT, CONJUR_APPLIANCE_URL, CONJUR_CERT_FILE, CONJUR_AUTHN_LOGIN, CONJUR_AUTHN_API_KEY, CONJUR_AUTHN_TOKEN_FILE
+ Extra-vars could be conjur_account, conjur_appliance_url, conjur_cert_file, conjur_authn_login, conjur_authn_api_key, conjur_authn_token_file
Conjur info - U(https://www.conjur.org/).
requirements:
- 'The controlling host running Ansible has a Conjur identity.
@@ -46,16 +47,6 @@ DOCUMENTATION = """
key: identity_file_path
env:
- name: CONJUR_IDENTITY_FILE
- authn_token_file:
- description: Path to the access token file.
- type: path
- default: /var/run/conjur/access-token
- required: False
- ini:
- - section: conjur,
- key: authn_token_file
- env:
- - name: CONJUR_AUTHN_TOKEN_FILE
config_file:
description: Path to the Conjur configuration file. The configuration file is a YAML file.
type: path
@@ -66,6 +57,72 @@ DOCUMENTATION = """
key: config_file_path
env:
- name: CONJUR_CONFIG_FILE
+ conjur_appliance_url:
+ description: Conjur appliance url
+ type: string
+ required: False
+ ini:
+ - section: conjur,
+ key: appliance_url
+ vars:
+ - name: conjur_appliance_url
+ env:
+ - name: CONJUR_APPLIANCE_URL
+ conjur_authn_login:
+ description: Conjur authn login
+ type: string
+ required: False
+ ini:
+ - section: conjur,
+ key: authn_login
+ vars:
+ - name: conjur_authn_login
+ env:
+ - name: CONJUR_AUTHN_LOGIN
+ conjur_account:
+ description: Conjur account
+ type: string
+ required: False
+ ini:
+ - section: conjur,
+ key: account
+ vars:
+ - name: conjur_account
+ env:
+ - name: CONJUR_ACCOUNT
+ conjur_authn_api_key:
+ description: Conjur authn api key
+ type: string
+ required: False
+ ini:
+ - section: conjur,
+ key: authn_api_key
+ vars:
+ - name: conjur_authn_api_key
+ env:
+ - name: CONJUR_AUTHN_API_KEY
+ conjur_cert_file:
+ description: Path to the Conjur cert file
+ type: path
+ required: False
+ ini:
+ - section: conjur,
+ key: cert_file
+ vars:
+ - name: conjur_cert_file
+ env:
+ - name: CONJUR_CERT_FILE
+ conjur_authn_token_file:
+ description: Path to the access token file
+ type: path
+ required: False
+ ini:
+ - section: conjur,
+ key: authn_token_file
+ vars:
+ - name: conjur_authn_token_file
+ env:
+ - name: CONJUR_AUTHN_TOKEN_FILE
"""
EXAMPLES = """
@@ -87,14 +144,13 @@ RETURN = """
import os.path
import socket
+import ansible.module_utils.six.moves.urllib.error as urllib_error
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from base64 import b64encode
from netrc import netrc
-from os import environ
from time import sleep
from ansible.module_utils.six.moves.urllib.parse import quote
-from ansible.module_utils.urls import urllib_error
from stat import S_IRUSR, S_IWUSR
from tempfile import gettempdir, NamedTemporaryFile
import yaml
@@ -272,7 +328,25 @@ class LookupModule(LookupBase):
elif not terms[0] or terms[0].isspace():
raise AnsibleError("Invalid secret path: empty secret path not accepted.")
- self.set_options(direct=kwargs)
+ # We should register the variables as LookupModule options.
+ #
+ # Doing this has some nice advantages if we're considering supporting
+ # a set of Ansible variables that could sometimes replace environment
+ # variables.
+ #
+ # Registering the variables as options forces them to adhere to the
+ # behavior described in the DOCUMENTATION variable. An option can have
+ # both a Ansible variable and environment variable source, which means
+ # Ansible will do some juggling on our behalf.
+ self.set_options(var_options=variables, direct=kwargs)
+
+ appliance_url = self.get_var_value("conjur_appliance_url")
+ account = self.get_var_value("conjur_account")
+ authn_login = self.get_var_value("conjur_authn_login")
+ authn_api_key = self.get_var_value("conjur_authn_api_key")
+ cert_file = self.get_var_value("conjur_cert_file")
+ authn_token_file = self.get_var_value("conjur_authn_token_file")
+
validate_certs = self.get_option('validate_certs')
conf_file = self.get_option('config_file')
as_file = self.get_option('as_file')
@@ -280,53 +354,59 @@ class LookupModule(LookupBase):
if validate_certs is False:
display.warning('Certificate validation has been disabled. Please enable with validate_certs option.')
- if 'http://' in str(environ.get("CONJUR_APPLIANCE_URL")):
+ if 'http://' in str(appliance_url):
raise AnsibleError(('[WARNING]: Conjur URL uses insecure connection. Please consider using HTTPS.'))
conf = _merge_dictionaries(
_load_conf_from_file(conf_file),
{
- "account": environ.get('CONJUR_ACCOUNT'),
- "appliance_url": environ.get("CONJUR_APPLIANCE_URL")
+ "account": account,
+ "appliance_url": appliance_url
} if (
- environ.get('CONJUR_ACCOUNT') is not None
- and environ.get('CONJUR_APPLIANCE_URL') is not None
+ account is not None
+ and appliance_url is not None
)
else {},
{
- "cert_file": environ.get('CONJUR_CERT_FILE')
- } if (environ.get('CONJUR_CERT_FILE') is not None)
+ "cert_file": cert_file
+ } if (cert_file is not None)
else {},
{
- "authn_token_file": environ.get('CONJUR_AUTHN_TOKEN_FILE')
- } if (environ.get('CONJUR_AUTHN_TOKEN_FILE') is not None)
+ "authn_token_file": authn_token_file
+ } if authn_token_file is not None
else {}
)
+ if 'account' not in conf or 'appliance_url' not in conf:
+ raise AnsibleError(
+ """Configuration must define options `conjur_account` and `conjur_appliance_url`.
+ This config can be set by any of the following methods, listed in order of priority:
+ - Ansible variables of the same name, set either in the parent playbook or passed to
+ the ansible-playbook command with the --extra-vars flag
+ - Environment variables `CONJUR_ACCOUNT` and `CONJUR_APPLIANCE_URL`
+ - A configuration file on the controlling host with fields `account` and `appliance_url`"""
+ )
+
if 'authn_token_file' not in conf:
identity_file = self.get_option('identity_file')
identity = _merge_dictionaries(
_load_identity_from_file(identity_file, conf['appliance_url']),
{
- "id": environ.get('CONJUR_AUTHN_LOGIN'),
- "api_key": environ.get('CONJUR_AUTHN_API_KEY')
- } if (environ.get('CONJUR_AUTHN_LOGIN') is not None
- and environ.get('CONJUR_AUTHN_API_KEY') is not None)
+ "id": authn_login,
+ "api_key": authn_api_key
+ } if authn_login is not None
+ and authn_api_key is not None
else {}
)
- if 'account' not in conf or 'appliance_url' not in conf:
- raise AnsibleError(
- ("Configuration file on the controlling host must "
- "define `account` and `appliance_url`"
- "entries or they should be environment variables")
- )
-
if 'id' not in identity or 'api_key' not in identity:
raise AnsibleError(
- ("Identity file on the controlling host must contain "
- "`login` and `password` entries for Conjur appliance"
- " URL or they should be environment variables")
+ """Configuration must define options `conjur_authn_login` and `conjur_authn_api_key`.
+ This config can be set by any of the following methods, listed in order of priority:
+ - Ansible variables of the same name, set either in the parent playbook or passed to
+ the ansible-playbook command with the --extra-vars flag
+ - Environment variables `CONJUR_AUTHN_LOGIN` and `CONJUR_AUTHN_API_KEY`
+ - An identity file on the controlling host with the fields `login` and `password`"""
)
cert_file = None
@@ -364,3 +444,11 @@ class LookupModule(LookupBase):
return _store_secret_in_file(conjur_variable)
return conjur_variable
+
+ def get_var_value(self, key):
+ try:
+ variable_value = self.get_option(key)
+ except KeyError:
+ raise AnsibleError("{0} was not defined in configuration".format(key))
+
+ return variable_value
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/cleanup-conjur-identity b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/cleanup-conjur-identity
index d5cf77577..5f69dd9a4 100644
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/cleanup-conjur-identity
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/cleanup-conjur-identity
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="8" time="3.385" timestamp="2023-09-28T17:31:14.495645" hostname="3bd1d1ebca35"><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-1]" time="0.554" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_centos-1]" time="0.182" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-2]" time="0.524" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_centos-2]" time="0.169" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-1]" time="0.517" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_ubuntu-1]" time="0.182" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-2]" time="0.551" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_ubuntu-2]" time="0.178" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="8" time="3.233" timestamp="2024-05-24T10:41:52.994874" hostname="c471efefee8a"><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-1]" time="0.541" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_centos-1]" time="0.155" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-2]" time="0.512" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_centos-2]" time="0.173" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-1]" time="0.499" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_ubuntu-1]" time="0.166" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-2]" time="0.521" /><testcase classname="test_cases.cleanup-conjur-identity.tests.test_default" name="test_is_not_conjurized[docker://dev-test_app_ubuntu-2]" time="0.160" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/configure-conjur-identity b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/configure-conjur-identity
index aec86fd9d..05c489723 100644
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/configure-conjur-identity
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/junit/configure-conjur-identity
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="12" time="4.685" timestamp="2023-09-28T17:32:48.189759" hostname="3bd1d1ebca35"><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-1]" time="0.551" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_centos-1]" time="0.356" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_centos-1]" time="0.130" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-2]" time="0.524" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_centos-2]" time="0.363" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_centos-2]" time="0.134" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-1]" time="0.530" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_ubuntu-1]" time="0.413" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_ubuntu-1]" time="0.122" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-2]" time="0.536" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_ubuntu-2]" time="0.358" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_ubuntu-2]" time="0.139" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="12" time="4.388" timestamp="2024-05-24T10:43:04.792928" hostname="c471efefee8a"><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-1]" time="0.499" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_centos-1]" time="0.342" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_centos-1]" time="0.120" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_centos-2]" time="0.532" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_centos-2]" time="0.351" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_centos-2]" time="0.119" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-1]" time="0.495" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_ubuntu-1]" time="0.350" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_ubuntu-1]" time="0.119" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_hosts_file[docker://dev-test_app_ubuntu-2]" time="0.530" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_is_conjurized[docker://dev-test_app_ubuntu-2]" time="0.305" /><testcase classname="test_cases.configure-conjur-identity.tests.test_default" name="test_retrieve_secret_with_summon[docker://dev-test_app_ubuntu-2]" time="0.121" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test.sh b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test.sh
index 1f7e28145..61d3e7f67 100755
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test.sh
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test.sh
@@ -20,7 +20,7 @@ function run_test_case {
docker exec -e HFTOKEN="$(hf_token)" \
"$(ansible_cid)" bash -ec "
- cd /cyberark/tests/conjur-host-identity
+ cd /cyberark/tests/conjur_host_identity
# You can add -vvvvv here for debugging
ansible-playbook test_cases/$test_case/playbook.yml
@@ -28,7 +28,7 @@ function run_test_case {
if [ -d "test_cases/${test_case}/tests/" ]; then
docker exec "$(ansible_cid)" bash -ec "
- cd /cyberark/tests/conjur-host-identity
+ cd /cyberark/tests/conjur_host_identity
py.test --junitxml=./junit/${test_case} --connection docker -v test_cases/${test_case}/tests/test_default.py
"
fi
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml
index 2d1282c41..570a47f6b 100644
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/bad-ssl-config/playbook.yml
@@ -5,7 +5,7 @@
- name: Attempt to configure Conjur identity
block:
- import_role:
- name: "cyberark.conjur.conjur-host-identity"
+ name: "cyberark.conjur.conjur_host_identity"
vars:
conjur_account: cucumber
conjur_appliance_url: "https://conjur-proxy-nginx"
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/playbook.yml b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/playbook.yml
index ec472992d..718e2717c 100644
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/playbook.yml
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/cleanup-conjur-identity/playbook.yml
@@ -2,7 +2,7 @@
- name: Configuring Conjur identity on remote hosts
hosts: testapp
roles:
- - role: "cyberark.conjur.conjur-host-identity"
+ - role: "cyberark.conjur.conjur_host_identity"
conjur_account: "{{lookup('env', 'CONJUR_ACCOUNT')}}"
conjur_appliance_url: "{{lookup('env', 'CONJUR_APPLIANCE_URL')}}"
conjur_host_factory_token: "{{lookup('env', 'HFTOKEN')}}"
@@ -13,5 +13,5 @@
- name: Revoke Conjur identity from remote hosts
hosts: testapp
roles:
- - role: "cyberark.conjur.conjur-host-identity"
+ - role: "cyberark.conjur.conjur_host_identity"
state: absent
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/playbook.yml b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/playbook.yml
index 7309d21b6..44fa6e2e4 100644
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/playbook.yml
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/configure-conjur-identity/playbook.yml
@@ -2,7 +2,7 @@
- name: Configuring Conjur identity on remote hosts
hosts: testapp
roles:
- - role: "cyberark.conjur.conjur-host-identity"
+ - role: "cyberark.conjur.conjur_host_identity"
conjur_account: "{{lookup('env', 'CONJUR_ACCOUNT')}}"
conjur_appliance_url: "{{lookup('env', 'CONJUR_APPLIANCE_URL')}}"
conjur_host_factory_token: "{{lookup('env', 'HFTOKEN')}}"
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity/playbook.yml b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity/playbook.yml
index 96f31c7d0..d09af37c1 100644
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity/playbook.yml
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/misconfig-conjur-identity/playbook.yml
@@ -5,7 +5,7 @@
- name: Attempt to configure Conjur identity
block:
- import_role:
- name: "cyberark.conjur.conjur-host-identity"
+ name: "cyberark.conjur.conjur_host_identity"
vars:
conjur_account: cucumber
# conjur_appliance_url: "https://conjur-proxy-nginx"
diff --git a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml
index 9175cfbbb..658beee54 100644
--- a/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml
+++ b/ansible_collections/cyberark/conjur/roles/conjur_host_identity/tests/test_cases/not-conjurized/playbook.yml
@@ -13,7 +13,7 @@
- name: Attempt to configure Conjur identity
block:
- import_role:
- name: "cyberark.conjur.conjur-host-identity"
+ name: "cyberark.conjur.conjur_host_identity"
vars:
conjur_account: "{{lookup('env', 'CONJUR_ACCOUNT')}}"
conjur_appliance_url: "{{lookup('env', 'CONJUR_APPLIANCE_URL')}}"
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable
index bc362ea43..78767685b 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.476" timestamp="2023-09-28T17:28:54.180417" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.450" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.480" timestamp="2024-05-24T10:40:05.446831" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.450" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path
index 7d7b7b4a7..26ee4675a 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-cert-path
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.381" timestamp="2023-09-28T17:28:57.025234" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-bad-cert-path.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.357" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.381" timestamp="2024-05-24T10:40:08.220541" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-bad-cert-path.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.351" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs
index 684fdb89d..09efed3d7 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-bad-certs
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.372" timestamp="2023-09-28T17:28:59.744035" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-bad-certs.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.348" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.408" timestamp="2024-05-24T10:40:10.871829" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-bad-certs.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.376" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs
index 7cd98843b..2466fcc8a 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-disable-verify-certs
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.484" timestamp="2023-09-28T17:29:03.245129" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-disable-verify-certs.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.458" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.473" timestamp="2024-05-24T10:40:14.267839" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-disable-verify-certs.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.441" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file
index c9082babb..255bc72ab 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-into-file
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.721" timestamp="2023-09-28T17:29:06.557606" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-into-file.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.695" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.694" timestamp="2024-05-24T10:40:17.441882" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-into-file.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.666" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided
index 34fd1fa03..901d73d5f 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-no-cert-provided
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.373" timestamp="2023-09-28T17:29:09.688977" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-no-cert-provided.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.349" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.398" timestamp="2024-05-24T10:40:20.482341" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-no-cert-provided.tests.test_default" name="test_retrieval_failed[docker://dev-ansible-1]" time="0.369" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token
index c3f0e5978..155af8480 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.585" timestamp="2023-09-28T17:29:12.796986" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-with-authn-token.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.552" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.485" timestamp="2024-05-24T10:40:23.597487" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-with-authn-token.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.453" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert
index db2705ced..cfba55757 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-authn-token-bad-cert
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="1.129" timestamp="2023-09-28T17:29:16.832828" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-with-authn-token-bad-cert.tests.test_default" name="test_retrieve_secret_failed[docker://dev-ansible-1]" time="1.046" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.681" timestamp="2024-05-24T10:40:26.802196" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-with-authn-token-bad-cert.tests.test_default" name="test_retrieve_secret_failed[docker://dev-ansible-1]" time="0.633" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret
index 7747d9fd7..af4ac7fde 100644
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/junit/retrieve-variable-with-spaces-secret
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.746" timestamp="2023-09-28T17:29:22.880901" hostname="3bd1d1ebca35"><testcase classname="test_cases.retrieve-variable-with-spaces-secret.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.695" /></testsuite></testsuites> \ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="1" time="0.573" timestamp="2024-05-24T10:40:31.821871" hostname="c471efefee8a"><testcase classname="test_cases.retrieve-variable-with-spaces-secret.tests.test_default" name="test_retrieved_secret[docker://dev-ansible-1]" time="0.538" /></testsuite></testsuites> \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh b/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh
index c82810054..6983c7522 100755
--- a/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh
+++ b/ansible_collections/cyberark/conjur/tests/conjur_variable/test.sh
@@ -26,7 +26,8 @@ function run_test_case {
fi
# You can add -vvvvv here for debugging
- ansible-playbook 'test_cases/${test_case}/playbook.yml'
+ export SAMPLE_KEY='set_in_env'
+ ansible-playbook --extra-vars 'sample_key=set_in_extravars' 'test_cases/${test_case}/playbook.yml'
py.test --junitxml='./junit/${test_case}' \
--connection docker \
diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt
index a81ded000..adfba63eb 100644
--- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt
+++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.10.txt
@@ -1,9 +1,3 @@
-dev/start.sh shebang
Jenkinsfile shebang
tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml
roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by summon utility (in Jenkinsfile), not via Python
-ci/build_release shebang
-ci/publish_to_galaxy shebang
-ci/test.sh shebang
-secrets.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python
-dev/policy/root.yml yamllint:unparsable-with-libyaml \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt
index b643480a2..adfba63eb 100644
--- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt
+++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.11.txt
@@ -1,9 +1,3 @@
Jenkinsfile shebang
-dev/start.sh shebang
tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml
roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by summon utility (in Jenkinsfile), not via Python
-ci/build_release shebang
-ci/publish_to_galaxy shebang
-ci/test.sh shebang
-secrets.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python
-dev/policy/root.yml yamllint:unparsable-with-libyaml \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt
index 6615526dc..c5b63bd70 100644
--- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt
+++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.12.txt
@@ -1,9 +1,3 @@
Jenkinsfile shebang
-dev/start.sh shebang
tests/conjur_variable/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python
roles/conjur_host_identity/tests/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python
-ci/build_release shebang
-ci/publish_to_galaxy shebang
-ci/test.sh shebang
-secrets.yml yamllint:unparsable-with-libyaml # File loaded by Summon utility (in Jenkinsfile), not via Python
-dev/policy/root.yml yamllint:unparsable-with-libyaml \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt
index e456a5ff7..4144f5b48 100644
--- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt
+++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.13.txt
@@ -1,10 +1,2 @@
-ci/build_release shebang
-ci/publish_to_galaxy shebang
-ci/test.sh shebang
-dev/policy/root.yml yamllint:unparsable-with-libyaml
-dev/start.sh shebang
-dev/stop.sh shebang
-dev/util.sh shebang
Jenkinsfile shebang
plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor
-secrets.yml yamllint:unparsable-with-libyaml
diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt
index e456a5ff7..4144f5b48 100644
--- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt
+++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.14.txt
@@ -1,10 +1,2 @@
-ci/build_release shebang
-ci/publish_to_galaxy shebang
-ci/test.sh shebang
-dev/policy/root.yml yamllint:unparsable-with-libyaml
-dev/start.sh shebang
-dev/stop.sh shebang
-dev/util.sh shebang
Jenkinsfile shebang
plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor
-secrets.yml yamllint:unparsable-with-libyaml
diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt
index e456a5ff7..4144f5b48 100644
--- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt
+++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.15.txt
@@ -1,10 +1,2 @@
-ci/build_release shebang
-ci/publish_to_galaxy shebang
-ci/test.sh shebang
-dev/policy/root.yml yamllint:unparsable-with-libyaml
-dev/start.sh shebang
-dev/stop.sh shebang
-dev/util.sh shebang
Jenkinsfile shebang
plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor
-secrets.yml yamllint:unparsable-with-libyaml
diff --git a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt
index 1ee255c73..e3a0cf635 100644
--- a/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt
+++ b/ansible_collections/cyberark/conjur/tests/sanity/ignore-2.9.txt
@@ -1,7 +1,3 @@
Jenkinsfile shebang
-dev/start.sh shebang
tests/conjur_variable/test.sh shebang
roles/conjur_host_identity/tests/test.sh shebang
-ci/build_release shebang
-ci/publish_to_galaxy shebang
-ci/test.sh shebang \ No newline at end of file
diff --git a/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/__init__.py b/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/__init__.py
+++ /dev/null
diff --git a/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py b/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py
index 995adf2da..c78704e8b 100644
--- a/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py
+++ b/ansible_collections/cyberark/conjur/tests/unit/plugins/lookup/test_conjur_variable.py
@@ -84,6 +84,22 @@ class TestConjurLookup(TestCase):
@patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_variable')
@patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_token')
+ def test_run_with_ansible_vars(self, mock_fetch_conjur_token, mock_fetch_conjur_variable):
+ mock_fetch_conjur_token.return_value = "token"
+ mock_fetch_conjur_variable.return_value = ["conjur_variable"]
+
+ variables = {'conjur_account': 'fakeaccount',
+ 'conjur_appliance_url': 'https://conjur-fake',
+ 'conjur_cert_file': './conjurfake.pem',
+ 'conjur_authn_login': 'host/ansible/ansible-fake',
+ 'conjur_authn_api_key': 'fakekey'}
+ terms = ['ansible/fake-secret']
+
+ output = self.lookup.run(terms, variables)
+ self.assertEqual(output, ["conjur_variable"])
+
+ @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_variable')
+ @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_token')
@patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._merge_dictionaries')
def test_retrieve_to_file(self, mock_merge_dictionaries, mock_fetch_conjur_token, mock_fetch_conjur_variable):
mock_fetch_conjur_token.return_value = "token"
@@ -116,10 +132,11 @@ class TestConjurLookup(TestCase):
kwargs = {'as_file': False, 'conf_file': 'conf_file', 'validate_certs': True}
with self.assertRaises(AnsibleError) as context:
self.lookup.run(terms, **kwargs)
- self.assertEqual(
- context.exception.message,
- "Configuration file on the controlling host must define `account` and `appliance_url` entries or they should be environment variables"
- )
+
+ self.assertIn(
+ "Configuration must define options `conjur_account` and `conjur_appliance_url`",
+ context.exception.message,
+ )
# Withhold 'id' and 'api_key' fields
mock_merge_dictionaries.side_effect = [
@@ -129,11 +146,11 @@ class TestConjurLookup(TestCase):
with self.assertRaises(AnsibleError) as context:
self.lookup.run(terms, **kwargs)
- self.assertEqual(
- context.exception.message,
- ("Identity file on the controlling host must contain `login` and `password` "
- "entries for Conjur appliance URL or they should be environment variables")
- )
+
+ self.assertIn(
+ "Configuration must define options `conjur_authn_login` and `conjur_authn_api_key`",
+ context.exception.message,
+ )
@patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._merge_dictionaries')
def test_run_bad_cert_path(self, mock_merge_dictionaries):
@@ -152,8 +169,48 @@ class TestConjurLookup(TestCase):
with self.assertRaises(AnsibleError) as context:
self.lookup.run([], **kwargs)
- self.assertEqual(context.exception.message, "Invalid secret path: no secret path provided.")
+
+ self.assertEqual(context.exception.message, "Invalid secret path: no secret path provided.")
with self.assertRaises(AnsibleError) as context:
self.lookup.run([''], **kwargs)
- self.assertEqual(context.exception.message, "Invalid secret path: empty secret path not accepted.")
+
+ self.assertEqual(context.exception.message, "Invalid secret path: empty secret path not accepted.")
+
+ @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_variable')
+ @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_token')
+ def test_run_missing_account(self, mock_fetch_conjur_token, mock_fetch_conjur_variable):
+ mock_fetch_conjur_token.return_value = "token"
+ mock_fetch_conjur_variable.return_value = ["conjur_variable"]
+
+ variables = {'conjur_cert_file': './conjurfake.pem',
+ 'conjur_authn_login': 'host/ansible/ansible-fake',
+ 'conjur_authn_api_key': 'fakekey'}
+ terms = ['ansible/fake-secret']
+
+ with self.assertRaises(AnsibleError) as context:
+ self.lookup.run(terms, variables)
+
+ self.assertIn(
+ "Configuration must define options `conjur_account` and `conjur_appliance_url`",
+ context.exception.message
+ )
+
+ @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_variable')
+ @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_token')
+ def test_run_missing_login(self, mock_fetch_conjur_token, mock_fetch_conjur_variable):
+ mock_fetch_conjur_token.return_value = "token"
+ mock_fetch_conjur_variable.return_value = ["conjur_variable"]
+
+ variables = {'conjur_account': 'fakeaccount',
+ 'conjur_appliance_url': 'https://conjur-fake',
+ 'conjur_cert_file': './conjurfake.pem'}
+ terms = ['ansible/fake-secret']
+
+ with self.assertRaises(AnsibleError) as context:
+ self.lookup.run(terms, variables)
+
+ self.assertIn(
+ "Configuration must define options `conjur_authn_login` and `conjur_authn_api_key`",
+ context.exception.message
+ )