Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Puppet Cookbook - Third Edition
  • Toc
  • feedback
Puppet Cookbook - Third Edition

Puppet Cookbook - Third Edition

By : Thomas Uphill, John Arundel
5 (2)
close
Puppet Cookbook - Third Edition

Puppet Cookbook - Third Edition

5 (2)
By: Thomas Uphill, John Arundel

Overview of this book

This book is for anyone who builds and administers servers, especially in a web operations context. It requires some experience of Linux systems administration, including familiarity with the command line, file system, and text editing. No programming experience is required.
Table of Contents (12 chapters)
close
11
Index

Editing INI style files with puppetlabs-inifile


INI files are used throughout many systems, Puppet uses INI syntax for the puppet.conf file. The puppetlabs-inifile module creates two types, ini_setting and ini_subsetting, which can be used to edit INI style files.

Getting ready

Install the module from the forge as follows:

t@mylaptop ~ $ puppet module install puppetlabs-inifile
Notice: Preparing to install into /home/tuphill/.puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/tuphill/.puppet/modules
└── puppetlabs-inifile (v1.1.3)

How to do it...

In this example, we will create a /tmp/server.conf file and ensure that the server_true setting is set in that file:

  1. Create an initest.pp manifest with the following contents:

      ini_setting {'server_true':
        path    => '/tmp/server.conf',
        section => 'main',
        setting => 'server',
        value   => 'true',
      }
  2. Apply the manifest:

    t@mylaptop ~/.puppet/manifests...
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete