Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
erwbgy edited this page Mar 28, 2013 · 2 revisions

augeas

The system::augeas class allows you to apply changes to files using the augeas tool. This enables simple configuration file changes to be made without writing new classes.

Hiera YAML examples

Example 1:

system::augeas:
  'ntp':
    context: '/files/etc/ntp.conf'
    changes:
      - 'set server[1] 0.uk.pool.ntp.org'
      - 'set server[2] 1.uk.pool.ntp.org'
      - 'set server[3] 2.uk.pool.ntp.org'

Example 2:

system::augeas:
  'test1':
    context: '/files/etc/sysconfig/firstboot'
    changes:
      - 'set RUN_FIRSTBOOT YES'
    onlyif:  'match other_value size > 0'

Example 3:

system::augeas:
  'jboss_conf':
    context: '/files'
    changes:
      - 'set etc/jbossas/jbossas.conf/JBOSS_IP $ipaddress'
      - 'set etc/jbossas/jbossas.conf/JAVA_HOME /usr'
    load_path: '/usr/share/jbossas/lenses'

Defaults

  • ensure: present
  • user: root
Clone this wiki locally