-
Notifications
You must be signed in to change notification settings - Fork 1
enable band / panels plugin for puppet #78
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# TODO: probably should move this file into its own puppet module | ||
# TODO: need to make config handling more generic, this should work with ANY plugin | ||
|
||
class uber::plugin_bands ( | ||
$git_repo = "https://github.com/magfest/bands", | ||
$git_branch = "master", | ||
$stage_agreement_deadline = undef, | ||
) { | ||
uber::repo { "${uber::plugins_dir}/bands": | ||
source => $git_repo, | ||
revision => $git_branch, | ||
require => File["${uber::plugins_dir}"], | ||
} | ||
|
||
file { "${uber::plugins_dir}/bands/development.ini": | ||
ensure => present, | ||
mode => 660, | ||
content => template('uber/bands-development.ini.erb'), | ||
require => [ Uber::Repo["${uber::plugins_dir}/bands"] ], | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# TODO: probably should move this file into its own puppet module | ||
# TODO: need to make config handling more generic, this should work with ANY plugin | ||
|
||
class uber::plugin_panels ( | ||
$git_repo = "https://github.com/magfest/panels", | ||
$git_branch = "master", | ||
$hide_schedule = true, | ||
$expected_response = undef, | ||
$event_location = undef, | ||
$panel_rooms = undef, | ||
$panel_app_deadline = undef, | ||
) { | ||
uber::repo { "${uber::plugins_dir}/panels": | ||
source => $git_repo, | ||
revision => $git_branch, | ||
require => File["${uber::plugins_dir}"], | ||
} | ||
|
||
file { "${uber::plugins_dir}/panels/development.ini": | ||
ensure => present, | ||
mode => 660, | ||
content => template('uber/panels-development.ini.erb'), | ||
require => [ Uber::Repo["${uber::plugins_dir}/panels"] ], | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# THIS FILE IS GENERATED BY PUPPET | ||
# DO NOT EDIT DIRECTLY, INSTEAD EDIT THE .erb template | ||
|
||
|
||
|
||
[dates] | ||
<% if @stage_agreement_deadline %> | ||
stage_agreement_deadline = <%= @stage_agreement_deadline %> | ||
<% end -%> | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# THIS FILE IS GENERATED BY PUPPET | ||
# DO NOT EDIT DIRECTLY, INSTEAD EDIT THE .erb template | ||
|
||
<% if @hide_schedule %> | ||
hide_schedule = <%= @hide_schedule %> | ||
<% end -%> | ||
|
||
<% if @expected_response %> | ||
expected_response = "<%= @expected_response %>" | ||
<% end -%> | ||
|
||
<% if @event_location %> | ||
event_location = "<%= @event_location %>" | ||
<% end -%> | ||
|
||
<% if @panel_rooms %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this work as intended? Keeping in mind that, according to a quick Google search, our empty list is not considered falsey in Ruby. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, it ends up generating the following line in the INI file because our empty list is truthy in ruby: puppet config for magstock says:
INI looks like:
If puppet doesn't specify anything, puppet's deftault is 'undef' which means that the configspec.ini value for panel_rooms of |
||
panel_rooms = <%= @panel_rooms %> | ||
<% end -%> | ||
|
||
<% if @panel_app_deadline %> | ||
[dates] | ||
panel_app_deadline = "<%= @panel_app_deadline %>" | ||
<% end -%> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same deal, there's a lot more to add here to get this working, but it's a good starting point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a lot more to add here to get this working, but it's a good starting point