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

Ansible run_user ignored when distro install method is used #4092

Open
ubuntu-server-builder opened this issue May 12, 2023 · 2 comments
Open
Labels
bug Something isn't working correctly good first issue launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #2013467

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2023-03-31T08:30:22.607403+00:00
date_fix_committed = None
date_fix_released = None
id = 2013467
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/2013467
milestone = None
owner = ondrej-c
owner_name = Ondřej Caletka
private = False
status = triaged
submitter = ondrej-c
submitter_name = Ondřej Caletka
tags = ['bitesize']
duplicates = []

Launchpad user Ondřej Caletka(ondrej-c) wrote on 2023-03-31T08:30:22.607403+00:00

When Ansible module is used with install_method: distro, the value of attribute run_user: is ignored and the whole Ansible playbook runs as root.

The problem lies somewhere around class AnsiblePullDistro which does not set self.run_user unlike class AnsiblePullPip

@ubuntu-server-builder ubuntu-server-builder added bug Something isn't working correctly good first issue launchpad Migrated from Launchpad labels May 12, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Alberto Contreras(aciba) wrote on 2023-04-04T12:34:45.688883+00:00

Thanks for reporting this.

It looks like the reason to not set self.run_user in the distro case is to be able to install Ansible as root (as a distro package), but the user should be set after the package is installed.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Chad Smith(chad.smith) wrote on 2023-04-05T21:34:25.685689+00:00

Thank you again for the bug. We may not get to this fix for a little bit. In the meantime, if this is a bug of interest to your use-cases and you'd like to contribute, we'd happily help guide new contributors to land fixes in upstream cloud-init so this is fixed sooner rather than later.

See contributing guidelines[1] and we can always answer questions in IRC if there are any obstacles with regard to getting setup.

[1] https://cloudinit.readthedocs.io/en/latest/development/contributing.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly good first issue launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant