diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a0de9a..8906040 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ cookbook-pmacct CHANGELOG =============== +## 1.1.0 + + - Miguel Negrón + - [124a6b3] Merge pull request #16 from redBorder/bugfix/#18169_rename_pmacctd_to_sfacctd_service + ## 1.0.0 - Miguel Negrón diff --git a/resources/metadata.rb b/resources/metadata.rb index a65bdbf..b71ed8f 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -3,4 +3,4 @@ maintainer_email 'git@redborder.com' license 'AGPL-3.0' description 'Installs/Configures cookbook-pmacct' -version '1.0.0' +version '1.1.0' diff --git a/resources/providers/config.rb b/resources/providers/config.rb index 541cc44..b840efe 100644 --- a/resources/providers/config.rb +++ b/resources/providers/config.rb @@ -10,6 +10,7 @@ kafka_topic = new_resource.kafka_topic kafka_broker_port = new_resource.kafka_broker_port geo_country = new_resource.geo_country + sfacctd_ip = new_resource.sfacctd_ip dnf_package 'pmacct' do action :upgrade @@ -41,7 +42,8 @@ kafka_hosts: kafka_hosts, kafka_topic: kafka_topic, kafka_broker_port: kafka_broker_port, - geo_country: geo_country) + geo_country: geo_country, + sfacctd_ip: sfacctd_ip) notifies :restart, 'service[sfacctd]', :delayed unless node['redborder']['leader_configuring'] end diff --git a/resources/resources/config.rb b/resources/resources/config.rb index 48272a4..af6e4da 100644 --- a/resources/resources/config.rb +++ b/resources/resources/config.rb @@ -11,3 +11,4 @@ attribute :kafka_topic, kind_of: String, default: 'sflow' attribute :kafka_broker_port, kind_of: Integer, default: 9092 attribute :geo_country, kind_of: String, default: '/usr/share/GeoIP/GeoLiteCountry.dat' +attribute :sfacctd_ip, kind_of: String diff --git a/resources/templates/default/sfacctd.conf.erb b/resources/templates/default/sfacctd.conf.erb index f67df2a..4c18852 100644 --- a/resources/templates/default/sfacctd.conf.erb +++ b/resources/templates/default/sfacctd.conf.erb @@ -41,7 +41,7 @@ geoipv2_file: <%=@geo_country %> sfacctd_time_new: true sfacctd_account_options: true sfacctd_port: 6343 -sfacctd_ip: <%= "#{node["ipaddress"]}" %> +sfacctd_ip: <%= "#{@sfacctd_ip}" %> sfprobe_direction: tag