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
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,
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
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 <lrh...@gmail.com> 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,
>
My sshd_config needed to change the user to user puppet. If i don't do
it puppetmaster have no access and put out an error 400, to send this
file to the client.
Thx
Wiesel