Skip to content

Commit

Permalink
Release 1.0.0 (#8)
Browse files Browse the repository at this point in the history
* bugfix/#18863/Remove default license of GeoIP and add a Setting to manualy install the license (#7)

* Redmine Bugfix #18863: Get geoip license from settings

* Bump and changelog

* Redmine Bugfix #18863: Added license key check when executing when installing the manager

* Redmine Bugfix #18863: Added condition to geoipupdate when installing

* Use license_key instead of node

* reverse changelog update and metadata version

* Add user_id

---------

Co-authored-by: Miguel Negron <manegron@redborder.com>

* Bump version

---------

Co-authored-by: ptorresred <ptorres@redborder.com>
  • Loading branch information
manegron and ptorresred authored Oct 19, 2024
1 parent a8031ae commit f81685d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cookbook-geoip CHANGELOG
===============

## 1.0.0

- ptorresred
- [01f22cc] bugfix/#18863/Remove default license of GeoIP and add a Setting to manualy install the license (#7)

## 0.0.4

- Miguel Negrón
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures cookbook-geoip'
version '0.0.4'
version '1.0.0'
2 changes: 2 additions & 0 deletions resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
action :add do
user_id = new_resource.user_id
license_key = new_resource.license_key

begin
%w(GeoIP GeoIP-GeoLite-data GeoIP-GeoLite-data-extra geoipupdate geoipupdate-cron).each do |pack|
dnf_package pack do
Expand All @@ -16,6 +17,7 @@
command 'geoipupdate'
ignore_failure true
action :nothing
not_if { user_id.nil? || user_id.empty? || license_key.nil? || license_key.empty? }
end

template '/etc/GeoIP.conf' do
Expand Down
6 changes: 2 additions & 4 deletions resources/resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
actions :add, :remove
default_action :add

attribute :user_id, kind_of: Integer, default: 712324

# TODO: Get rid of this hardcode license
attribute :license_key, kind_of: String, default: 'WCr9s2QoEPWz'
attribute :user_id, kind_of: String
attribute :license_key, kind_of: String

0 comments on commit f81685d

Please sign in to comment.