Satellite 6.6 Puppet & r10k

Posted on


Table of contents

  • Background {#Background}
  • Version Information {#header}
  • Installing r10k {#header}


The use of r10k with Satellite's packaged Puppet deployment was first documented on Using r10k with Red Hat Satellite 6. Things have changed since the post was written. For instance, the default configuration directory is no longer /etc/puppet. The new default configuration location is /etc/puppetlabs. Also, Puppet now operates out of the /opt/puppetlabs directory.

The goal of this document is to provide some guidance on how to utilize r10k with the newer version of Puppet bundled with Satellite 6.6.

Create control repo using instructions found here:

Version Info
This document was crafted while working with Satellite 6.6.0, gem and r10k 3.3.3

Install r10k

/opt/puppetlabs/puppet/bin/gem install r10k

Prepare directories

mkdir -p {/etc/puppetlabs/code/environments_r10k,/etc/puppetlabs/r10k/.ssh}

Generate key-pair

ssh-keygen -t rsa -b 4096 -C ""
  Enter file in which to save the key (/root/.ssh/id_rsa): /etc/puppetlabs/r10k/.ssh/id_rsa
  Enter passphrase (empty for no passphrase):
  Enter same passphrase again:

SSH config on Satellite server
Add the following content to /root/.ssh/config

 IdentityFile /etc/puppetlabs/r10k/.ssh/id_rsa
 User git

Configure r10k
Add the following content to /etc/puppetlabs/r10k/r10k.pp

# The location to use for storing cached Git repos
:cachedir: '/var/cache/r10k'

# A list of git repositories to create
  # This will clone the git repository and instantiate an environment per
  # branch in /etc/puppetlabs/code/environments
    remote: ''
    basedir: '/etc/puppetlabs/code/environments_r10k'
    remote: ''
    basedir: '/etc/puppetlabs/code/environments_r10k'