Skip to content

Commit

Permalink
add ignore_failure attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Early authored and Justin Early committed Apr 18, 2016
1 parent 07d011a commit febf1f3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Attributes
* `['al_agents']['agent']['for_imaging']` - The `for_imaging` attribute determines if the agent will be configured and provisioned. If the `for_imaging` attribute is set to `true` then the install process performs an installation of the agent but will not start the agent once installation is completed. This allows for instance snapshots to be saved and started for later use. With this attribute set to `false` then the provisioning process is performed during setup and the agent is started once complete. Boolean defaults to `false`
* `['al_agents']['agent']['egress_url']` - By default all traffic is sent to https://vaporator.alertlogic.com. This attribute is useful if you have a machine that is responsible for outbound traffic (NAT box). If you specify your own URL ensure that it is a properly formatted URI. String defaults to `https://vaporator.alertlogic.com`
* `['al_agents']['agent']['proxy_url']` - By default al-agent does not require the use of a proxy. This attribute is useful if you want to avoid a single point of egress. When a proxy is used, both `['al_agents']['agent']['egress_url']` and `['al_agents']['agent']['proxy_url']` values are required. If you specify a proxy URL ensure that it is a properly formatted URI. String defaults to `nil`
* `['al_agents']['agent']['ignore_failure']` - Ingore installation and configuration errors. Boolean defaults to `false`


Usage
-----
Expand Down
2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

default['al_agents']['package']['name'] = 'al-agent'

default['al_agents']['agent']['ignore_failure'] = false

case node['platform_family']
when 'rhel', 'fedora'
default['al_agents']['agent']['service_name'] = 'al-agent'
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
license 'All rights reserved'
description 'Installs/Configures the Alert Logic Agent'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.2.0'
version '1.3.0'

depends 'selinux_policy'
depends 'rsyslog', '= 2.2.0'
Expand Down
1 change: 1 addition & 0 deletions recipes/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
source cached_package
action :install
version '>=0'
ignore_failure node['al_agents']['agent']['ignore_failure']
provider Chef::Provider::Package::Dpkg if node['platform_family'] == 'debian'
provider Chef::Provider::Package::Rpm if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 6
end
Expand Down
1 change: 1 addition & 0 deletions recipes/provision_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
user 'root'
cwd '/etc/init.d'
command "./al-agent provision #{provision_options}"
ignore_failure node['al_agents']['agent']['ignore_failure']
not_if { ::File.exist?('/var/alertlogic/etc/host_key.pem') }
end

0 comments on commit febf1f3

Please sign in to comment.