File tree Expand file tree Collapse file tree 3 files changed +56
-2
lines changed
Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 5555 }
5656 } elsif $::operatingsystem == ' Archlinux' {
5757 $init_style = ' systemd'
58- } elsif $::operatingsystem == ' SLES' {
59- $init_style = ' sles'
58+ } elsif $::operatingsystem == ' OpenSuSE' {
59+ $init_style = ' systemd'
60+ } elsif $::operatingsystem =~ /SLE[SD]/ {
61+ if versioncmp($::operatingsystemrelease , ' 12.0' ) < 0 {
62+ $init_style = ' sles'
63+ } else {
64+ $init_style = ' systemd'
65+ }
6066 } elsif $::operatingsystem == ' Darwin' {
6167 $init_style = ' launchd'
6268 } elsif $::operatingsystem == ' Amazon' {
Original file line number Diff line number Diff line change 7777 " 20" ,
7878 " 21"
7979 ]
80+ },
81+ {
82+ "operatingsystem" : " OpenSuSE" ,
83+ "operatingsystemrelease" : [
84+ " 13.1" ,
85+ " 13.2"
86+ ]
87+ },
88+ {
89+ "operatingsystem" : " SLES" ,
90+ "operatingsystemrelease" : [
91+ " 11.4" ,
92+ " 12.0"
93+ ]
94+ },
95+ {
96+ "operatingsystem" : " SLED" ,
97+ "operatingsystemrelease" : [
98+ " 11.4" ,
99+ " 12.0"
100+ ]
80101 }
81102 ]
82103}
Original file line number Diff line number Diff line change 690690 it { should contain_class ( 'consul' ) . with_init_style ( 'debian' ) }
691691 end
692692
693+ context "On opensuse" do
694+ let ( :facts ) { {
695+ :operatingsystem => 'OpenSuSE' ,
696+ :operatingsystemrelease => '13.1'
697+ } }
698+
699+ it { should contain_class ( 'consul' ) . with_init_style ( 'systemd' ) }
700+ end
701+
702+ context "On SLED" do
703+ let ( :facts ) { {
704+ :operatingsystem => 'SLED' ,
705+ :operatingsystemrelease => '11.4'
706+ } }
707+
708+ it { should contain_class ( 'consul' ) . with_init_style ( 'sles' ) }
709+ end
710+
711+ context "On SLES" do
712+ let ( :facts ) { {
713+ :operatingsystem => 'SLES' ,
714+ :operatingsystemrelease => '12.0'
715+ } }
716+
717+ it { should contain_class ( 'consul' ) . with_init_style ( 'systemd' ) }
718+ end
719+
693720 # Config Stuff
694721 context "With extra_options" do
695722 let ( :params ) { {
You can’t perform that action at this time.
0 commit comments