Issue #6314 has been updated by Dean Wilson.

<pre>
$ puppet --version
3.2.2

$ puppet resource file /var/
file { '/var/':
  ensure   => 'directory',
  ctime    => 'Wed Jul 03 18:56:43 +0100 2013',
  group    => '0',
  mode     => '755',
  mtime    => 'Wed Jul 03 18:56:43 +0100 2013',
  owner    => '0',
  selrange => 's0',
  selrole  => 'object_r',
  seltype  => 'var_t',
  seluser  => 'system_u',
  type     => 'directory',
}

$ puppet resource file /var/ > 6314.pp

$ puppet apply 6314.pp 
Error: Parameter type failed on File[/var/]: type is read-only at 
/home/dwilson/6314.pp:13

</pre>

Still seems to be present in 3.2.2

----------------------------------------
Bug #6314: ralsh file generates code that 2.6.5rc2 errors on
https://projects.puppetlabs.com/issues/6314#change-94123

* Author: John Warburton
* Status: Accepted
* Priority: High
* Assignee: 
* Category: 
* Target version: 
* Affected Puppet version: 2.6.0
* Keywords: 
* Branch: 
----------------------------------------
Now that issue #3165 is resolved, I can use ralsh on file types. Oh, now the 
code for directories is generating errors :-(

    root@engnsvr003# export 
RUBYLIB=/opt/local/pkgs/puppet-2.6.5rc2/lib:/opt/local/lib:/opt/local/lib/ruby/site_ruby/1.8:/opt/local/lib/ruby/site_ruby/1.8/sparc-solaris2.10
   
    root@engnsvr003# /opt/local/pkgs/puppet-2.6.5rc2/bin/ralsh file /var | 
egrep -v time
    file { '/var':
        type => 'directory'
        owner => '0',
        group => '3',
        ensure => 'directory',
        mode => '755',
    }
    root@engnsvr003# /opt/local/pkgs/puppet-2.6.5rc2/bin/ralsh file /var | 
egrep -v time > /tmp/var.pp
    root@engnsvr003# /opt/local/pkgs/puppet-2.6.5rc2/bin/puppet apply 
/tmp/var.pp
    Parameter type failed: type is read-only at /tmp/var.pp:7

Now, we remove the 'type', and it all works fine
    
    root@engnsvr003# /opt/local/pkgs/puppet-2.6.5rc2/bin/ralsh file /var | 
egrep -v 'type|time' > /tmp/var.pp
    root@engnsvr003# /opt/local/pkgs/puppet-2.6.5rc2/bin/puppet apply 
/tmp/var.pp
    notice: Finished catalog run in 0.16 seconds

As seen in 
[http://groups.google.com/group/puppet-users/browse_thread/thread/13904f6c8225d5e1](http://groups.google.com/group/puppet-users/browse_thread/thread/13904f6c8225d5e1)
    


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to