On Mon, May 6, 2019 at 8:11 AM Clarence H <clarenc...@gmail.com> wrote:
> Can you execute a task from a manifest file. > > I know you can execute > > puppet run task <taskname> > > But I would like to run it from within my class like this... > > > > class foobar { > > file {/blah': > ensure => present > } > > run_task{ 'my_task'} > > } > > > Is this possible?? > It is not currently possible. The run_task function from the bolt plan language would run on the master during catalog compilation rather than on the agent during execution which I suspect isn't what you want. We've discussed making it possible to run tasks in a similar fashion to exec resources but no one has built a task exec provider or new task resource type for 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/52c542cb-c9d5-47fe-ad0d-b71576c80c13%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/52c542cb-c9d5-47fe-ad0d-b71576c80c13%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMahoJu9x02vreymqnKTfu9aH6xW3r4mS3JM83ExJz_mZN_nfg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.