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

Add facts #1097

Closed
luckyraul opened this issue Jul 23, 2019 · 12 comments
Closed

Add facts #1097

luckyraul opened this issue Jul 23, 2019 · 12 comments

Comments

@luckyraul
Copy link

luckyraul commented Jul 23, 2019

I am trying to add facts to nodes.
I have a bunch of Linux Mint nodes, I want to provision them via apply

For example - with docker,

$results = apply($nodes, _run_as => root) {
    notice($::osfamily)
    include 'docker'
}

Docker module does not support Linux Mint. So I want to add fact that these nodes are Ubuntu actually

How can I do this?

@lucywyman
Copy link
Contributor

lucywyman commented Jul 23, 2019

First, I highly recommend joining our community slack - we have a lot of great community members who can answer these questions in addition to Bolt engineers. You'll get a faster and better response there.

Second, setting the fact will not affect whether the docker module works or not. Even if it did, the osfamily fact is deprecated, and even if it wasn't deprecated the default value for Mint is Debian which is the same as Ubuntu (see https://github.com/puppetlabs/facter/blob/e4efbc3e8046a4a8d7d2863ba2c156af2accd211/lib/src/facts/linux/os_linux.cc#L57-L64)

What are you trying to do, what do you expect to happen, and what is actually happening?

@luckyraul
Copy link
Author

luckyraul commented Jul 24, 2019

Arguments to Resource[] are all empty/undefined (file: Boltdir/modules/docker/manifests/repos.pp, line: 49, column: 41)
https://github.com/puppetlabs/puppetlabs-docker/blob/master/manifests/repos.pp#L49 - $docker::prerequired_package - is empty

https://github.com/puppetlabs/puppetlabs-docker/blob/master/manifests/params.pp#L329

Family Debian, OS LinuxMint.

I want to change LinuxMint to Ubuntu.

Same problem with apt::ppa I need to change sylvia to xenial

@lucywyman
Copy link
Contributor

Ah ok - I wonder if that module will accept a PR to add Mint to it? @davejrt or @florindragos Do you know what the right thing to do here is?

@lucywyman
Copy link
Contributor

@luckyraul Does puppetlabs/puppetlabs-docker#519 fix your issue? I'm not sure if that's the only place where OS name is relevant in that module.

@luckyraul
Copy link
Author

luckyraul commented Aug 15, 2019

Not completely
The repository 'https://download.docker.com/linux/linuxmint sylvia Release' does not have a Release file.

Probably I can override them via init variables...

This problem exists with many modules, So is any chance to change facts?

@florindragos
Copy link
Contributor

@lucywyman We could accept puppetlabs/puppetlabs-docker#519 if it is the only thing needed to get the docker module working on linux mint. As long as it does not break the module supported operating systems, I don't see a problem.

@sheenaajay
Copy link

@lucywyman Could you please confirm if it is the only thing needed to get the docker module working on linux mint.puppetlabs/puppetlabs-docker#519 .Thank you.

@luckyraul
Copy link
Author

luckyraul commented Sep 12, 2019

@sheenaajay - also it needs to map apt release code to debian/ubuntu docker repo

@sheenaajay
Copy link

@luckyraul Thank you for the response.

@luckyraul
Copy link
Author

also link puppetlabs/facter#1845

@luckyraul
Copy link
Author

link puppetlabs/puppetlabs-apt#890

@nicklewis
Copy link
Contributor

Is this still an issue?

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

No branches or pull requests

5 participants