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

adduser/addgroup commands to core user module #30445

Closed
tony-caffe opened this issue Sep 15, 2017 · 8 comments · Fixed by #45507
Closed

adduser/addgroup commands to core user module #30445

tony-caffe opened this issue Sep 15, 2017 · 8 comments · Fixed by #45507
Assignees
Labels
affects_2.3 This issue/PR affects Ansible v2.3 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team. system System category

Comments

@tony-caffe
Copy link

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

User Module, Ansible core module

ANSIBLE VERSION
Ansible 2.3.0.0
CONFIGURATION

Ad-hoc commands using user module

OS / ENVIRONMENT
SUMMARY

When trying to manage users in Alpine Linux, specifically but can affect other flavors, the user module defaults only to useradd and groupadd commands. These Systems do not have those commands, only adduser/addgroup.

STEPS TO REPRODUCE

This would allow us to use the user core module or perhaps a different module for managing users.

- name: Alpine | Add user
  command: "adduser -D {{ adduser_user_name }} creates=/home/{{ adduser_user_name }}"
  become: yes
  ignore_errors: true
  when: ansible_os_family == "Alpine"
EXPECTED RESULTS

To automatically source various tools to manage users instead of one specific tool.

ACTUAL RESULTS
"msg": "Failed to find required executable useradd in paths: /bin:/usr/bin:/sbin:/usr/sbin"

This would be a very nice feature to add for our infrastructure. We use Ansible on a Global scale and Alpine allows us to have a slimmed down OS with enhanced security for remote services.

@ansibot
Copy link
Contributor

ansibot commented Sep 15, 2017

cc @sfromm
click here for bot help

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 feature_idea module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 15, 2017
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Sep 15, 2017
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_idea labels Mar 2, 2018
@ansibot
Copy link
Contributor

ansibot commented May 29, 2018

@samdoran samdoran self-assigned this Jun 18, 2018
@samdoran
Copy link
Contributor

Related to #23944.

We most likely need to add a class for Alpine Linux.

@tony-caffe
Copy link
Author

@samdoran Any update to this or the other issue related to it? We use Ansible to manage systems all across the world but they are all Alpine/busybox servers and having this would give more reliability and other features in one Task definition.

Having the deluser command used may be something to note as well.

Thank you!

@samdoran
Copy link
Contributor

@tony-caffe I have a local branch where I've been building this out. I haven't gotten in fully finished yet, though.

@tony-caffe
Copy link
Author

@samdoran Will this be shipped in Ansible 2.8 then? I am so happy to see some movement here. You do not know how much this will help our world wide Organization on thousands of Alpine Linux servers with BusyBox.

@tony-caffe
Copy link
Author

Any chance we will get the group variant for busybox supported as well?
#29808

@samdoran
Copy link
Contributor

samdoran commented Apr 1, 2019

@tony-caffe Please try #54689 for group support of BusyBox.

@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team. system System category
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants