You're not the only one -- I've never gotten a puppet apply shebang
line to work. I investigated around the office, and I think what I
found was that everyone remembered it having worked at some point in
the unspecified past, but no one could specify a version where it
definitely worked, and it certainly doesn't work now.

On Jul 18, 8:27 am, zu...@puzzle.ch wrote:
> >> On Mon, Jun 27, 2011 at 7:27 AM, <zu...@puzzle.ch> wrote:
>
> >>> We have often the Problem that some files need to be checked for
> >>> updates
> >>> faster than the cycle of the puppet agent. I try to solve this with a
> >>> script which tries to download the files directly from the fileserver
> >>> of
> >>> the puppetmaster. So far i couldn't get it to work.
>
> >> Have you considered using tags instead to filter for a subset of your
> >> resources?
>
> > I need to check 1 file and 1 directory every 5min from >600 puppet nodes.
> > As far as i know the puppetmaster still needs to compile the whole
> > catalog. I did not test this, but i think this would not scale well.
>
> The solution to this was easier than expected.
> I simply write the folowing file and execute it with puppet apply
>
> -----
> $source = 'puppet.example.com'
>
> file{'/etc/sudoers':
>     source => [ "puppet://$source/files/sudo/sudoers/${fqdn}/sudoers",
>                 "puppet://$source/files/sudo/sudoers/sudoers",
>                 "puppet://$source/sudo/sudoers/${operatingsystem}/sudoers",
>                 "puppet://$source/sudo/sudoers/sudoers" ],
>     owner => root, group => 0, mode => 0440;}
>
> -----
>
> It then just deploys this one file without the need of compiling a
> catalog. I can call this from cron then as often as i wish.
>
> I saw that some use the shebang "#!/usr/bin/puppet apply" to start such
> manifests directly as a script. This does not seam to work for me. All i
> get is:
>
> ./puppet_sync_sudo2.pp: line 3: =: command not found
> ./puppet_sync_sudo2.pp: line 5: file{/tmp/sudoers:: No such file or directory
> ./puppet_sync_sudo2.pp: line 6: =: No such file or directory
> ./puppet_sync_sudo2.pp: line 7: puppet:///files/sudo/sudoers/sudoers,: No
> such file or directory
> ./puppet_sync_sudo2.pp: line 8: puppet:///sudo/sudoers//sudoers,: No such
> file or directory
> ./puppet_sync_sudo2.pp: line 9: puppet:///sudo/sudoers/sudoers: No such
> file or directory
> ./puppet_sync_sudo2.pp: line 10: owner: command not found
> ./puppet_sync_sudo2.pp: line 11: syntax error near unexpected token `}'
> ./puppet_sync_sudo2.pp: line 11: `}'
>
> Any ideas?
>
> Greetings
> Andy

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to