comparison manifests/templates.pp @ 247:308f69ca988c

Add config for new server Includes differences in CentOS 8, new host, and IPv4/6
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Dec 2019 14:30:50 -0500
parents c3fa3d65aa83
children e9323ff8f451
comparison
equal deleted inserted replaced
246:c3fa3d65aa83 247:308f69ca988c
164 require => Package['bind'], 164 require => Package['bind'],
165 } 165 }
166 166
167 file { '/etc/named.conf': 167 file { '/etc/named.conf':
168 ensure => present, 168 ensure => present,
169 source => 'puppet:///common/named.conf', 169 source => [
170 "puppet:///common/named.conf-${::hostname}",
171 "puppet:///common/named.conf",
172 ],
170 group => 'named', 173 group => 'named',
171 require => Package['bind'], 174 require => Package['bind'],
172 notify => Service['named'], 175 notify => Service['named'],
173 } 176 }
174 177
178 dns=none", 181 dns=none",
179 } 182 }
180 183
181 file { '/etc/sysconfig/named': 184 file { '/etc/sysconfig/named':
182 ensure => present, 185 ensure => present,
183 content => 'OPTIONS="-4"', 186 source => [
187 "puppet:///common/sysconfig-named-${::hostname}",
188 "puppet:///common/sysconfig-named",
189 ],
184 require => Package['bind'], 190 require => Package['bind'],
185 } 191 }
186 192
187 file { '/etc/resolv.conf': 193 file { '/etc/resolv.conf':
188 ensure => present, 194 ensure => present,
203 } 209 }
204 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6': 210 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6':
205 ensure => present, 211 ensure => present,
206 source => 'puppet:///common/RPM-GPG-KEY-EPEL-6' 212 source => 'puppet:///common/RPM-GPG-KEY-EPEL-6'
207 } 213 }
208 yumrepo { 'ibboard': 214 if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '7') >= 0 and versioncmp($operatingsystemrelease, '8') < 0 {
209 baseurl => 'https://download.opensuse.org/repositories/home:/IBBoard:/server/CentOS_$releasever/', 215 # We only have extra packages for CentOS 7
210 descr => 'Extra packages from IBBoard', 216 yumrepo { 'ibboard':
211 enabled => 1, 217 baseurl => 'https://download.opensuse.org/repositories/home:/IBBoard:/server/CentOS_$releasever/',
212 gpgcheck => 1, 218 descr => 'Extra packages from IBBoard',
213 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ibboard', 219 enabled => 1,
214 } 220 gpgcheck => 1,
215 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-ibboard': 221 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ibboard',
216 ensure => present, 222 }
217 source => 'puppet:///common/RPM-GPG-KEY-ibboard' 223 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-ibboard':
224 ensure => present,
225 source => 'puppet:///common/RPM-GPG-KEY-ibboard'
226 }
218 } 227 }
219 yumrepo { 'webtatic': 228 yumrepo { 'webtatic':
220 ensure => absent, 229 ensure => absent,
221 } 230 }
222 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy': 231 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy':
414 default_extra_tlds => [ 'com' ], 423 default_extra_tlds => [ 'com' ],
415 } 424 }
416 425
417 # Use Remi's PHP 7.3 for now - 7.4 is still VERY new 426 # Use Remi's PHP 7.3 for now - 7.4 is still VERY new
418 $php_suffix = '' 427 $php_suffix = ''
419 yumrepo { 'remirepo-safe': 428 if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0 {
420 mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/safe/mirror', 429 yumrepo { 'remirepo-safe':
421 descr => "Extra CentOS packages from Remi", 430 mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/safe/$basearch/mirror',
422 enabled => 1, 431 descr => "Extra CentOS packages from Remi",
423 failovermethod => 'priority', 432 enabled => 1,
424 gpgcheck => 1, 433 failovermethod => 'priority',
425 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', 434 gpgcheck => 1,
426 } 435 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi',
427 yumrepo { 'remirepo-php': 436 }
428 mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/php73/mirror', 437 yumrepo { 'remirepo-php':
429 descr => "PHP7.3 for CentOS from Remi", 438 mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/php73/$basearch/mirror',
430 enabled => 1, 439 descr => "PHP7.3 for CentOS from Remi",
431 failovermethod => 'priority', 440 enabled => 1,
432 gpgcheck => 1, 441 failovermethod => 'priority',
433 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', 442 gpgcheck => 1,
443 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi',
444 }
445 } else {
446 yumrepo { 'remirepo-safe':
447 mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/safe/mirror',
448 descr => "Extra CentOS packages from Remi",
449 enabled => 1,
450 failovermethod => 'priority',
451 gpgcheck => 1,
452 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi',
453 }
454 yumrepo { 'remirepo-php':
455 mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/php73/mirror',
456 descr => "PHP7.3 for CentOS from Remi",
457 enabled => 1,
458 failovermethod => 'priority',
459 gpgcheck => 1,
460 gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi',
461 }
434 } 462 }
435 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-remi': 463 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-remi':
436 ensure => present, 464 ensure => present,
437 source => 'puppet:///common/RPM-GPG-KEY-remi', 465 source => 'puppet:///common/RPM-GPG-KEY-remi',
438 before => YumRepo['remirepo-php'], 466 before => YumRepo['remirepo-php'],
475 } 503 }
476 } 504 }
477 505
478 class ibboardvpsnode ( 506 class ibboardvpsnode (
479 $primary_ip, 507 $primary_ip,
480 $secondary_ip, 508 $secondary_ip = $primary_ip,
481 $mailserver, 509 $mailserver,
482 $imapserver, 510 $imapserver,
483 $firewall_cmd = 'iptables', 511 $firewall_cmd = 'iptables',
484 ){ 512 ){
485 class { 'basevpsnode': 513 class { 'basevpsnode':