Skip to content
New issue

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

Remove delegate_to hardcoded value #44

Open
cdmadrigal opened this issue Feb 1, 2024 · 0 comments
Open

Remove delegate_to hardcoded value #44

cdmadrigal opened this issue Feb 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cdmadrigal
Copy link
Contributor

cdmadrigal commented Feb 1, 2024

PROBLEM SUMMARY
Today the delegate_to variable within the local_certificate.yml and remote_certificate.yml file are hardcoded to localhost. This can cause an issue if you're using a remote_user within ansible to execute the playbook.

This will throw a sudo: a password is required\n error.

STEPS TO REPRODUCE
Look to enroll a local certificate using a remote_user.

- hosts: test
  remote_user: srv_xxxx
  become: true
  gather_facts: no

EXPECTED RESULTS
Certificate is created successfully with the user defined within remote_user.

ACTUAL RESULTS

fatal: [rtest.dev.xxxx.com; -> localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "sudo: a password is required\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

ENVIRONMENT DETAILS

COMMENTS/WORKAROUNDS
Go within the local_certificate.yml and remove the delegate_to variables.

@cdmadrigal cdmadrigal added the bug Something isn't working label Feb 1, 2024
@cdmadrigal cdmadrigal changed the title Remove delagate_to hardcoded value Remove delegate_to hardcoded value Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant