{"id":18762480,"url":"https://github.com/ericcames/aap.secrets-scripts","last_synced_at":"2026-05-01T02:34:24.667Z","repository":{"id":240262747,"uuid":"802143213","full_name":"ericcames/aap.secrets-scripts","owner":"ericcames","description":"In here you will learn how to safely pass secrets from Ansible Automation Platform to a script.","archived":false,"fork":false,"pushed_at":"2024-05-31T16:54:08.000Z","size":488,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-01T02:34:20.208Z","etag":null,"topics":["ansible","ansible-code-bot-scan","ansible-playbook"],"latest_commit_sha":null,"homepage":"https://github.com/ericcames/aap.secrets-scripts","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericcames.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-17T15:46:44.000Z","updated_at":"2024-08-15T01:34:31.000Z","dependencies_parsed_at":"2024-05-17T16:56:38.395Z","dependency_job_id":"89a69e61-382a-4336-b4ac-87644066429e","html_url":"https://github.com/ericcames/aap.secrets-scripts","commit_stats":null,"previous_names":["ericcames/aap.secrets-scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericcames/aap.secrets-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcames%2Faap.secrets-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcames%2Faap.secrets-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcames%2Faap.secrets-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcames%2Faap.secrets-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericcames","download_url":"https://codeload.github.com/ericcames/aap.secrets-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericcames%2Faap.secrets-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32483406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-code-bot-scan","ansible-playbook"],"created_at":"2024-11-07T18:21:27.277Z","updated_at":"2026-05-01T02:34:24.380Z","avatar_url":"https://github.com/ericcames.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible Automation Platform (AAP) secrets to scripts.\n=========\n\nThis repository will show you how pass secrets to a script in a safe and secure way.\n\nSecrets to localhost (AKA the execution environment)\n=========\n\nThis method creates an environment variable on the execution environment that is used by the python script.\n\nAAP Credential Type configurations\n------------\nInput configuration\n```yaml\nfields:\n  - id: DYNATRACE_API_KEY\n    type: string\n    label: Dynatrace API Token\n    secret: true\n  - id: freshservice_api_key\n    type: string\n    label: Fresh Service API Token\n    secret: true\nrequired:\n  - DYNATRACE_API_KEY\n```\nInjector configuration\n```yaml\nenv:\n  DYNATRACE_API_KEY: '{{ DYNATRACE_API_KEY }}'\n  freshservice_api_key: '{{ freshservice_api_key }}'\n```\n[Custom Credential playbook]( https://github.com/ericcames/aap.secrets-scripts/blob/main/playbooks/python_secrets_localhost.yml \"Custom Credential playbook\")\n\n![alt text](https://github.com/ericcames/aap.secrets-scripts/blob/main/images/customcredentialtype.png \"Credential Type\")\n![alt text](https://github.com/ericcames/aap.secrets-scripts/blob/main/images/customcredential.png \"Credential\")\n![alt text](https://github.com/ericcames/aap.secrets-scripts/blob/main/images/template_credential.png \"Template\")\n\nSecrets to a remotehost method 1\n=========\n\nPass secrets from a vaulted file using\n[vars_files playbook]( https://github.com/ericcames/aap.secrets-scripts/blob/main/playbooks/python_secrets_remotehost_method_1.yml \"var_files playbook\"). For this method to work you will need to create a vault credential in your AAP and relate it to your job template.\n\n![alt text](https://github.com/ericcames/aap.secrets-scripts/blob/main/images/templatewithavault.png \"Template with a vaulted credential\")\n\nExample vault contents\n------------\n```yaml\ndynatrace_api_key: 123456_secrets_are_here\n```\n\nSecrets to a remotehost method 2\n=========\n\nPass secret from an inbeded vault file using\n[vars playbook]( https://github.com/ericcames/aap.secrets-scripts/blob/main/playbooks/python_secrets_remotehost_method_2.yml \"vars playbook\"). For this method to work you will need to create a vault credential in your AAP and relate it to your job template.\n\n![alt text](https://github.com/ericcames/aap.secrets-scripts/blob/main/images/templatewithavault.png \"Template with a vaulted credential\")\n\nExample vault contents\n------------\n```yaml\n123456_secrets_are_here\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericcames%2Faap.secrets-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericcames%2Faap.secrets-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericcames%2Faap.secrets-scripts/lists"}