Issue #1835 has been updated by jamtur01.

Status changed from Ready for Checkin to Closed
Target version set to 0.25.0

Pushed in commit:"1f6dce51a9cf7c423e94fd02f54322217d415a77" in branch master.
----------------------------------------
Bug #1835: augeas fails when arguments contain whitespaces
http://projects.reductivelabs.com/issues/show/1835

Author: mfournier
Status: Closed
Priority: Normal
Assigned to: [email protected]
Category: 
Target version: 0.25.0
Complexity: Unknown
Affected version: 0.24.7
Keywords: augeas quote whitespace argument


Augeas needs to have arguments containing whitespaces to be quoted:
<pre>
augtool> get /files/etc/samba/smb.conf/target[1]/unix password sync
Too many arguments for get
augtool> get /files/etc/samba/smb.conf/target[1]/unix\ password\ sync
Too many arguments for get
augtool> get "/files/etc/samba/smb.conf/target[1]/unix password sync"
/files/etc/samba/smb.conf/target[1]/unix password sync = yes
</pre>

It seems the puppet augeas type doesn't handle the quoting/whitespace stuff:
<pre>
m...@lonquimay:~/src/puppet$ cat /tmp/test.pp 
augeas { "test1":
  context => "/files/etc/samba/smb.conf/target[1]/",
  changes => "set pam password change no",
}
augeas { "test2":
  context => "/files/etc/samba/smb.conf/target[1]/",
  changes => "set \"unix password sync\" no",
}
augeas { "test3":
  context => "/files/etc/samba/smb.conf/target[1]/",
  changes => "set 'server string' foobar",
}
m...@lonquimay:~/src/puppet$ bin/puppet --debug /tmp/test.pp 
debug: Creating default schedules
debug: //Augeas[test3]: Changing returns
debug: //Augeas[test3]: 1 change(s)
debug: Augeas[test3](provider=augeas): Opening augeas with root /, lens path , 
flags 0
debug: Augeas[test3](provider=augeas): sending command 'set' with params 
["/files/etc/samba/smb.conf/target[1]/'server", "string' foobar"]
err: //Augeas[test3]/returns: change from need_to_run to 0 failed: Save failed 
with return code false
debug: //Augeas[test1]: Changing returns
debug: //Augeas[test1]: 1 change(s)
debug: Augeas[test1](provider=augeas): Opening augeas with root /, lens path , 
flags 0
debug: Augeas[test1](provider=augeas): sending command 'set' with params 
["/files/etc/samba/smb.conf/target[1]/pam", "password change no"]
err: //Augeas[test1]/returns: change from need_to_run to 0 failed: Save failed 
with return code false
debug: //Augeas[test2]: Changing returns
debug: //Augeas[test2]: 1 change(s)
debug: Augeas[test2](provider=augeas): Opening augeas with root /, lens path , 
flags 0
debug: Augeas[test2](provider=augeas): sending command 'set' with params 
["/files/etc/samba/smb.conf/target[1]/\"unix", "password sync\" no"]
err: //Augeas[test2]/returns: change from need_to_run to 0 failed: Save failed 
with return code false
debug: Finishing transaction 69963456452840 with 3 changes
</pre>



----------------------------------------
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://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to