FAQ
Hello,

I have installed two VMs one for master and another for client. When i am
trying to trying to transfer a file from puppet master to the client i am
getting the following error.

err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not parse for environment production: Syntax error at '['; expected
']' at /etc/puppetlabs/puppet/fileserver.conf:1 on node client2.puppet.com
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run


Below i my fileserver.conf

[files]
path /etc/puppetlabs/puppet/modules/files
allow *

[modules]
path /etc/puppetlabs/puppet/modules
allow *


This is my manifest site.pp


# specified in the console for that node.
import "/etc/puppetlabs/puppet/modules/*.pp"
import "/etc/puppetlabs/puppet/fileserver.conf"
#include files
node default {
   # This is where you can declare classes for all nodes.
   # Example:
   # class { 'my_class': }
}
node client2 {
include resolver
include service
include useradd
include transferfile
}


And this is my module where i defined the class

class transferfile {
      file { '/root/files/yum.conf':
         ensure => 'present',
         mode => '0755',
         owner => 'root',
         group => 'root',
         force => 'true',
         source => "puppet:///modules/files/yum.conf"
            }
}


Can anyone please help me, how to solve this issue. I went through many
forums but didn't find a correct way to resolve this issue. Could you
please help me out with this as i have to finish this work ASAP.

Thanks,
Ramesh M

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Joe at Jun 12, 2013 at 11:13 pm
    You don't import .conf files in your site.pp. Only .pp files.

    The fileserver config file is not valid puppet syntax. Puppet will find and
    use it on it's own.
    On Wednesday, June 12, 2013 7:50:12 AM UTC-6, Ramesh Mahimalur wrote:

    Hello,

    I have installed two VMs one for master and another for client. When i am
    trying to trying to transfer a file from puppet master to the client i am
    getting the following error.

    err: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Could not parse for environment production: Syntax error at '['; expected
    ']' at /etc/puppetlabs/puppet/fileserver.conf:1 on node client2.puppet.com
    warning: Not using cache on failed catalog
    err: Could not retrieve catalog; skipping run


    Below i my fileserver.conf

    [files]
    path /etc/puppetlabs/puppet/modules/files
    allow *

    [modules]
    path /etc/puppetlabs/puppet/modules
    allow *


    This is my manifest site.pp


    # specified in the console for that node.
    import "/etc/puppetlabs/puppet/modules/*.pp"
    import "/etc/puppetlabs/puppet/fileserver.conf"
    #include files
    node default {
    # This is where you can declare classes for all nodes.
    # Example:
    # class { 'my_class': }
    }
    node client2 {
    include resolver
    include service
    include useradd
    include transferfile
    }


    And this is my module where i defined the class

    class transferfile {
    file { '/root/files/yum.conf':
    ensure => 'present',
    mode => '0755',
    owner => 'root',
    group => 'root',
    force => 'true',
    source => "puppet:///modules/files/yum.conf"
    }
    }


    Can anyone please help me, how to solve this issue. I went through many
    forums but didn't find a correct way to resolve this issue. Could you
    please help me out with this as i have to finish this work ASAP.

    Thanks,
    Ramesh M
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJun 12, '13 at 3:23p
activeJun 12, '13 at 11:13p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Ramesh Mahimalur: 1 post Joe: 1 post

People

Translate

site design / logo © 2021 Grokbase