nginx - Augeas in Puppet for mysql config failing -


i'm developing basic puppet manifests , modules install application dependencies after server has been deployed. it's suite of basic stuff: -

  • os -> ubuntu 14.04 lts
  • nginx
  • php5-fpm
  • mysql

simple, right?

everything going pretty part; until stumbled upon ability use augeas update config files custom config items. i've set php config items without problems, such:

augeas { 'php.ini':     require => [         package['php5-fpm'],         package['libaugeas-ruby'],     ],     notify => service['php5-fpm'],     context => '/files/etc/php5/fpm/php.ini',     changes => [         'set php/cgi.fix_pathinfo 0',     ], } 

this works fine. no issues @ all.

however, i've come mysql config file, i'm using following (which copy , paste job)

augeas { 'my.cnf':     require => [         package['mysql-server'],         package['libaugeas-ruby'],     ],     notify => service['mysql'],     context => '/files/etc/mysql/my.cnf',     changes => [         'set mysqld/bind-address 0.0.0.0',     ], } 

unfortunately, isn't working. looked @ augeas documentation regarding lenses ships with, , no issues. following initial output puppet apply command.

error: /stage[main]/mysql/augeas[my.cnf]: not evaluate: save failed return code false, see debug 

the next logical step was, of course, @ debug information. following information in it.

debug: augeas[my.cnf](provider=augeas): sending command 'set' params ["/files/etc/mysql/my.cnf/mysqld/bind-address", "0.0.0.0"] debug: augeas[my.cnf](provider=augeas): put failed on 1 or more files, output /augeas//error: debug: augeas[my.cnf](provider=augeas): /augeas/files/etc/mysql/my.cnf/error = put_failed debug: augeas[my.cnf](provider=augeas): /augeas/files/etc/mysql/my.cnf/error/path = /files/etc/mysql/my.cnf debug: augeas[my.cnf](provider=augeas): /augeas/files/etc/mysql/my.cnf/error/lens = /usr/share/augeas/lenses/dist/mysql.aug:39.13-.60: debug: augeas[my.cnf](provider=augeas): /augeas/files/etc/mysql/my.cnf/error/message = failed match 

okay, i've managed happening; without understanding what's going on.

prior asking question above, checked on stock lenses available, , saw both php , mysql lenses in list @ http://augeas.net/stock_lenses.html

neither of links work should taking through documentation - so, knowing php lens worked in 'set section/setting value' type of way, assuming it's same mysql lens.

not case. following syntax worked me.

augeas { 'my.cnf':     require => [         package['mysql-server'],         package['libaugeas-ruby'],     ],     notify => service['mysql'],     context => '/files/etc/mysql/my.cnf',     changes => [         "set target[.='mysqld']/bind-address 0.0.0.0",     ], } 

the following 2 resources found information. if has other documentation can point me to, i'd more grateful.

this gave me idea of syntax should be: - https://www.adammalone.net/post/playing-augeas-fun-and-profit#.vxaey1yqpbc

and lines 62-65 of script reaffirmed me: - https://github.com/example42/puppet-mysql/blob/master/manifests/augeas.pp


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -