Skip to content

Commit

Permalink
Fix issue with post waiting for deploy packages shinesolutions#41
Browse files Browse the repository at this point in the history
* Fix issue with wait post Deploy package in deploy_packages.pp shinesolutions#41
  • Loading branch information
mbloch1986 committed Sep 27, 2018
1 parent 1c280f8 commit 75bb23c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,4 +1,5 @@
### 3.1.2
* Fix issue with wait post Deploy package in deploy_packages.pp #41
*

### 3.1.1
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/aem_aem/aem.rb
Expand Up @@ -73,6 +73,7 @@ def list_packages_by_groups(package_groups)
packages = result.data
packages.each do |package|
next unless (package_groups.include? package['group']) || package_groups.empty?

puts '========================================================================'
package.each do |key, value|
puts "#{key}: #{value}"
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/provider/aem_path/aem.rb
Expand Up @@ -23,13 +23,15 @@ def activate

def destroy
return false if resource[:path].eql? nil

path = resource[:path]
client(resource).path(resource[:name]).delete(path)
end

# Existence check true unless a path is defined
def exists?
return true if resource[:path].eql? nil

path = client(resource).node(resource[:path], resource[:name])
path.exists.data
end
Expand Down
9 changes: 4 additions & 5 deletions manifests/deploy_packages.pp
@@ -1,6 +1,6 @@
define aem_resources::deploy_packages (
$packages,
$path = '/tmp/shinesolutions/puppet-aem-resources',
$path = '/tmp/shinesolutions/puppet-aem-resources',
$sleep_seconds = 10,
$aem_id = undef,
$aem_username = undef,
Expand Down Expand Up @@ -33,10 +33,9 @@
aem_password => $aem_password,
aem_id => $_aem_id,
} -> exec { "[${_aem_id}] Wait post Deploy package ${package['group']}/${package['name']}-${package['version']}":
command => "sleep ${final_sleep_seconds}",
path => ['/usr/bin', '/usr/sbin', '/bin'],
timeout => 0,
refreshonly => true,
command => "sleep ${final_sleep_seconds}",
path => ['/usr/bin', '/usr/sbin', '/bin'],
timeout => 0
}

aem_aem { "[${_aem_id}] Wait until login page is ready post Deploy package ${package['group']}/${package['name']}-${package['version']}":
Expand Down

0 comments on commit 75bb23c

Please sign in to comment.