We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--output-type yaml
.yml
.yaml
The automatic --output-type is only set to yaml if the file extension is .yaml. This results in .yml files getting JSON formatting.
--output-type
yaml
sops_encrypt module
sops_encrypt
ansible [core 2.15.3] config file = /redacted/ansible.cfg configured module search path = ['/home/redacted/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /redacted/.venv/lib/python3.11/site-packages/ansible ansible collection location = /home/redacted/.ansible/collections:/usr/share/ansible/collections executable location = /redacted/.venv/bin/ansible python version = 3.11.4 (main, Jun 6 2023, 22:16:46) [GCC 12.3.0] (/redacted/.venv/bin/python) jinja version = 3.1.2 libyaml = True
Collection Version -------------- ------- community.sops 1.6.4
CONFIG_FILE() = /redacted/ansible.cfg DEFAULT_FORKS(/redacted/ansible.cfg) = 200 DEFAULT_GATHERING(/redacted/ansible.cfg) = smart DEFAULT_JINJA2_EXTENSIONS(/redacted/ansible.cfg) = jinja2.ext.do,jinja2.ext.i18n DEFAULT_MANAGED_STR(/redacted/ansible.cfg) = "This file is Managed by Ansible - Please do not edit by hand changes will be overwritten!" DEFAULT_ROLES_PATH(/redacted/ansible.cfg) = ['/redacted/roles.galaxy', '/redacted/roles'] DEFAULT_TIMEOUT(/redacted/ansible.cfg) = 30 DEFAULT_VAULT_IDENTITY_LIST(env: ANSIBLE_VAULT_IDENTITY_LIST) = ['/redacted/scripts/ansible-vault-keyring-client.py'] EDITOR(env: EDITOR) = nvim HOST_KEY_CHECKING(/redacted/ansible.cfg) = False INTERPRETER_PYTHON(/redacted/ansible.cfg) = /usr/bin/env python3 PAGER(env: PAGER) = less --raw-control-chars --quit-if-one-screen VARIABLE_PLUGINS_ENABLED(/redacted/ansible.cfg) = ['host_group_vars', 'community.sops.sops']
Linux 6.1.56 x86_64
Run the following playbook:
- hosts: localhost gather_facts: false tasks: - name: Create key vault file community.sops.sops_encrypt: path: "foo.yml" content_yaml: foo: bar
Content of foo.yml:
foo.yml
foo: ENC[AES256_GCM,data:rElC,iv:vBbFgYuKvnCrEjX2plYUvtcYmFtBpl3UBKa8xJfEv/c=,tag:oijrsyuNsykJ8J8KFVXMlQ==,type:str] sops: kms: [] gcp_kms: [] azure_kv: [] hc_vault: [] ...snip
{ "foo": "ENC[AES256_GCM,data:g0fG,iv:Bi+6De1oeqJEUnDN0zNa9me5Q0S07iOcN30eP9Z95YE=,tag:myrbR+PDl23dX0vmbP5+5A==,type:str]", "sops": { "kms": null, "gcp_kms": null, "azure_kv": null, ...snip
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
SUMMARY
The automatic
--output-type
is only set toyaml
if the file extension is.yaml
. This results in.yml
files getting JSON formatting.ISSUE TYPE
COMPONENT NAME
sops_encrypt
moduleANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Linux 6.1.56
x86_64
STEPS TO REPRODUCE
Run the following playbook:
EXPECTED RESULTS
Content of
foo.yml
:ACTUAL RESULTS
Content of
foo.yml
:The text was updated successfully, but these errors were encountered: