Puppet Syntax Error At End Of File
Contents |
error at end of file in /etc/puppetlabs/code/environments/production/manifests/site.pp on node n9300 edit asked 2015-09-04 15:36:36 -0500 sanjay 1 ●2 ●3 ●2 updated 2015-09-04 17:15:26 -0500 ramindk 4423 ●48 ●67 ●122 folks, puppet syntax error at expected I am getting the following error when I run the agent, my device is
Could Not Parse For Environment Production Syntax Error At
cisco nexus switch bash-4.2# sudo puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve "error: could not parse for environment production: syntax error at end of file at line 1 on node" catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at end of file in /etc/puppetlabs/code/environments/production/manifests/site.pp on node n9300 Warning: Not using cache on failed catalog Error: Could
Puppet Apply Error Could Not Parse For Environment Production
not retrieve catalog; skipping run bash-4.2# My Suite.pp is as follows : node bigip { f5_node { '/Common/Pnode1': ensure => 'present', address => '192.168.18.32', description => 'Web Server Node 1', availability_requirement => 'all', health_monitors => ['/Common/icmp'], }-> f5_pool { '/Common/puppet_pool': ensure => 'present', members => [ { name => '/Common/Pnode1', port => '80', }, ], availability_requirement => 'all', health_monitors => ['/Common/http_head_f5'], } -> f5_virtualserver { '/Common/puppet_vs': ensure => 'present', provider puppet syntax checker => 'standard', default_pool => '/Common/puppet_pool', destination_address => '10.168.18.151', destination_mask => '255.255.255.255', http_profile => '/Common/http', service_port => '80', protocol => 'tcp', source => '0.0.0.0/0', source_address_translation => 'automap' } node n9300 { cisco_ospf { "Sample": ensure => 'present', } cisco_ospf_vrf {"Sample default": ensure => 'present', } } edit retag flag offensive close merge delete add a comment 3 answers Sort by » oldest newest most voted 1 answered 2015-09-04 17:14:09 -0500 GregLarkin 4842 ●5 ●17 ●62 http://www.puppet.com/ updated 2015-09-08 12:44:16 -0500 Whenever the parser gives you a "syntax error at the end of file" error, immediately suspect that you are missing a closing "}" somewhere. From the looks of it, the "node bigip" declaration has not been closed. Add that "}" and post back here if it works or not. UPDATE: It appears that the ciscopuppet module has been installed by a non-root user. Please install it as root and report back here if that fixes the problem or not. edit flag offensive delete link more CommentsThanks Greg, I trimmed the file and just have now n9300 in the site.pp its still complaining Error 400 and invalid resource type cisco_ospf. If someone has a working site.pp for nexus that will helpsanjay( 2015-09-04 19:45:19 -0500 )editThanks Greg, I i
QueryOpen cron issuesPlatform Report - 2 Week ActivityPuppet Solaris issuesRuby 1.9 IssuesSupport
Puppet Iterate Array
Customer TicketsSupport TicketsTelly DeprecationsTickets - Assigned to MeTickets -
Puppet Lint
Authored by MeTickets - By PriorityTickets - In Topic Branch Pending ReviewTickets - puppet if Top by votesTickets - Unassigned to a target releaseTickets - UnreviewedTickets - unreviewed and outside SLATickets - waiting for actionTickets with simple https://ask.puppet.com/question/19071/i-am-getting-error-syntax-error-at-end-of-file-in-etcpuppetlabscodeenvironmentsproductionmanifestssitepp-on-node-n9300/ fixes Watchers (1) Peter Meier The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See https://projects.puppetlabs.com/issues/21608 the following page for information on filing tickets with JIRA: The Puppet Projects Workflow describes how to file tickets against Puppet projects. Bug #21608 Syntax error at '}'; expected '}' Added by Chris Wilson almost 3 years ago. Updated over 2 years ago. Status:ClosedStart date:Priority:NormalDue date:Assignee:Henrik Lindberg% Done:0%Category:languageTarget version:- Affected Puppet version:2.6.18 Branch: Keywords:parser errors We've Moved! Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com Description From the following code: # http://stackoverflow.com/questions/6399922/are-there-iterators-and-loops-in-puppet define f { file { "/root/.ssh/${title}": ensure => present, source => 'puppet:///files/ssh_keys/${title}', owner => 'root', group => 'root', mode => '0400', } } f { ["id_beep_down", "id_beep_down.pub", "id_beep_up", "id_beep_up.pub",] } I think it’s missing a colon after the last ], but that’s not what the error message says. [puppet server]$ rpm -q puppet puppet-2.6.18-3.el6.noarch History #1 Updated by eric sorenson almost
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/27453734/how-to-fix-could-not-parse-for-environment-production-error workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. syntax error Join them; it only takes a minute: Sign up How to fix 'Could not parse for environment production' error? up vote 2 down vote favorite Here is my little puppet snippet: when i execute this snippet i got the following error: err: Could not parse for environment production: Could not match at /home/test.pp:8 $vendor = generate("/usr/bin/lsscsi") if defined($vendor) syntax error at { if $vendor =~ /LSI/{ $d_multipath = [{ vendor => 'LSI', product => 'INF-01-00', path_checker => 'rdac', path_selector => 'round-robin 0', }] } } else { notify {'faield-lsscsi': message => "ERROR: failed to execute lsscsi to get the scsi vendor type", loglevel => critical, } } Could some one please help in pointing out? puppet share|improve this question edited Apr 2 '15 at 18:27 kenorb 22.2k9155128 asked Dec 12 '14 at 23:30 sapam 5,38821836 The error is not related the code you pasted, and maybe you can try to run puppet apply --environment=production –BMW Dec 12 '14 at 23:33 1 docs.puppetlabs.com/learning/manifests.html#syntax-hints –BMW Dec 12 '14 at 23:43 1 I check the code with puppet parser validate test.pp, no error is reported. Do you paste all codes here? –BMW Dec 12 '14 at 23:47 1 I copy/paste the code on my environment and run with validate, didn't get any errors. Are there any hide characters in the pp file? –BMW Dec 12