On Tuesday, May 15, 2018 at 2:17:58 PM UTC-7, badmeischter wrote:
>
> This is an old thread, however I was desperate to find an answer for the 
> same question and would like to share what I found out
>
> Am Donnerstag, 13. März 2014 11:04:36 UTC+1 schrieb zerozer...@gmail.com:
>>
>> On Wednesday, March 12, 2014 3:35:09 PM UTC+1, kbrede wrote:
>>  
>>
>>> How do I append "iburst" at the end of "time.example.com?"
>>>
>>
>> AFAICT in augtool this works:
>>
>>   set /files/etc/ntp.conf/server[1] "time.example.com iburst"
>>
>
> NOPE, this  will not work. Assuming you are in the augtool shell:
>
> augtool> match /files/etc/ntp.conf/server
> /files/etc/ntp.conf/server[1] = 3.ch.pool.ntp.org
> /files/etc/ntp.conf/server[2] = 0.ch.pool.ntp.org
> /files/etc/ntp.conf/server[3] = 2.ch.pool.ntp.org
> /files/etc/ntp.conf/server[4] = 1.ch.pool.ntp.org
> augtool> match /files/etc/ntp.conf/*[iburst]
> /files/etc/ntp.conf/server[1] = 3.ch.pool.ntp.org
> /files/etc/ntp.conf/server[2] = 0.ch.pool.ntp.org
> /files/etc/ntp.conf/server[3] = 2.ch.pool.ntp.org
> augtool> set /files/etc/ntp.conf/server[4]/iburst
> augtool> match /files/etc/ntp.conf/*[iburst]
> /files/etc/ntp.conf/server[1] = 3.ch.pool.ntp.org
> /files/etc/ntp.conf/server[2] = 0.ch.pool.ntp.org
> /files/etc/ntp.conf/server[3] = 2.ch.pool.ntp.org
> /files/etc/ntp.conf/server[4] = 1.ch.pool.ntp.org
>

The missing ingredient is that you need to create an `iburst` node 
underneath your new server; in augtool something like

ins server before server[1]
set server[1] time.example.com
touch server[1]/iburst
save

The 'touch' will create a node with no content/value, which is exactly what 
the Ntp lens expects to output 'iburst' after the server name. I highly 
recommend dumping the whole tree structure in cases like this with 
something like 'print /files/etc/ntp.conf' in augtool (or using the brand 
new 'augmatch' command line tool, e.g. 'augmatch -a /etc/ntp.conf' ;)

David

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1734d9fa-f13b-4eab-a6f9-52cb4984cf6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to