Skip to content

Fix issue #47 #48

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

Merged
merged 1 commit into from
Nov 22, 2017
Merged

Fix issue #47 #48

merged 1 commit into from
Nov 22, 2017

Conversation

axxelG
Copy link
Contributor

@axxelG axxelG commented Nov 14, 2017

Return status for systemd services in fact "systemd_internal_services" as string

Return status for systemd services in fact "systemd_internal_services" as string
@bastelfreak
Copy link
Member

Hi @axxelG, thanks for the patch. I am pretty sure I tested the .to_sym successfully. I will have a look tomorrow again. Can you check the used email address in your commit? It isn't associated with your github account.

@bastelfreak
Copy link
Member

Can you provide a bit more information about your environment? I am unable to reproduce this. puppet facts output:

    "systemd": true,
    "systemd_internal_services": {
      "systemd-fsck-root.service": "enabled-runtime",
      "systemd-journal-gatewayd.service": "indirect",
      "systemd-journal-remote.service": "indirect",
      "systemd-journal-upload.service": "disabled",
      "systemd-networkd-wait-online.service": "enabled",
      "systemd-networkd.service": "enabled",
      "[email protected]": "disabled",
      "systemd-resolved.service": "enabled",
      "systemd-timesyncd.service": "disabled"
    },
    "systemd_version": "235",

@axxelG
Copy link
Contributor Author

axxelG commented Nov 15, 2017

It's a fresh installed Raspbian with just some ssh stuff and apt-get install vim git-core puppet and gem install r10k + some config edits to match /etc/puppet instead of /etc/puppetlabs/puppet.

Actually puppet facts is a good idea for giving you a bit more information about my environment :-)

    "puppetversion": "4.8.2",
    "lsbdistrelease": "9.1",
    "rubyversion": "2.3.3",
    "lsbdistid": "Raspbian",
    "lsbdistcodename": "stretch",
    "architecture": "armv7l",

    "distid": "Raspbian",
    "distdescription": "Raspbian GNU/Linux 9.1 (stretch)",

    "kernelrelease": "4.9.41-v7+",
    "facterversion": "2.4.6",

    "service_provider": "systemd",
    "systemd": true,
    "systemd_version": "232",
    "clientcert": ...
#Puppetfile
forge 'forge.puppetlabs.com'

mod 'puppetlabs-stdlib', '4.21.0'
mod 'puppetlabs-inifile', '2.0.0'
mod 'camptocamp-systemd', '1.1.0'

@sathieu
Copy link

sathieu commented Nov 22, 2017

I have the same problem:

Warning: Facter: Fact resolution fact='systemd_internal_services', resolution='<anonymous>' resolved to an invalid value: Expected disabled to be one of [Integer, Float, TrueClass, FalseClass, NilClass, String, Array, Hash], but was Symbol 

@bastelfreak
Copy link
Member

This may be related to different ruby versions, I will test it.

@bastelfreak
Copy link
Member

I did some debugging. This is working fine on Facter 3, but fails on Facter 2. Thanks for the patch @axxelG!

@bastelfreak bastelfreak merged commit 823f0b6 into voxpupuli:master Nov 22, 2017
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.

3 participants