Hi Mohamaed,
i find the problem. I needed to create a subdirectory in the root-
directory of the fileserver. After this my test.txt was sent to the
client.

I started directly with modules.
In the second way i planned to modify my sshd_config on the client.

If i do this i get on every time this message

err: /Stage[main]/Ssh/File[/etc/ssh/sshd_configtest]: Could not
evaluate: Could not retrieve information from source(s) 
puppet:///ssh/sshd_config
at /etc/puppet/modules/ssh/manifests/init.pp:12

It only works if i change the source path to puppet:///test/test.txt
If i create a only a new directory ssh where the the directory test is
i think i need to change only puppet:///test/test.txt to 
puppet:///ssh/sshd_config.
But i get the error message and also is i copy the file in the test
directory or copy the test.txt to the ssh directory. Did i forgot
something? Cache?

fileserver.conf

[configuration]
path /etc/puppet/manifests/files
allow *

i changed only this part in auth.conf

path /etc/puppet/manifests/files
allow *

ls -l /etc/puppet/manifests/files/ssh/sshd_config
-rw-r--r-- 1 root root 9  9. Dez 10:53 /etc/puppet/manifests/files/ssh/
sshd_config

cat /etc/puppet/modules/ssh/manifests/init.pp

class ssh {
 package { 'ssh':
  name => ['openssh'],
  ensure => latest
 }

 file {'/etc/ssh/sshd_configtest':
  ensure => file,
  source => 'puppet:///ssh/sshd_config',
  require => Package['ssh'],
 }

 service { 'ssh':
  ensure => stopped,
  hasstatus => true,
  hasrestart => true,
  enable => true,
 }
}

If i change only the directory to my test.txt it runs without errors

ls -l /etc/puppet/manifests/files/test/test.txt
-rw-r--r-- 1 root root 10  7. Dez 11:14 /etc/puppet/manifests/files/
test/test.txt

cat /etc/puppet/manifests/files/test/test.txt
test-file

What's wrong???

Thx

Wiesel

On 8 Dez., 19:10, Mohamed Lrhazi <[email protected]> wrote:
> On the client, run puppet agent --test --trace --debug
> That would show you what the puppet client is doing....
>
> If you still have problems:
>
> in "include test" what is test? a module?  show the full content of it.
>
> I personally use modules for everything and I always have the files
> distributed at the module level, like:
>
> source  => "puppet:///modules/gu_auth/foo.ext",
>
> where gu_auth is the name of a module.
>
> Thanks,
> Mohamed,
>
> On Thu, Dec 8, 2011 at 5:45 AM, Wiesel82 <[email protected]> wrote:
> > Hi all,
> > i started this week to install puppet. Everything runs fine in this
> > part.
> > The client is authenticated with the master and i find them if i start
> > the command
>
> > puppet cert --list --all
>
> > I created my first pp-files and my first module.
> > if test all with puppet apply it works.
>
> > I wrote a module which copy a file to a other place (/etc/puppet/
> > modules/test/files/test.txt to /test/test.txt).
> > If i test this with puppet apply the file will be copied to this
> > directory..
>
> > But now i would like to do this in a authenticated client.
>
> > I read that i need to create the fileserver.conf and change the url
> > to
>
> > source => 'puppet:///test/files/test.txt',
>
> > Firstly i test it with default node in a second test i created a
> > second node (fqdn) and copied the same content inside.
>
> > node default {
> >    notice("Hallo OSMC")
> >        include test
> > }
> > node test.vm {
> >    notice("Hallo OSMC")
> >        include test
> > }
>
> > What should i do, that the client get this file from the master?
>
> > Best regards
>
> > Wiesel
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Puppet Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to