Skip to content
Snippets Groups Projects
Commit 919d8c3b authored by Nils Olof Paulsson's avatar Nils Olof Paulsson
Browse files

addpackages

parent e572373a
No related branches found
No related tags found
1 merge request!1Devel
Pipeline #105274 failed
......@@ -7,37 +7,14 @@
class omni (
) {
include profiles::letsencrypt
include postgresql::server
package { 'python39':
ensure => 'installed',
}
include omni::nginx
include omni::postgres
firewalld_service { 'Allow SSH in the liu zone':
ensure => present,
zone => 'liu',
service => 'ssh',
}
firewalld_service { 'Allow http in the liu Zone':
ensure => present,
zone => 'liu',
service => 'http',
}
firewalld_service { 'Allow https in the liu Zone':
ensure => present,
zone => 'liu',
service => 'https',
}
firewalld_service { 'Allow http in the public Zone':
ensure => present,
zone => 'public',
service => 'http',
}
firewalld_service { 'Allow https in the public Zone':
ensure => present,
zone => 'public',
service => 'https',
}
users::liu_user { 'mange61':
commonname => 'Måns Gezelius',
......
# remark
class omni::js( ) {
package { 'nodejs':
ensure => 'installed',
notify => Exec['yarn'],
}
exec { 'yarn':
command => 'npm install --global yarn',
path => ['/bin', '/usr/bin'],
refreshonly => true,
}
}
# intelligent comment here
class omni::nginx( ) {
package { 'nginx':
ensure => 'installed',
}
# inserf conf. files here
service { 'nginx':
enable => true,
ensure => 'running',
}
firewalld_service { 'Allow http in the liu Zone':
ensure => present,
zone => 'liu',
service => 'http',
}
firewalld_service { 'Allow https in the liu Zone':
ensure => present,
zone => 'liu',
service => 'https',
}
firewalld_service { 'Allow http in the public Zone':
ensure => present,
zone => 'public',
service => 'http',
}
firewalld_service { 'Allow https in the public Zone':
ensure => present,
zone => 'public',
service => 'https',
}
}
# Comment
class omni::postgres( ) {
$passwd = 'quetzalcoatl'
include postgresql::server
postgresql::server::db {
default:
encoding => 'UTF8',
locale => 'en_US.UTF-8';
'omni':
user => 'omni',
password => postgresql::postgresql_password('omni', $passwd);
}
postgresql::server::role { 'admin':
createrole => true,
superuser => true,
password_hash => postgresql::postgresql_password('admin', $passwd),
}
postgresql::server::database_grant { 'omni':
privilege => 'ALL',
db => 'omni',
role => 'admin',
}
}
# well ...
class omni::python( ) {
package { 'python3':
ensure => 'installed',
}
package { 'python3-gunicorn':
ensure => 'installed',
require => 'package['python3'],
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment