Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require poise explicitly #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
5 changes: 3 additions & 2 deletions libraries/rundeck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'poise'
class Chef
class Resource::Rundeck < Resource
include Poise(container: true)
Expand All @@ -27,6 +27,7 @@ class Resource::Rundeck < Resource
attribute(:version, kind_of: String, default: lazy { node['rundeck']['version'] })
attribute(:launcher_url, kind_of: String, default: lazy { node['rundeck']['launcher_url'] })
attribute(:service_name, kind_of: String, default: 'rundeck')
attribute(:use_runit, equal_to: [true, false], default: true)
# Paths
attribute(:path, kind_of: String, default: lazy { node['rundeck']['path'] })
attribute(:config_path, kind_of: String, default: lazy { node['rundeck']['config_path'] })
Expand Down Expand Up @@ -98,7 +99,7 @@ def action_install
create_cli_user if new_resource.create_cli_user
write_configs
write_ssh_key if new_resource.ssh_key
configure_service
configure_service if new_resource.use_runit
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions libraries/rundeck_node_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Resource::RundeckNodeSourceFile < Resource::RundeckNodeSource
attribute(:username, kind_of: String, default: lazy { parent.parent.ssh_user })
attribute(:manual_nodes, kind_of: Array, default: [])

provides(:rundeck_node_source_file)

def path
::File.join(parent.project_path, 'etc', 'resources.xml')
end
Expand Down Expand Up @@ -82,6 +84,8 @@ def nodes
end

class Provider::RundeckNodeSourceFile < Provider::RundeckNodeSource
provides(:rundeck_node_source_file)

def action_enable
converge_by("write resources.xml for Rundeck project #{new_resource.parent.project_name}") do
notifying_block do
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

name 'rundeck'
version '99.1.26'
version '99.1.27'

maintainer 'Noah Kantrowitz'
maintainer_email '[email protected]'
Expand Down