augeas with puppet : cannot update line

40 views
Skip to first unread message

cheniour ghassen

unread,
Apr 22, 2014, 12:31:04 PM4/22/14
to puppet...@googlegroups.com
Hi everyone,
I am new in puppet. In fact i am trying to update bind-address in the mysql file '/etc/mysql/my.cnf
i wrote the this code in manifests/nodes.pp


augeas {  'update-bind-address':
    context   => '/files/etc/mysql/my.cnf',
    changes => ['setbind-adress 192.168.80.135'],
}

when i tape the papply command :    puppet ignore this code and do not compile it. I tried other examples by changing the files but puppet keeps ignoring them.
The only example that works is this one

augeas {  'enable-ip-forwarding':
  context   => '/files/etc/sysctl.conf',
  changes => ['set net.ipv4.ip_forward 1'],
}

I really don't know what is going on here. I have quite a while now.
Any help would be apperciated.Thanks.

sincerely,
ghassen Cheniour

Kenton Brede

unread,
Apr 23, 2014, 9:55:05 AM4/23/14
to puppet...@googlegroups.com
First, it looks to me like you have a typo.  I don't have a my.cnf handy ATM but I'd think "setbind-adress" should be "setbind-address."

Second, do you have "augeas-libs" installed on your target system?  The system you wish the changes to be made need "/usr/share/augeas/lenses/dist/*" in place.

I successfully executed your "enable-ip-forwarding" augeas type and it works fine.

Kent  


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f335c2d7-b41f-4d65-9a83-0bdc65ac23dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kent Brede




Reply all
Reply to author
Forward
0 new messages