-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes #44 sanity tests failing in cyberarkpas (#49) * Add sanity & integration tests * Add master branch (legacy) * Resolved all failing sanity tests * Bump version to 1.0.17 * Add tests for Ansible 2.9 & ansible-base 2.10 * Resolve @felixfontein review comments * no_log: False for Secrets Management parent * Resolve @felixfontein review - rm needs units * rm integration tests (for now) * Add cyberark.aimprovider role to collection (#52)
- Loading branch information
1 parent
f7fe671
commit cd5b39c
Showing
12 changed files
with
507 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# README FIRST | ||
# 1. If you don't have unit tests, remove that section. | ||
# 2. If your collection depends on other collections ensure they are installed, | ||
# add them to the "test-deps" input. | ||
# 3. For the comprehensive list of the inputs supported by the | ||
# ansible-community/ansible-test-gh-action GitHub Action, see | ||
# https://github.com/marketplace/actions/ansible-test. | ||
# 4. If you want to prevent merging PRs that do not pass all tests, | ||
# make sure to add the "check" job to your repository branch | ||
# protection once this workflow is added. | ||
# It is also possible to tweak which jobs are allowed to fail. See | ||
# https://github.com/marketplace/actions/alls-green#gotchas for more detail. | ||
# 5. If you need help please ask in #ansible-community on the Libera.chat IRC | ||
# network. | ||
|
||
name: CI | ||
on: | ||
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- stable-* | ||
pull_request: | ||
# Run CI once per day (at 06:00 UTC) | ||
# This ensures that even if there haven't been commits that we are still | ||
# testing against latest version of ansible-test for each ansible-core | ||
# version | ||
schedule: | ||
- cron: '0 6 * * *' | ||
|
||
concurrency: | ||
group: >- | ||
${{ github.workflow }}-${{ | ||
github.event.pull_request.number || github.sha | ||
}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
### | ||
# Sanity tests (REQUIRED) | ||
# | ||
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html | ||
|
||
sanity: | ||
name: Sanity (Ⓐ${{ matrix.ansible }}) | ||
strategy: | ||
matrix: | ||
ansible: | ||
# It's important that Sanity is tested against all stable-X.Y branches | ||
# Testing against `devel` may fail as new tests are added. | ||
# An alternative to `devel` is the `milestone` branch with | ||
# gets synchronized with `devel` every few weeks and therefore | ||
# tends to be a more stable target. Be aware that it is not updated | ||
# around creation of a new stable branch, this might cause a problem | ||
# that two different versions of ansible-test use the same sanity test | ||
# ignore.txt file. | ||
- stable-2.9 # Only if your collection supports Ansible 2.9 | ||
- stable-2.10 # Only if your collection supports ansible-base 2.10 | ||
- stable-2.11 | ||
- stable-2.12 | ||
- stable-2.13 | ||
- stable-2.14 | ||
- devel | ||
# - milestone | ||
# Ansible-test on various stable branches does not yet work well with cgroups v2. | ||
# Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 | ||
# image for these stable branches. The list of branches where this is necessary will | ||
# shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 | ||
# for the latest list. | ||
runs-on: >- | ||
${{ contains(fromJson( | ||
'["stable-2.9", "stable-2.10", "stable-2.11"]' | ||
), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} | ||
steps: | ||
# Run sanity tests inside a Docker container. | ||
# The docker container has all the pinned dependencies that are | ||
# required and all Python versions Ansible supports. | ||
- name: Perform sanity testing | ||
uses: ansible-community/ansible-test-gh-action@release/v1 | ||
with: | ||
ansible-core-version: ${{ matrix.ansible }} | ||
testing-type: sanity | ||
# OPTIONAL If your sanity tests require code | ||
# from other collections, install them like this | ||
# test-deps: >- | ||
# ansible.netcommon | ||
# ansible.utils | ||
|
||
check: # This job does nothing and is only used for the branch protection | ||
# or multi-stage CI jobs, like making sure that all tests pass before | ||
# a publishing job is started. | ||
if: always() | ||
|
||
needs: | ||
- sanity | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
cyberark.pas.aimprovider | ||
==================== | ||
|
||
Role to install/uninstall CyberArk's AIM Credential Provider. | ||
|
||
Requirements | ||
------------ | ||
|
||
- CyberArk Privileged Account Security Web Services SDK. | ||
- `cyberark.pas` Collection from Ansible Galaxy or Automation Hub | ||
|
||
Role Variables | ||
-------------- | ||
``` | ||
# CyberArk's Privileged Account Security Web Services SDK api base URL (example: https://components.cyberark.local) | ||
rest_api_url: "" | ||
# Whether to validate certificates for REST api calls. If false, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. | ||
validate_certs: true | ||
# Zip file with distribution of AIM Provider (example: /tmp/binaries/RHELinux x64-Rls-v9.8.zip); this file is located in the Ansible server, and it will be copied to the Ansible nodes. It should point to the current version of AIM distribution to be used when delivering to the nodes in a central folder within the Ansible server. | ||
zip_file_name: "" | ||
# Folder name within the ZIP file that will be used. By default, it's taken from zip file name, for example: "RHELinux x64" | ||
folder_name: '{{zip_file_name.split("/")[-1].split("-Rls")[0]}}' | ||
# CyberArk location for App Provider user to be created | ||
app_provider_user_location: "\\Applications" | ||
# CyberArk Vault Address | ||
vault_address: "" | ||
# Whether to use shared logon authentication. If true, it will use the "Shared Logon Authentication" as described in the CyberArk's document "Privileged Account Security Web Services SDK Implementation Guide" | ||
use_shared_logon_authentication: false | ||
# State - can be "present"/"absent" for install/uninstall. | ||
state: "present" | ||
``` | ||
|
||
|
||
Additionally: | ||
- **app_provider_user_group**: The name of the group the Provider user will be added to. | ||
|
||
Dependencies | ||
------------ | ||
|
||
None. | ||
|
||
|
||
Example Playbook | ||
---------------- | ||
|
||
1) Install CyberArk AIM Provider. | ||
|
||
``` | ||
--- | ||
- hosts: all | ||
roles: | ||
- role: cyberark.pas.aimprovider | ||
api_base_url: "https://components.cyberark.local" | ||
validate_certs: false | ||
zip_file_name: "/tmp/binaries/RHELinux x64-Rls-v9.8.zip" | ||
vault_address: "10.0.1.10" | ||
use_shared_logon_authentication: true | ||
``` | ||
|
||
2) Uninstall CyberArk AIM Provider. | ||
``` | ||
--- | ||
- hosts: all | ||
roles: | ||
- role: cyberark.pas.aimprovider | ||
api_base_url: "https://components.cyberark.local" | ||
use_shared_logon_authentication: true | ||
state: "absent" | ||
validate_certs: false | ||
``` | ||
|
||
License | ||
------- | ||
|
||
MIT | ||
|
||
Author Information | ||
------------------ | ||
|
||
- Edward Nunez ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.