Foreman puppet module

Hello!

I've started to use the foreman() function to search for data in the
database.
It does what it is supposed to do and I'm a big fan of this function.
The sad thing is that it is a bit hidden away in the documentation and
if I haven't found an old blog about it I wouldn't have found it.

My setup is a straightforward install. Used foreman-installer.
My question is why this function isn't added by default to be used by
use mortals?
I've currently copied the file to my own module.

Is there a reason this nifty little function isn't in the modulepath by
default or have I missed a switch or something during install?

>
> Hello!
>
> I've started to use the foreman() function to search for data in the
database.
> It does what it is supposed to do and I'm a big fan of this function. The
sad thing is that it is a bit hidden away in the documentation and if I
haven't found an old blog about it I wouldn't have found it.

Glad you like it! I guess you mean this old blog post [1]? The source for
that is available in text form [2] - if you're feeling like contributing,
an updated version (similar to how the EC2 blog was updated at [3]) would
be awesome :slight_smile:

> My setup is a straightforward install. Used foreman-installer.
> My question is why this function isn't added by default to be used by use
mortals?
> I've currently copied the file to my own module.
>
> Is there a reason this nifty little function isn't in the modulepath by
default or have I missed a switch or something during install?

We've talked about it a few times - in general, it's easy enough call some
kind of "cp -r" at the end of a successful run into a dedicated installer
environment, it's just never been done. The main issue is getting that
installer environment added to Puppet - although this is much easier now
that we have directory environments (no changes to puppet.conf)

Feel free to open an RFE at
Foreman if you
wish!

Cheers
Greg

[1] Foreman :: Getting foreman search results into your Puppet manifest
[2]
https://github.com/theforeman/theforeman.org/blob/gh-pages/_posts/2012-01-01-getting-foreman-search-results-into.md
[3]
https://github.com/theforeman/theforeman.org/blob/gh-pages/_posts/2016-02-03-ec2-provisioning-using-foreman-update.md

··· On 24 March 2016 at 17:08, Roger Mårtensson wrote:

> >
> > Hello!
> >
> > I've started to use the foreman() function to search for data in the
> database.
> > It does what it is supposed to do and I'm a big fan of this
> function. The sad thing is that it is a bit hidden away in the
> documentation and if I haven't found an old blog about it I wouldn't
> have found it.
>
> Glad you like it! I guess you mean this old blog post [1]? The source
> for that is available in text form [2] - if you're feeling like
> contributing, an updated version (similar to how the EC2 blog was
> updated at [3]) would be awesome :slight_smile:
That is the blog post I was talking about. I'll look at the blog and
see if it could get any better than it is. Then this hidden gem should
be mentioned somewhere in the documentation. Maybe there are more nice
things that is hidden away in the directories?

> > My setup is a straightforward install. Used foreman-installer.
> > My question is why this function isn't added by default to be used
> by use mortals?
> > I've currently copied the file to my own module.
> >
> > Is there a reason this nifty little function isn't in the modulepath
> by default or have I missed a switch or something during install?
>
> We've talked about it a few times - in general, it's easy enough call
> some kind of "cp -r" at the end of a successful run into a dedicated
> installer environment, it's just never been done. The main issue is
> getting that installer environment added to Puppet - although this is
> much easier now that we have directory environments (no changes to
> puppet.conf)
>
> Feel free to open an RFE at
> Foreman if
> you wish!
Maybe a foreman-utils module should be made and published on the Forge
for people to use if needed. It's quite easy to install modules and then
you let the user choose if it should be installed or not.

I'll look into creating an RFE. It's a nice function and I see me using
it to orchestrate install and/or configuration of more complex setups
than single server.

··· Den 2016-03-24 kl. 18:25, skrev Greg Sutcliffe: > On 24 March 2016 at 17:08, Roger Mårtensson > <roger.martensson@gmail.com > wrote:

Cheers
Greg

[1]
Foreman :: Getting foreman search results into your Puppet manifest
[2]
https://github.com/theforeman/theforeman.org/blob/gh-pages/_posts/2012-01-01-getting-foreman-search-results-into.md
[3]
https://github.com/theforeman/theforeman.org/blob/gh-pages/_posts/2016-02-03-ec2-provisioning-using-foreman-update.md


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

The function's available in our published theforeman/foreman module, see
https://forge.puppetlabs.com/theforeman/foreman.

All of the modules used in the installer are on the Forge in the same
namespace, so you can manage the entire installation using the same ones
you did for installation - but it's not automatic. A new version comes
out on all major releases.

··· On 24/03/16 20:06, Roger Mårtensson wrote: > Den 2016-03-24 kl. 18:25, skrev Greg Sutcliffe: >> On 24 March 2016 at 17:08, Roger Mårtensson >> <roger.martensson@gmail.com > wrote: >>> My setup is a straightforward install. Used foreman-installer. >>> My question is why this function isn't added by default to be used >> by use mortals? >>> I've currently copied the file to my own module. >>> >>> Is there a reason this nifty little function isn't in the modulepath >> by default or have I missed a switch or something during install? >> >> We've talked about it a few times - in general, it's easy enough call >> some kind of "cp -r" at the end of a successful run into a dedicated >> installer environment, it's just never been done. The main issue is >> getting that installer environment added to Puppet - although this is >> much easier now that we have directory environments (no changes to >> puppet.conf) >> >> Feel free to open an RFE at >> http://projects.theforeman.org/projects/puppet-foreman/issues/new if >> you wish! > Maybe a foreman-utils module should be made and published on the Forge > for people to use if needed. It's quite easy to install modules and then > you let the user choose if it should be installed or not.


Dominic Cleal
dominic@cleal.org

I'll try that out but it seems a bit overkill to download the complete
install/configure module to get to one function. Thought that it would
be nice to have a more lightweight package for normal use.

··· Den 2016-03-25 kl. 10:11, skrev Dominic Cleal: > On 24/03/16 20:06, Roger Mårtensson wrote: >> >> Maybe a foreman-utils module should be made and published on the Forge >> for people to use if needed. It's quite easy to install modules and then >> you let the user choose if it should be installed or not. > The function's available in our published theforeman/foreman module, see > https://forge.puppetlabs.com/theforeman/foreman. > > All of the modules used in the installer are on the Forge in the same > namespace, so you can manage the entire installation using the same ones > you did for installation - but it's not automatic. A new version comes > out on all major releases.