jmkeyes / puppet-gocd

A Puppet module for managing ThoughtWorks GoCD.
https://forge.puppetlabs.com/jmkeyes/gocd
Apache License 2.0
2 stars 5 forks source link

include ::gocd::server doesn't work #5

Open genebean opened 7 years ago

genebean commented 7 years ago

Running puppet apply -e "include ::gocd::server" initially the error

Error: Evaluation Error: Unknown variable: '::gocd::common::manage_daemon_user'. at /etc/puppetlabs/code/environments/production/modules/gocd/manifests/common/user.pp:24:6 on node localhost.localdomain

I manually edited user.pp and changed managed_daemon_user to manage_user and then ran into another error:

Error: Evaluation Error: Error while evaluating a Function Call, validate_re(): input needs to be a String, not a NilClass at /etc/puppetlabs/code/environments/production/modules/gocd/manifests/server/config.pp:26:3 on node localhost.localdomain

It seems the value being referenced is set to undef. This is where I stopped debugging and figured I'd see if you would be willing to take a look. I am trying a simple proof of concept use case via the Vagrantfile below:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "genebean/centos-7-puppet5"
  config.vm.network "forwarded_port", guest: 8153, host: 8153
  config.vm.network "forwarded_port", guest: 8154, host: 8154
  # config.vm.network "private_network", ip: "192.168.33.10"

  config.vm.provider "virtualbox" do |vb|
    # Customize the amount of memory on the VM:
    vb.memory = "2048"
  end

  config.vm.provision "shell", inline: <<-SHELL
    puppet module install jmkeyes-gocd --version 0.0.6
    puppet apply -e "include ::gocd::server"
    puppet apply -e "class { '::gocd::agent': server => 'localhost', }"
  SHELL
end
jmkeyes commented 7 years ago

Thanks for filing a bug report!

It seems there were two issues at play:

I've pushed those fixes to the master branch as the noted commits above.

Please try out the fixes at your earliest convenience.

If they work for you, I'll release a new version of the module to the Forge.