Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #130 from Icinga/feature/icingaweb2-themes
Browse files Browse the repository at this point in the history
Icinga Web 2 Profile: Add support for community themes (available in standalone box)
  • Loading branch information
Michael Friedrich authored Mar 1, 2018
2 parents c56247a + b0513d3 commit d596a9b
Show file tree
Hide file tree
Showing 45 changed files with 2,043 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .puppet/modules/profiles/manifests/base/system.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
ensure => 'installed',
}
->
# wget
class { 'wget':
package_manage => true,
package_ensure => present,
package_name => 'wget'
}
->
# vim is needed
class { 'vim':
opt_bg_shading => 'light',
Expand Down
56 changes: 54 additions & 2 deletions .puppet/modules/profiles/manifests/icinga/icingaweb2.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
$node_name = 'icinga2',
$api_username = 'root',
$api_password = 'icinga',
$modules = {}
$modules = {},
$themes = {}
) {
apache::vhost { "${icingaweb2_fqdn}-http":
priority => 5,
Expand Down Expand Up @@ -139,7 +140,8 @@

$conf_dir = $::icingaweb2::params::conf_dir

# Module handling
# Modules

if ('director' in $modules) {
$director_git_revision = $modules['director']['git_revision']

Expand Down Expand Up @@ -386,4 +388,54 @@
settings => $elasticsearch_settings,
}
}

# Themes

if ('company' in $themes) {
icingaweb2::module { 'company':
install_method => 'git',
git_repository => 'https://github.com/Icinga/icingaweb2-theme-company',
git_revision => 'master',
}
}

if ('always-green' in $themes) {
icingaweb2::module { 'always-green':
install_method => 'git',
git_repository => 'https://github.com/xam-stephan/icingaweb2-module-theme-always-green',
git_revision => 'master',
}
}

if ('lsd' in $themes) {
icingaweb2::module { 'lsd':
install_method => 'git',
git_repository => 'https://github.com/Mikesch-mp/icingaweb2-theme-lsd',
git_revision => 'master',
}
}

if ('unicorn' in $themes) {
icingaweb2::module { 'unicorn':
install_method => 'git',
git_repository => 'https://github.com/Mikesch-mp/icingaweb2-theme-unicorn',
git_revision => 'master',
}
->
wget::retrieve { 'retrieve-unicorn-image':
source => 'http://i.imgur.com/SCfMd.png',
destination => '/usr/share/icingaweb2/modules/unicorn/public/img/unicorn.png',
timeout => 180,
verbose => false,
unless => "test $(ls -A /usr/share/icingaweb2/modules/unicorn/public/img/unicorn.png 2>/dev/null)",
}
}

if ('batman' in $themes) {
icingaweb2::module { 'batman':
install_method => 'git',
git_repository => 'https://github.com/jschanz/icingaweb2-theme-batman',
git_revision => 'master',
}
}
}
6 changes: 6 additions & 0 deletions .puppet/modules/wget/.fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fixtures:
forge_modules:
stdlib:
repo: "puppetlabs/stdlib"
symlinks:
wget: "#{source_dir}"
5 changes: 5 additions & 0 deletions .puppet/modules/wget/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#This file is generated by ModuleSync, do not edit.
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
23 changes: 23 additions & 0 deletions .puppet/modules/wget/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is generated by ModuleSync, do not edit.
*.iml
.*.sw[op]
.DS_Store
.bundle/
.idea/
.metadata
.vagrant/
.yardoc
.yardwarns
Gemfile.local
Gemfile.lock
bin/
coverage/
doc/
junit/
log/
pkg/
spec/fixtures/manifests/
spec/fixtures/modules/
tmp/
vendor/

