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

Issue with accounts_group_members() on version 1.5.1 #65

Closed
redno2 opened this issue Jan 5, 2017 · 6 comments
Closed

Issue with accounts_group_members() on version 1.5.1 #65

redno2 opened this issue Jan 5, 2017 · 6 comments

Comments

@redno2
Copy link

redno2 commented Jan 5, 2017

After update the module I've got this error:

Error: Could not retrieve catalog from remote server: 
Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, accounts_group_members(): 
Wrong number of args, given 3, accepts just 2 at /data/puppetlabs/environments/production/modules/accounts/manifests/init.pp:49:16 on node .....

With this hiera :

accounts::users:
  john:
    comment: "John Doe"
    groups: ["sudo", "users"]
    shell: "/bin/bash"
    pwhash: "$6$GDH43O5m$FaJsdjUta1wXcITgKekNGUIfrqxYogW"
    ssh_keys:
      'john@doe': # an unique indentifier of a key
        type: "ssh-rsa"
        key: "a valid public ssh key string"

Tested on
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

Does it work on Solaris although it's not write supported ?

Thank you.

@deric
Copy link
Owner

deric commented Jan 5, 2017

Which version do you use?

It might work on Solaris, though I haven't test it.

@redno2
Copy link
Author

redno2 commented Jan 5, 2017

puppet version 4.3.2

I need to integrate on Ubuntu and "Solaris and Sles", if you want I can test it and adapt it if necessary, to validate the compatibility for your module.
I have already made an option to avoid modify uid/gid on servers, because is not possible to change some uid/gid on a production server, I'll do a pull request.

@deric
Copy link
Owner

deric commented Jan 6, 2017

Good, PRs and tests on new platforms are welcomed! Basic integration tests currently runs on CentOS and Debian. It shouldn't be a problem to add Solaris and SLES. Group management currently relies on gpasswd which I hope is available in all distributions.

Regarding the error message, how do you install puppet modules? It seems like you're using old version of accounts_group_members(), see the code, current version would throw this error:

"accounts_group_members(): Wrong number of args, given #{args.size}, accepts 2 or 3"

@redno2
Copy link
Author

redno2 commented Jan 10, 2017

unfortunately gpasswd doesn't exist on Solaris and the module doesn't change the group in user propriety, we can use usermod instead on Solaris, but need coding.
Not tested on SLES but it has gpasswd.

For accounts_group_members() it was an issue about the cached catalog, I've delete it and it's worked.. Sorry

@redno2
Copy link
Author

redno2 commented Jan 11, 2017

What is the best way to adapt your module on Solaris where is no gpasswd ?

@deric
Copy link
Owner

deric commented Jan 12, 2017

Ok, I'm glad you've managed to solve it.

I've opened separated issues (#67, #68) for both OS. I don't have much experience with Solaris, we need to update commands for adding and removing members. If usermod capabilities on Solaris are similar to gpasswd, it shouldn't be a problem.

@deric deric closed this as completed Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants