Maciej Bliziński
2008-Nov-15 22:13 UTC
[Puppet Users] Pulseaudio cookie distribution with puppet
Hello puppet-users, I''m fairly new to puppet; I''ve just started to manage few machines at home with it. I have a question regarding possible ways of handling pulseaudio cookie distribution. My current setup looks like this: pulse-server ------(tcp)------ pulse-client-1, pulse-client-2, pulse- client-3, ... There is an authentication mechanism between pulseaudio clients and the server. Upon startup, server generates a file called pulse-cookie and places it in /var/run/pulse/.pulse-cookie. Once the file is created, I go and copy this file over to all the client machines and put it into /etc/pulse-cookie; pulse client applications read this file and use it for authentication. pulse-client-1 $ sudo scp myuser@pulse-server:/var/run/.pulse-cookie / etc/pulse-cookie Password: ...I repeat the procedure on each pulse client. I want to automate cookie distribution using puppet. The problem is that the cookie doesn''t originate on puppetmaster, it''s being created on one of puppet clients (pulse-server is a puppet client). How would you solve pulse cookie file distribution? Maciej --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Paul Lathrop
2008-Nov-16 00:13 UTC
[Puppet Users] Re: Pulseaudio cookie distribution with puppet
Maciej, Check out export/collect and storeconfigs, as one option. A simpler way is to generate the cookie once, copy it to the puppetmaster, and distribute it. --Paul On Sat, Nov 15, 2008 at 2:13 PM, Maciej Bliziński <maciej.blizinski@gmail.com> wrote:> > Hello puppet-users, > > I'm fairly new to puppet; I've just started to manage few machines at > home with it. I have a question regarding possible ways of handling > pulseaudio cookie distribution. > > My current setup looks like this: > > pulse-server ------(tcp)------ pulse-client-1, pulse-client-2, pulse- > client-3, ... > > There is an authentication mechanism between pulseaudio clients and > the server. Upon startup, server generates a file called pulse-cookie > and places it in /var/run/pulse/.pulse-cookie. Once the file is > created, I go and copy this file over to all the client machines and > put it into /etc/pulse-cookie; pulse client applications read this > file and use it for authentication. > > pulse-client-1 $ sudo scp myuser@pulse-server:/var/run/.pulse-cookie / > etc/pulse-cookie > Password: > > ...I repeat the procedure on each pulse client. > > I want to automate cookie distribution using puppet. The problem is > that the cookie doesn't originate on puppetmaster, it's being created > on one of puppet clients (pulse-server is a puppet client). > > How would you solve pulse cookie file distribution? > > Maciej > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter Meier
2008-Nov-16 14:04 UTC
[Puppet Users] Re: Pulseaudio cookie distribution with puppet
Hi> Check out export/collect and storeconfigs, as one option. > > A simpler way is to generate the cookie once, copy it to the > puppetmaster, and distribute it.or another way would be to write a custom fact, which runs on the server and which content is the cookie or false otherwise. then use export to export a file with that content and collect it on the clients. however with creating the cookie on the puppetmaster and then distribute it directly is a lot easier. depens if it''s easy to create such a cookie on the puppetmaster. cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Maciej Bliziński
2008-Nov-17 22:22 UTC
[Puppet Users] Re: Pulseaudio cookie distribution with puppet
On Nov 16, 2:04 pm, Peter Meier <peter.me...@immerda.ch> wrote:> however with creating the cookie on the puppetmaster and then distribute > it directly is a lot easier. depens if it''s easy to create such a cookie > on the puppetmaster.Creating the cookie itself perhaps wouldn''t be that difficult, but after creating and placing it, pulseaudio server would need to be restarted. But restarting pulseaudio server is something I''d like to happen as seldom as possible, because after such restart all connections to it are lost, and clients usually don''t reestablish them automatically. For instance, flashplayer will just stop playing sound until you restart the browser. To sum up the scenario would be: generate cookie, place it on the pulseaudio server and then restart pulseaudio daemon. But don''t restart it if the cookie was already there. Maciej --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter Meier
2008-Nov-17 22:51 UTC
[Puppet Users] Re: Pulseaudio cookie distribution with puppet
Hi> Creating the cookie itself perhaps wouldn''t be that difficult, but > after creating and placing it, pulseaudio server would need to be > restarted. But restarting pulseaudio server is something I''d like to > happen as seldom as possible, because after such restart all > connections to it are lost, and clients usually don''t reestablish them > automatically. For instance, flashplayer will just stop playing sound > until you restart the browser. To sum up the scenario would be: > generate cookie, place it on the pulseaudio server and then restart > pulseaudio daemon. But don''t restart it if the cookie was already > there.The following definition file{''/path/to/cookie'': source => "puppet:///path/on/server/to/cookie", [...], notify => Service[''pulseaudio-server''], } service{''pulseaudio-server'': [...] } will only restart the pulseaudio-server if the content of the file is changed (which includes created). this is the idea of how this stuff on puppet should work. or why do you fear the pulseaudio-server to be restarted more often? cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Maciej Bliziński
2008-Dec-01 08:54 UTC
[Puppet Users] Re: Pulseaudio cookie distribution with puppet
On Nov 17, 10:51 pm, Peter Meier <peter.me...@immerda.ch> wrote:> file{''/path/to/cookie'': > source => "puppet:///path/on/server/to/cookie", > [...], > notify => Service[''pulseaudio-server''], > > } > > service{''pulseaudio-server'': > [...] > > } > > will only restart the pulseaudio-server if the content of the file is > changed (which includes created). this is the idea of how this stuff on > puppet should work.That works, thanks!> or why do you fear the pulseaudio-server to be restarted more often?Nothing serious; currently open audio connections go away, and new ones need to established. In the case of flash player, it means that the whole browser has to be restarted. Other clients, such as mpd, are smart enough to reestablish the connection without being restarted. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---