-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add install_method parameter #104
Conversation
Note to myself, the CentOS6 is failing to start service
The directory is empty. We already have the message on master branch. |
e7f70c2
to
27a9214
Compare
On The acceptance test uses Edit:
The ferm version shipped by debian10 package is 2.4. |
725d1cc
to
bc18180
Compare
manifests/install.pp
Outdated
ensure => absent, | ||
} | ||
|
||
-> package { ['iptables', 'perl', 'make']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least perl and make could be managed by another module, should be use ensure_package here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function ensure_packages() is now used.
b327d8c
to
d9369ba
Compare
manifests/config.pp
Outdated
@@ -10,6 +10,19 @@ | |||
|
|||
$_ip = join($ferm::ip_versions, ' ') | |||
|
|||
if $facts['systemd'] { #fact provided by systemd module | |||
if $ferm::install_method == 'vcsrepo' and $ferm::manage_service { | |||
include systemd::systemctl::daemon_reload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't required. systemd::dropin_file does the notify:
https://github.com/camptocamp/puppet-systemd/blob/master/manifests/dropin_file.pp#L93-L103
manifests/init.pp
Outdated
@@ -67,6 +70,9 @@ | |||
Hash $chains = {}, | |||
Array[Enum['ip','ip6']] $ip_versions = ['ip','ip6'], | |||
Hash[String[1],Array[String[1]]] $preserve_chains_in_tables = {}, | |||
Enum['package','vcsrepo'] $install_method = 'package', | |||
String $vcsrepo = 'https://github.com/MaxKellermann/ferm.git', | |||
String $vcstag = 'v2.5.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String $vcstag = 'v2.5.1', | |
String[1] $vcstag = 'v2.5.1', |
manifests/init.pp
Outdated
@@ -67,6 +70,9 @@ | |||
Hash $chains = {}, | |||
Array[Enum['ip','ip6']] $ip_versions = ['ip','ip6'], | |||
Hash[String[1],Array[String[1]]] $preserve_chains_in_tables = {}, | |||
Enum['package','vcsrepo'] $install_method = 'package', | |||
String $vcsrepo = 'https://github.com/MaxKellermann/ferm.git', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String $vcsrepo = 'https://github.com/MaxKellermann/ferm.git', | |
Stdlib::HTTPSUrl $vcsrepo = 'https://github.com/MaxKellermann/ferm.git', |
manifests/install.pp
Outdated
} | ||
'vcsrepo': { | ||
$_source_path = '/opt/ferm' | ||
ensure_packages (['iptables', 'perl', 'make'], { ensure => present }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't git
also a requirement that should be installed?
@@ -43,12 +53,36 @@ class { 'ferm': | |||
}, | |||
}, | |||
ip_versions => ['ip'], #only ipv4 available with CI | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you delete this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to factorize the manifest and add at this end some parameters or not
d9369ba
to
7605632
Compare
spec/spec_helper_acceptance.rb
Outdated
@@ -2,4 +2,5 @@ | |||
|
|||
configure_beaker do |host| | |||
install_package(host, 'epel-release') if fact_on(host, 'os.name') == 'CentOS' | |||
install_package(host, 'git') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't required anymore since we now manage the git package.
48bbd6b
to
007a9bd
Compare
@bastelfreak thank you for the review |
Dear @Dan33l, thanks for the PR! This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs? |
Pull Request (PR) description
This PR add parameter
install_method
that permits to choose betweenpackage
andvcsrepo
. This permit to install more recent version offerm
when desired.This Pull Request (PR) fixes the following issues
Fixes #103