newguy
2011-Jul-30 00:57 UTC
[Puppet Users] add ip address of another EC2 instance automatically in the hosts file of existing EC2 instance
HI guys I have a Ubuntu EC2 puppetmaster, 3 types of clients connect to this master; client A, B ,C . I want to add the ip address of client B in a module M of client A. Lets assume that I don''t know their ip addresses before hand. Is that possible through puppet??? and if yes how????? Thanks -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
vagn scott
2011-Jul-30 01:23 UTC
Re: [Puppet Users] add ip address of another EC2 instance automatically in the hosts file of existing EC2 instance
On 07/29/2011 08:57 PM, newguy wrote:> I want to add the ip address of client B in a module M of client A. > Lets assume that I don''t know their ip addresses before hand. >Well, what do you know before hand? Do you know the name of client B? Why can''t you use that, directly? If you know the name, and DNS is already set up, do a DNS lookup in a template, assuming the name alone isn''t going to work. If DNS is NOT already set up, what magic is puppet supposed to use to derive the ip address? -- vagn -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Scott Smith
2011-Jul-30 03:07 UTC
Re: [Puppet Users] add ip address of another EC2 instance automatically in the hosts file of existing EC2 instance
Use exported resources On Fri, Jul 29, 2011 at 6:23 PM, vagn scott <vagnscott@gmail.com> wrote:> On 07/29/2011 08:57 PM, newguy wrote: > >> I want to add the ip address of client B in a module M of client A. >> Lets assume that I don''t know their ip addresses before hand. >> >> > > > > Well, what do you know before hand? > > Do you know the name of client B? Why can''t you use that, directly? > > If you know the name, and DNS is already set up, do a DNS lookup in a > template, > assuming the name alone isn''t going to work. > > If DNS is NOT already set up, what magic is puppet supposed to use to > derive the ip address? > > > -- > vagn > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@** > googlegroups.com <puppet-users%2Bunsubscribe@googlegroups.com>. > For more options, visit this group at http://groups.google.com/** > group/puppet-users?hl=en<http://groups.google.com/group/puppet-users?hl=en> > . > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ryan Conway
2011-Aug-01 10:12 UTC
[Puppet Users] Re: add ip address of another EC2 instance automatically in the hosts file of existing EC2 instance
You can indeed use Exported resources. See the first example in this documentation: http://docs.puppetlabs.com/guides/exported_resources.html The example shows how to have every host export its SSH public key, and then collect every host’s key and install it in the ssh_known_hosts file (which is what the sshkey type does); this would include the host doing the exporting. You should be able to do the same sort of thing with each host''s IP address, and collect them in the hosts file. On Jul 30, 1:57 am, newguy <aimanparv...@gmail.com> wrote:> HI guys > I have a Ubuntu EC2 puppetmaster, 3 types of clients connect to this > master; client A, B ,C . > I want to add the ip address of client B in a module M of client A. > Lets assume that I don''t know their ip addresses before hand. > > Is that possible through puppet??? and if yes how????? > > Thanks-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.