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
* Removed Ruby 2.1 support as ruby_aem  1.5.0 doesn't support ruby 2.1
  • Loading branch information
mbloch1986 committed Sep 27, 2018
1 parent 25281f1 commit 5f5d21a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion .travis.yml
@@ -1,7 +1,6 @@
sudo: false
language: ruby
rvm:
- "2.1"
- "2.2"
- "2.3"
- "2.4"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,4 +1,6 @@
### 2.3.2
* Fix issue with wait post Deploy package in deploy_packages.pp #41
* Removed Ruby 2.1 support as ruby_aem 1.5.0 doesn't support ruby 2.1
*

### 2.3.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 5f5d21a

Please sign in to comment.