feat: initial commit
This commit is contained in:
commit
38f495e3f4
457 changed files with 40577 additions and 0 deletions
BIN
environments/production/modules/unifi/files/libssl1.1.deb
Normal file
BIN
environments/production/modules/unifi/files/libssl1.1.deb
Normal file
Binary file not shown.
74
environments/production/modules/unifi/manifests/init.pp
Normal file
74
environments/production/modules/unifi/manifests/init.pp
Normal file
|
@ -0,0 +1,74 @@
|
|||
class unifi {
|
||||
contain unifi::install
|
||||
contain unifi::service
|
||||
}
|
||||
|
||||
class unifi::repos {
|
||||
apt::source { 'unifi':
|
||||
comment => 'UniFi Repo',
|
||||
location => 'https://www.ui.com/downloads/unifi/debian',
|
||||
release => 'stable',
|
||||
repos => 'ubiquiti',
|
||||
key => {
|
||||
'name' => 'unifi.gpg',
|
||||
'source' => 'https://dl.ui.com/unifi/unifi-repo.gpg',
|
||||
},
|
||||
include => {
|
||||
'deb' => true,
|
||||
},
|
||||
}
|
||||
|
||||
apt::source { 'mongodb':
|
||||
comment => 'MongoDB',
|
||||
location => 'http://repo.mongodb.org/apt/debian',
|
||||
release => 'buster/mongodb-org/4.4',
|
||||
repos => 'main',
|
||||
key => {
|
||||
'name' => 'mongodb.asc',
|
||||
'source' => 'https://www.mongodb.org/static/pgp/server-4.4.asc',
|
||||
},
|
||||
include => {
|
||||
'deb' => true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
class unifi::libssl {
|
||||
# From https://archive.ubuntu.com/ubuntu/pool/main/o/openssl/
|
||||
file { '/opt/libssl1.1.deb':
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/unifi/libssl1.1.deb'
|
||||
} ~>
|
||||
package { 'libssl1.1':
|
||||
provider => dpkg,
|
||||
source => "/opt/libssl1.1.deb"
|
||||
}
|
||||
}
|
||||
|
||||
class unifi::install {
|
||||
contain unifi::repos
|
||||
contain unifi::libssl
|
||||
|
||||
|
||||
$mongo = [ 'mongodb-org' ]
|
||||
package { $mongo:
|
||||
ensure => installed
|
||||
}
|
||||
|
||||
$unifi = ['openjdk-17-jre-headless', 'java-common', 'unifi']
|
||||
package { $unifi:
|
||||
ensure => installed
|
||||
}
|
||||
}
|
||||
|
||||
class unifi::service {
|
||||
service { 'mongod':
|
||||
ensure => running,
|
||||
enable => true
|
||||
}
|
||||
|
||||
service { 'unifi':
|
||||
ensure => running,
|
||||
enable => true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue