mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
user: Fix add for SuSE Linux Enterprise 11 (#27015)
This commit is contained in:
parent
7229eba569
commit
158b32cd7a
1 changed files with 7 additions and 0 deletions
|
@ -367,6 +367,13 @@ class User(object):
|
||||||
cmd.append('-n')
|
cmd.append('-n')
|
||||||
else:
|
else:
|
||||||
cmd.append('-N')
|
cmd.append('-N')
|
||||||
|
elif os.path.exists('/etc/SuSE-release'):
|
||||||
|
# -N did not exist in useradd before SLE 11 and did not
|
||||||
|
# automatically create a group
|
||||||
|
dist = platform.dist()
|
||||||
|
major_release = int(dist[1].split('.')[0])
|
||||||
|
if major_release >= 12:
|
||||||
|
cmd.append('-N')
|
||||||
else:
|
else:
|
||||||
cmd.append('-N')
|
cmd.append('-N')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue