can we call the puppet task/plan from puppet profile ?

42 views
Skip to first unread message

Vinay Korrapati

unread,
Sep 1, 2020, 9:29:03 AM9/1/20
to Puppet Users
Hi Team,

Is there any possibility to trigger the puppet task/plan from puppet profile ?

Regards
Vinay

Clarence

unread,
Sep 1, 2020, 4:18:15 PM9/1/20
to puppet...@googlegroups.com
Do you mean from the Puppet GUI ?  If so, there is an API to do that.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5415c4a3-5c44-41d3-ae08-0d12c066136cn%40googlegroups.com.

Vinay Korrapati

unread,
Sep 2, 2020, 12:30:48 AM9/2/20
to Puppet Users
Hi clare,

Thanks for your response. Not from puppet GUI, its from puppet profile.

Can we call the puppet task/plan from manifest file ?

Jesse Reynolds

unread,
Sep 2, 2020, 3:04:55 AM9/2/20
to puppet...@googlegroups.com
Hi Vinay, 

This is pretty horrible but you can do something like this: 

exec { 'bolt task run foo::bar -t localhost':
  path => '/opt/puppetlabs/bolt/bin:/usr/bin',
  creates => '/some/path',
}

but at that point you may as well exec the task's script directly. The above assumes the task has already been copied to the node.

What is the use case? It's more usual to call puppet code from bolt via a plan or apply, rather than the other way around.

Cheers




--
Jesse Reynolds
Principal Professional Services Engineer
Melbourne, Australia
Reply all
Reply to author
Forward
0 new messages