Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Then you will need to make add an environment that uses the Puppet provisioner t

--puppet-hieradata - The name of the tarball containing a hiera.yaml file and hieradata directory. This option requires Puppet >= 3.1.')

--puppet-install-puppet - Specify if puppet provisioner should install puppet and hiera. Default is "true".

--puppet-install-cmd - The command to use to install Puppet. The native package manager will be used by default.

--puppet-hiera-install-cmd - The command to use to install Hiera. Gem will be used by default.
Expand All @@ -68,6 +70,13 @@ sudo aminate -B ami-35792c5c --puppet-master=puppet-master.domain.com some-host.

Puppet will use the specified hostname to try to talk to the Puppet Master server and generate certs with the name in the last argument.

### Master specified, don't attempt to install puppet or hiera

```
sudo aminate -B ami-35792c5c --puppet-master=puppet-master.domain.com --puppet-install-puppet=false some-host.domain.com
```

Puppet will use the specified hostname to try to talk to the Puppet Master server and generate certs with the name in the last argument. Puppet provisioner will not attempt to install OS packages for puppet or hiera, but will assume they are already installed.

## Usage Masterless

Expand Down
11 changes: 9 additions & 2 deletions aminatorplugins/provisioner/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def add_plugin_args(self):
action=conf_action(self._config.plugins[self.full_name]),
help='The name of the tarball containing a hiera.yaml file and hieradata directory. This option requires Puppet >= 3.1.')

puppet_config.add_argument('--puppet-install-puppet', dest='puppet_install_puppet',
action=conf_action(self._config.plugins[self.full_name]),
help='Specify if puppet provisioner should install puppet and hiera. Default is "true".')

puppet_config.add_argument('--puppet-install-cmd', dest='puppet_install_cmd',
action=conf_action(self._config.plugins[self.full_name]),
help='The command to use to install Puppet. The native package manager will be used by default.')
Expand All @@ -101,7 +105,7 @@ def provision(self):
overrides the base provision
* generate certificates
* install the certificates on the target volume
* install puppet on the target volume
* install puppet on the target volume (if puppet_install_puppet is true)
* run the puppet agent in the target chroot environment
"""

Expand All @@ -125,7 +129,10 @@ def provision(self):
log.debug('Entering chroot at {0}'.format(self._distro._mountpoint))
with Chroot(self._distro._mountpoint):

self._install_puppet()
puppet_install_puppet = self._get_config_value('puppet_install_puppet', 'true')

if puppet_install_puppet == "true":
self._install_puppet()

puppet_args = self._get_config_value('puppet_args', '' )

Expand Down