On 03/06/10 14:53, Robin Bowes wrote:
> On 03/06/10 13:47, Lee Hambley wrote:
>> I only closed the ticket as there was no interest… I'll try to take care
>> of this (and some other minor things) today.
>
> I thought I could just patch my rpm but it's not as easy as I thought as
> the rpm uses a gem not a tarball. So, it would be great if you could add
> this to core.
One possible further refinement...
Summary:
With the patch, I have to initialise the roles something like this:
task :enum_account, :roles => [:puppet_masters] do
desc "Enumerate hosts that are account servers from puppet DB"
role(:account, {})
end
I'd prefer that the role is initialised to be empty by default.
Details:
I am using the multistage extension, and have two stages - prod and dev.
In prod, I do something like this to list account servers:
task :enum_account, :roles => [:puppet_masters] do
desc "Enumerate hosts that are account servers from puppet DB"
cmd = 'sc_hosts.rb --class profile::account'
capture(cmd).each do |host|
next unless host.chomp
role(:account, host)
role(:web, host)
end
end
The list of hosts comes from our puppetmaster server.
In dev, I override this with something like this:
task :enum_account, :roles => [:puppet_masters] do
desc "Enumerate hosts that are account servers from puppet DB"
role(:account, {})
end
ie. don't deploy to any account servers in dev.
I'd prefer that I didn't have to explicitly define :account as empty.
R.
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en