2 changes: 2 additions & 0 deletions .puppet/modules/wget/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
98 changes: 98 additions & 0 deletions .puppet/modules/wget/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
require:
- rubocop-rspec
AllCops:
TargetRubyVersion: '2.1'
Include:
- "./**/*.rb"
Exclude:
- bin/*
- ".vendor/**/*"
- Gemfile
- Rakefile
- pkg/**/*
- spec/fixtures/**/*
- vendor/**/*
inherit_from: .rubocop_todo.yml
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
RSpec/BeforeAfterAll:
Description: Beware of using after(:all) as it may cause state to leak between tests.
A necessary evil in acceptance testing.
Exclude:
- spec/acceptance/**/*.rb
RSpec/HookArgument:
Description: Prefer explicit :each argument, matching existing module's style
EnforcedStyle: each
Style/BlockDelimiters:
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
be consistent then.
EnforcedStyle: braces_for_chaining
Style/ClassAndModuleChildren:
Description: Compact style reduces the required amount of indentation.
EnforcedStyle: compact
Style/EmptyElse:
Description: Enforce against empty else clauses, but allow `nil` for clarity.
EnforcedStyle: empty
Style/FormatString:
Description: Following the main puppet project's style, prefer the % format format.
EnforcedStyle: percent
Style/FormatStringToken:
Description: Following the main puppet project's style, prefer the simpler template
tokens over annotated ones.
EnforcedStyle: template
Style/Lambda:
Description: Prefer the keyword for easier discoverability.
EnforcedStyle: literal
Style/RegexpLiteral:
Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
EnforcedStyle: percent_r
Style/TernaryParentheses:
Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
on complex expressions for better readability, but seriously consider breaking
it up.
EnforcedStyle: require_parentheses_when_complex
Style/TrailingCommaInArguments:
Description: Prefer always trailing comma on multiline argument lists. This makes
diffs, and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/TrailingCommaInLiteral:
Description: Prefer always trailing comma on multiline literals. This makes diffs,
and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/SymbolArray:
Description: Using percent style obscures symbolic intent of array's contents.
EnforcedStyle: brackets
Style/CollectionMethods:
Enabled: true
Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/StringMethods:
Enabled: true
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/ParameterLists:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/MessageExpectation:
Enabled: false
Style/AsciiComments:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/SymbolProc:
Enabled: false
Empty file.
35 changes: 35 additions & 0 deletions .puppet/modules/wget/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#This file is generated by ModuleSync, do not edit.
---
sudo: false
language: ruby
cache: bundler
script: "bundle exec rake release_checks"
matrix:
fast_finish: true
include:
- rvm: 2.3.3
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-16.04
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.3.3
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.3.3
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.4.1
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 5.0"
- rvm: 2.1.9
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.0"
notifications:
email: false
68 changes: 68 additions & 0 deletions .puppet/modules/wget/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## 1.1.7 (February 12, 2018)

Improvements:

- Updated module data to `hiera 5`.
- Added support for newer OS releases.

## 1.1.6 (November 24, 2017)

Improvements:

- Implemented Puppet 4 module data pattern using `hiera` for module defaults and removed `params.pp`.
- Added support for Puppet 5.

## 1.1.5 (June 30, 2017)

Bugfixes:

- Fixed the type in retrievals hiera name.
- Fixed the missing wget::package warning in retrieve.

## 1.1.4 (June 11, 2017)

Improvements:

- Replace deprecated `hiera_hash` to `lookup`.
- Update minimum puppet version required is set to `4.7.0`.

Bugfixes:

- Fix the style issues in chaining arrows.

## 1.1.3 (March 26, 2017)

Bugfixes:

- Fix broken default values from params.pp.

## 1.1.2 (March 25, 2017)

Bugfixes:

- Minor correction of date in changelog.

## 1.1.1 (March 25, 2017)

Bugfixes:

- Restore `params.pp` file to avoid test failures in down stream modules.

## 1.1.0 (December 27, 2016)

Improvements:

- Implemented Puppet 4 module data pattern using `hiera` for module defaults and removed `params.pp`.
- Improved tests using `rspec-puppet-facts` to cover all supported platforms.

## 1.0.1 (December 26, 2016)

Bugfixes:

- Fix minor documentation errors.

## 1.0.0 (December 25, 2016)

Features:

- Initial release
Loading

0 comments on commit d596a9b

Please sign in to comment.