Dhananjayan Ramesh
2013-Jun-20 21:21 UTC
[Puppet Users] Apply a specific manifest on agent
Hi All, I am new to Puppet and I am wondering if there is a way to just apply a manifest one-time (present on the master, not included in site.pp) on an agent node without having to edit site.pp? It''s like I want to run a command on the agent that will do this for me. Something analogous to "puppet apply <manifest>" except that the manifest is not locally present on the agent, but on the master... -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Hi, depending on your code you can look at a few options. When an agent connects to the puppet master you can supply a --tag var that you can then inspect and make changes in your code paths. The other thing you can do is add --environment and use the environment features that puppet has to load a completely different site.pp. There''s a puppet git workflows page that will come up in google that explains the environments - tags can be found in puppet docs. (Can''t get you direct links, sorry). THT Den On 21/06/2013, at 7:21, Dhananjayan Ramesh <dhananjayanramesh@gmail.com> wrote:> Hi All, > > I am new to Puppet and I am wondering if there is a way to just apply a manifest one-time (present on the master, not included in site.pp) on an agent node without having to edit site.pp? It''s like I want to run a command on the agent that will do this for me. > > Something analogous to "puppet apply <manifest>" except that the manifest is not locally present on the agent, but on the master... > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On Thursday, June 20, 2013 4:21:00 PM UTC-5, Dhananjayan Ramesh wrote:> > Hi All, > > I am new to Puppet and I am wondering if there is a way to just apply a > manifest one-time (present on the master, not included in site.pp) on an > agent node without having to edit site.pp? It''s like I want to run a > command on the agent that will do this for me. > > Something analogous to "puppet apply <manifest>" except that the manifest > is not locally present on the agent, but on the master... >Not as such, no. Puppet does not recognize manifest files as a remotely-addressable unit of organization. Also, any catalog the master provides to an agent will contain only resources that have been declared for that agent, as directed by the appropriate entry-point manifest (normally site.pp). You can alter the declarations that will be made for a given node by requesting a different (pre-defined) environment, and you can select a subset of the resources declared for the client node via the --tag option, but you cannot ask for arbitrary manifest files. This is the point where I normally say "puppet is not a script engine" and urge you to not try to use it as if it were. John -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On 06/20/2013 11:21 PM, Dhananjayan Ramesh wrote:> Hi All, > > I am new to Puppet and I am wondering if there is a way to just apply a > manifest one-time (present on the master, not included in site.pp) on an > agent node without having to edit site.pp? It''s like I want to run a > command on the agent that will do this for me. > > Something analogous to "puppet apply <manifest>" except that the > manifest is not locally present on the agent, but on the master...Although you could do that with puppet, note that puppet is not designed for this kind of tasks. It''s like hitting a nail with a shoe, when it''s better to use hammer. Try some kind of remote execution tool, like PuppetLabs acquired mcollective, c3-powertools or anything on that line. -- Jakov Sosic www.srce.unizg.hr -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Maybe Matching Threads
- Unable to import a manifest file from a different directory to the one where site.pp is located using environments
- Manifest organization
- puppet manifest execution orders
- Run Puppet Against Master with Local node.pp Manifest?
- Warning: Local environment: "42A" doesn't match server specified node environment "production", switching agent to "production"