Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 2.65 KB

configuration.md

File metadata and controls

52 lines (34 loc) · 2.65 KB

Configuration

octocatalog-diff may require configuration to work correctly with your Puppet setup.

  1. Download the sample configuration file and save it into one of the following directories.

    • In the base directory of your Puppet repository checkout (i.e., your current working directory):

      .octocatalog-diff.cfg.rb
      
    • In your home directory:

      $HOME/.octocatalog-diff.cfg.rb
      
    • In one of the following system locations:

      /usr/local/etc/octocatalog-diff.cfg.rb
      /opt/puppetlabs/octocatalog-diff/octocatalog-diff.cfg.rb
      /etc/octocatalog-diff.cfg.rb
      

    Note: If more than one of the above files is present, the first one found will be used (proceeding from top to bottom in that list). If you set an environment variable OCTOCATALOG_DIFF_CONFIG_FILE that will supersede all of the above paths, and allow you to specify the configuration file location however you wish.

  2. Open the file in a text editor, and follow the comments within the file to guide yourself through configuration. The configuration file is pure ruby, allowing substantial flexibility in the configuration.

    To be minimally functional, you will almost certainly need to define at least the following settings:

    • settings[:hiera_config] as the absolute or relative path to your hiera configuration file
    • settings[:hiera_path_strip] as the prefix to strip when munging the hiera configuration file
    • settings[:puppetdb_url] as the URL to your PuppetDB instance so facts can be obtained

    For more information on these settings:

  3. Test the configuration, which will indicate the location of the configuration file and validate the contents thereof.

    octocatalog-diff --config-test
    

    Note: If you installed octocatalog-diff as a gem, the octocatalog-diff binary should be in your $PATH and the above command should work correctly. If you installed in a different way, you may need to provide the full path to where the octocatalog-diff binary was actually installed.

Now that you have entered your configuration and confirmed proper reading of your configuration file, proceed to Basic usage to see if it works!