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

Fix puppet error if the account is not yet created #41

Merged
merged 1 commit into from Apr 5, 2019
Merged

Fix puppet error if the account is not yet created #41

merged 1 commit into from Apr 5, 2019

Conversation

Zophar78
Copy link
Contributor

Hi there ;)
I had an error when pushing accounts through hiera and providing a private key... It generates an error when creating the private key as the user home folder doesn't exist at the time the command is run. It would be better with a require but I don't know how to require a resource from a custom module. At least this patch avoid any errors and deploy the private key at next run.

Tell me what you think about this one... Is it possible to do this with a require?

@Zophar78
Copy link
Contributor Author

Zophar78 commented Jun 28, 2016

Well if you can point what's going wrong with CI as well i'll be thankfull. (Well seems to fail on master branch as well so it's not really an issue...)

@@ -133,6 +133,7 @@
exec { "put ssh private key ${name} for user ${user}":
command => "/bin/echo '${::accounts::ssh_keys[$name]['private']}' > ~${user}/.ssh/id_rsa; /bin/chown ${user} ~${user}/.ssh/id_rsa; /bin/chmod 600 ~${user}/.ssh/id_rsa",
unless => "/usr/bin/test -f ~${user}/.ssh/id_rsa",
onlyif => "/usr/bin/test -d ~${user}/.ssh",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe manage the dir as a file resource? @mcanevet ?

@raphink raphink merged commit 76413dc into camptocamp:master Apr 5, 2019
nettucu added a commit to nettucu/puppet-accounts that referenced this pull request Aug 9, 2019
* upstream/master: (21 commits)
  Release 1.11.1
  Allow augeasproviders_shellvar 4
  Fix tests on Puppet 6
  msync
  Prepare release 1.11.0
  Allow stdlib 5 & 6
  Correcting issue camptocamp#15 (camptocamp#56)
  Fix puppet error if the account is not yet created (camptocamp#41)
  Allow augeasproviders_shellvar 3.x
  Add additional prerequisite (camptocamp#53)
  added expiry parameter (camptocamp#55)
  Merge group arrays instead of rightmost precedence (camptocamp#65)
  Allow ssh_options for accounts being created through accounts::usergroups as well (camptocamp#66)
  Use loop instead of recursion
  Fixes camptocamp#61 - Pass through managehome on absent
  Do not use legacy puppet-lint-absolute_classname-check plugin
  Fix beaker version to ~>3.13
  Update to add the system option to account.pp
  Update with modulesync
  Release 1.10.0
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants