diff --git a/.devcontainer/README.md b/.devcontainer/README.md index cc4675e5ddb912f2284a6741ec440ed812730d37..a719361689897b67e53c12da1c50e68c5b8c7dc8 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -13,14 +13,18 @@ https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/pupp // Set *default* container specific settings.json values on container create. "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "terminal.integrated.profiles.linux": { + "bash": { + "path": "bash", + } + } }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "puppet.puppet-vscode", "rebornix.Ruby" - ] + ], // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [], diff --git a/.rubocop.yml b/.rubocop.yml index 8f782e741528905cd59743f73283f8a39e9bf210..31e8248ff813e956702d5c67844aeb0e2affc917 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,7 @@ require: - rubocop-rspec AllCops: DisplayCopNames: true - TargetRubyVersion: '2.4' + TargetRubyVersion: '2.5' Include: - "**/*.rb" Exclude: diff --git a/Gemfile b/Gemfile index 18272fd72e8b95feb3fe64e34a51a9b75a7af794..b806b3edb7243ad4311b3162ab008cfa7911c3bc 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,7 @@ group :development do gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby] gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw] gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw] + gem "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false gem "puppet-lint-absolute_classname-check", '3.0.1', require: false gem "puppet-lint-absolute_template_path", '1.0.1', require: false gem "puppet-lint-empty_trailing_lines", '0.0.1', require: false diff --git a/manifests/init.pp b/manifests/init.pp index 464024be40c05e51c257ea1d5a2f66b8e0e04cd9..a01f558e98d96ccb3d51aa4915e052ce54d377cc 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,28 +4,31 @@ # # @example # include tracingcarbon -class tracingcarbon { +class tracingcarbon ( +) { + include profiles::letsencrypt + firewalld_service { 'Allow SSH in the liu zone': ensure => present, zone => 'liu', service => 'ssh', } - firewalld_service {'Allow http in the liu Zone': + firewalld_service { 'Allow http in the liu Zone': ensure => present, zone => 'liu', service => 'http', } - firewalld_service {'Allow https in the liu Zone': + firewalld_service { 'Allow https in the liu Zone': ensure => present, zone => 'liu', service => 'https', } - firewalld_service {'Allow http in the public Zone': + firewalld_service { 'Allow http in the public Zone': ensure => present, zone => 'public', service => 'http', } - firewalld_service {'Allow https in the public Zone': + firewalld_service { 'Allow https in the public Zone': ensure => present, zone => 'public', service => 'https', @@ -36,10 +39,7 @@ class tracingcarbon { sshkey => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQDHsZ1q+e4nD2SAx659Kv1vf3tmhQmQJ/KOe4zOk4FyJt2OUoHsv82RD4rYVXxcnGojwFjTAtYTW2B4q/f334IGY9aezow/b39kkg977bJ7AC/OU1enkWFK3nkDtkP7htVbsSeogvyHf32niyosDvW8VCTNe9DZctyJ5Eu9AB0z/tuAr++/z+9sWYtiG0sGn/rUnrAvOqWHkTR2ShZHZPyXq+UCrJXHfbJ+P9EzzgFjr2uPoFgBiCqd0Ov2/zWP3k+chGcbSSKtJ3I3Ylh49jAxB1/srct4R0o7sNOKQBnrXXTAIkDLma2ilu0dAksPjD22ZYvWgRt03u7qxQR6lOB/', #lint:ignore:140chars } - include certdist - include tracingcarbon::python - # include tracingcarbon::yarn - - include tracingcarbon::runserver + #include tracingcarbon::yarn + #include tracingcarbon::runserver } diff --git a/manifests/python.pp b/manifests/python.pp index 74a6b5e5eb0421f79e9a42ca0e68d88f945b735d..09f87633ec7ec064f9c28ea2790dc4ae1310e2e6 100644 --- a/manifests/python.pp +++ b/manifests/python.pp @@ -1,7 +1,7 @@ # Ensures python is installed -class tracingcarbon::python ( ) { - package { 'python39' : +class tracingcarbon::python ( +) { + package { 'python39': ensure => 'installed', } - } diff --git a/manifests/runserver.pp b/manifests/runserver.pp index 822e63437f41e79ee490b1c1d48bfe3a49a26b82..ae0e54ccfe0892940a7cf5b831be5079502c87f2 100644 --- a/manifests/runserver.pp +++ b/manifests/runserver.pp @@ -1,8 +1,9 @@ # Starts the django server in a pipenv, if not already running -class tracingcarbon::runserver () { - exec { 'Run django' : +class tracingcarbon::runserver ( +) { + exec { 'Run django': command => 'npm run build && pipenv run python3 manage.py migrate && pipenv run python3 manage.py runserver &', - path => [ '/home/mange61/.local/bin', '/usr/bin', '/bin' ], + path => ['/home/mange61/.local/bin', '/usr/bin', '/bin'], cwd => '/home/mange61/tracing-carbon', user => 'mange61', unless => 'nc localhost 8000 -w 1', diff --git a/manifests/yarn.pp b/manifests/yarn.pp index a15cbb408064fffbe3daaf30bd5fdf4d225e79ea..56339c545e0e0b930ba9bcb9003e0b49491cf1e5 100644 --- a/manifests/yarn.pp +++ b/manifests/yarn.pp @@ -1,5 +1,6 @@ # Ensures yarn is installed -class tracingcarbon::yarn ( ) { +class tracingcarbon::yarn ( +) { package { 'nodejs' : ensure => 'installed', } diff --git a/metadata.json b/metadata.json index 228900b77159b39e00347d2b469d8e33df374b33..ea16288c9a7c10653da2b31a5abf195fdcba8236 100644 --- a/metadata.json +++ b/metadata.json @@ -40,7 +40,7 @@ "version_requirement": ">= 6.21.0 < 8.0.0" } ], - "pdk-version": "2.4.0", + "pdk-version": "2.5.0", "template-url": "https://gitlab.it.liu.se/puppet-infra/pdk-templates.git#liu", - "template-ref": "heads/liu-0-g76c91ed" + "template-ref": "heads/liu-0-gcb718ad" }