Showing with 1,572 additions and 1,815 deletions.
  1. +1 −0 .gitignore
  2. +2 −7 .sync.yml
  3. +44 −0 .travis.yml
  4. +46 −0 CHANGELOG.md
  5. +54 −12 CONTRIBUTING.md
  6. +6 −26 Gemfile
  7. +45 −0 HISTORY.md
  8. +31 −11 README.md
  9. +4 −17 Rakefile
  10. +41 −0 files/_assets.conf.erb
  11. +4 −4 lib/facter/sssd.rb
  12. +1 −1 lib/puppet/functions/foreman/foreman.rb
  13. +1 −1 lib/puppet/functions/foreman/smartvar.rb
  14. +15 −13 manifests/cli.pp
  15. +5 −5 manifests/cli/params.pp
  16. +2 −2 manifests/cli/plugin.pp
  17. +79 −36 manifests/config.pp
  18. +148 −70 manifests/config/apache.pp
  19. +2 −2 manifests/config/apache/fragment.pp
  20. +12 −12 manifests/database.pp
  21. +7 −7 manifests/database/postgresql.pp
  22. +23 −4 manifests/dynflow/worker.pp
  23. +125 −114 manifests/init.pp
  24. +18 −13 manifests/install.pp
  25. +23 −17 manifests/params.pp
  26. +33 −9 manifests/plugin.pp
  27. +1 −1 manifests/plugin/ansible.pp
  28. +1 −1 manifests/plugin/chef.pp
  29. +0 −5 manifests/plugin/inventory_upload.pp
  30. +8 −0 manifests/plugin/leapp.pp
  31. +3 −12 manifests/plugin/ovirt_provision.pp
  32. +0 −32 manifests/plugin/ovirt_provision/params.pp
  33. +17 −24 manifests/plugin/puppetdb.pp
  34. +0 −38 manifests/plugin/puppetdb/params.pp
  35. +1 −1 manifests/plugin/remote_execution.pp
  36. +2 −1 manifests/plugin/remote_execution/cockpit.pp
  37. +5 −0 manifests/plugin/rh_cloud.pp
  38. +1 −1 manifests/plugin/salt.pp
  39. +10 −15 manifests/plugin/tasks.pp
  40. +0 −24 manifests/plugin/tasks/params.pp
  41. +3 −2 manifests/providers.pp
  42. +9 −7 manifests/providers/params.pp
  43. +48 −21 manifests/puppetmaster.pp
  44. +12 −10 manifests/puppetmaster/params.pp
  45. +15 −3 manifests/rake.pp
  46. +31 −9 manifests/repo.pp
  47. +7 −6 manifests/repos.pp
  48. +4 −3 manifests/repos/apt.pp
  49. +0 −23 manifests/repos/extra.pp
  50. +4 −6 manifests/repos/yum.pp
  51. +11 −10 manifests/service.pp
  52. +9 −8 manifests/settings.pp
  53. +11 −5 metadata.json
  54. +5 −89 spec/acceptance/foreman_basic_spec.rb
  55. +15 −33 spec/acceptance/foreman_cli_plugins_spec.rb
  56. +5 −23 spec/acceptance/foreman_cli_spec.rb
  57. +11 −92 spec/acceptance/foreman_journald_spec.rb
  58. +5 −88 spec/acceptance/foreman_prometheus_spec.rb
  59. +0 −99 spec/acceptance/foreman_reverse_proxy_spec.rb
  60. +6 −85 spec/acceptance/foreman_rex_cockpit_spec.rb
  61. +5 −88 spec/acceptance/foreman_statsd_spec.rb
  62. +8 −0 spec/acceptance/hieradata/common.yaml
  63. +11 −0 spec/acceptance/hieradata/os/RedHat/7.yaml
  64. +8 −2 spec/classes/foreman_cli_spec.rb
  65. +67 −55 spec/classes/foreman_config_apache_spec.rb
  66. +18 −10 spec/classes/foreman_config_ipa_spec.rb
  67. +1 −1 spec/classes/foreman_database_spec.rb
  68. +17 −12 spec/classes/foreman_install_spec.rb
  69. +11 −19 spec/classes/foreman_providers_spec.rb
  70. +49 −77 spec/classes/foreman_puppetmaster_spec.rb
  71. +32 −9 spec/classes/foreman_repo_spec.rb
  72. +0 −50 spec/classes/foreman_repos_extra_spec.rb
  73. +3 −3 spec/classes/foreman_service_spec.rb
  74. +82 −59 spec/classes/foreman_spec.rb
  75. +0 −5 spec/classes/plugin/inventory_upload_spec.rb
  76. +7 −0 spec/classes/plugin/leapp_spec.rb
  77. +1 −1 spec/classes/plugin/openscap_spec.rb
  78. +10 −15 spec/classes/plugin/ovirt_provision_spec.rb
  79. +10 −15 spec/classes/plugin/puppetdb_spec.rb
  80. +6 −1 spec/classes/plugin/remote_execution_cockpit_spec.rb
  81. +1 −1 spec/classes/plugin/remote_execution_spec.rb
  82. +5 −0 spec/classes/plugin/rh_cloud_spec.rb
  83. +11 −22 spec/classes/plugin/tasks_spec.rb
  84. +12 −54 spec/defines/foreman_config_apache_fragment_spec.rb
  85. +1 −1 spec/defines/foreman_dynflow_worker_spec.rb
  86. +4 −4 spec/defines/foreman_plugin_spec.rb
  87. +12 −6 spec/defines/foreman_repos_spec.rb
  88. +4 −24 spec/defines/foreman_repos_yum_spec.rb
  89. +33 −0 spec/setup_acceptance_node.pp
  90. +1 −42 spec/spec_helper.rb
  91. +30 −35 spec/spec_helper_acceptance.rb
  92. +36 −0 spec/support/acceptance/examples.rb
  93. +12 −0 spec/support/acceptance/purge.rb
  94. +3 −0 spec/support/aio.rb
  95. +0 −39 templates/_assets.conf.erb
  96. +1 −1 templates/auth_kerb.conf.erb
  97. +3 −2 templates/foreman.service-overrides.erb
  98. +3 −0 templates/foreman.socket-overrides.erb
  99. +0 −2 templates/puppet.yaml.erb
  100. +22 −0 templates/settings.yaml.erb
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ junit/
pkg/
coverage/
.yardoc/
REFERENCE.md

## InteliJ / RubyMine
.idea
Expand Down
9 changes: 2 additions & 7 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
.travis.yml:
beaker_sets:
- centos7-64
- centos8-64
- debian10-64
- ubuntu1804-64
env:
global:
- PARALLEL_TEST_PROCESSORS=8
Expand All @@ -11,13 +13,6 @@ Gemfile:
- gem: webmock
version: '~> 2.0'
- gem: oauth
Rakefile:
param_docs_pattern:
- manifests/cli.pp
- manifests/cli/*.pp
- manifests/init.pp
- manifests/compute/*.pp
- manifests/plugin/*.pp
spec/spec_helper.rb:
requires:
- webmock/rspec
Expand Down
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ matrix:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
- BEAKER_setfile=centos8-64{hostname=centos8-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet6
- BEAKER_setfile=centos8-64{hostname=centos8-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
Expand All @@ -56,5 +78,27 @@ matrix:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
- BEAKER_setfile=ubuntu1804-64{hostname=ubuntu1804-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet6
- BEAKER_setfile=ubuntu1804-64{hostname=ubuntu1804-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

bundler_args: --without system_tests development
dist: xenial
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Changelog

## [15.0.0](https://github.com/theforeman/puppet-foreman/tree/15.0.0) (2020-05-15)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/14.0.0...15.0.0)

**Breaking changes:**

- Use modern facts [\#841](https://github.com/theforeman/puppet-foreman/issues/841)
- Prefix ipa and sssd facts with foreman\_ [\#839](https://github.com/theforeman/puppet-foreman/pull/839) ([ekohl](https://github.com/ekohl))
- Remove unused parameters from puppetmaster [\#824](https://github.com/theforeman/puppet-foreman/pull/824) ([ekohl](https://github.com/ekohl))
- Rename inventory\_upload to rh\_cloud [\#821](https://github.com/theforeman/puppet-foreman/pull/821) ([ShimShtein](https://github.com/ShimShtein))
- Refactor repository handling [\#815](https://github.com/theforeman/puppet-foreman/pull/815) ([ekohl](https://github.com/ekohl))
- Use plugin\_prefix to determine plugin packages [\#809](https://github.com/theforeman/puppet-foreman/pull/809) ([ekohl](https://github.com/ekohl))
- Fixes [\#29148](https://projects.theforeman.org/issues/29148) - Use Puma instead of Passenger by default [\#802](https://github.com/theforeman/puppet-foreman/pull/802) ([sthirugn](https://github.com/sthirugn))

**Implemented enhancements:**

- Allow puppet/redis 6.x [\#840](https://github.com/theforeman/puppet-foreman/pull/840) ([ekohl](https://github.com/ekohl))
- Refs [\#29601](https://projects.theforeman.org/issues/29601): Drop foreman-release-scl in favor of centos-release-scl-rh [\#838](https://github.com/theforeman/puppet-foreman/pull/838) ([ehelms](https://github.com/ehelms))
- Switch AIO detection to use aio\_agent\_version fact [\#834](https://github.com/theforeman/puppet-foreman/pull/834) ([ekohl](https://github.com/ekohl))
- Add Leapp plugin [\#833](https://github.com/theforeman/puppet-foreman/pull/833) ([stejskalleos](https://github.com/stejskalleos))
- Fixes [\#29212](https://projects.theforeman.org/issues/29212) - support el8 [\#828](https://github.com/theforeman/puppet-foreman/pull/828) ([wbclark](https://github.com/wbclark))
- Only install foreman-release-scl on CentOS EL 7 [\#822](https://github.com/theforeman/puppet-foreman/pull/822) ([ehelms](https://github.com/ehelms))
- Allow extlib 5.x [\#820](https://github.com/theforeman/puppet-foreman/pull/820) ([mmoll](https://github.com/mmoll))
- Refs [\#29144](https://projects.theforeman.org/issues/29144) - Use systemd socket activation [\#814](https://github.com/theforeman/puppet-foreman/pull/814) ([ekohl](https://github.com/ekohl))
- Fixes [\#29255](https://projects.theforeman.org/issues/29255) - Set plugin config file mode to 0640 [\#807](https://github.com/theforeman/puppet-foreman/pull/807) ([ekohl](https://github.com/ekohl))
- Fixes [\#28955](https://projects.theforeman.org/issues/28955) - Add puma configuration tuning options [\#790](https://github.com/theforeman/puppet-foreman/pull/790) ([sthirugn](https://github.com/sthirugn))
- Fixes [\#28436](https://projects.theforeman.org/issues/28436) - Add keycloak support [\#779](https://github.com/theforeman/puppet-foreman/pull/779) ([ekohl](https://github.com/ekohl))
- Add options for rails\_cache\_store [\#762](https://github.com/theforeman/puppet-foreman/pull/762) ([dgoetz](https://github.com/dgoetz))

**Fixed bugs:**

- Ensure Foreman is provisioned before configuring cockpit [\#835](https://github.com/theforeman/puppet-foreman/pull/835) ([ekohl](https://github.com/ekohl))
- Drop the separate rails repository [\#826](https://github.com/theforeman/puppet-foreman/pull/826) ([ekohl](https://github.com/ekohl))
- Refs [\#29148](https://projects.theforeman.org/issues/29148): Do not proxy /pulp2 to Puma [\#811](https://github.com/theforeman/puppet-foreman/pull/811) ([ehelms](https://github.com/ehelms))
- Correct casing on Stdlib::HTTPUrl [\#806](https://github.com/theforeman/puppet-foreman/pull/806) ([ekohl](https://github.com/ekohl))
- Fixes [\#28739](https://projects.theforeman.org/issues/28739): Fix static asset caching when using Puma [\#788](https://github.com/theforeman/puppet-foreman/pull/788) ([ehelms](https://github.com/ehelms))

**Closed issues:**

- db\_username changes do not work [\#750](https://github.com/theforeman/puppet-foreman/issues/750)

**Merged pull requests:**

- Make camptocamp/systemd a hard dependency [\#825](https://github.com/theforeman/puppet-foreman/pull/825) ([ekohl](https://github.com/ekohl))
- Make foreman::config::apache standalone [\#800](https://github.com/theforeman/puppet-foreman/pull/800) ([ekohl](https://github.com/ekohl))

## [14.0.0](https://github.com/theforeman/puppet-foreman/tree/14.0.0) (2020-02-12)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/13.1.0...14.0.0)
Expand Down
66 changes: 54 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,22 @@ Our puppet modules provide [`Gemfile`](./Gemfile)s which can tell a ruby
package manager such as [bundler](https://bundler.io/) what Ruby packages,
or Gems, are required to build, develop, and test this software.

Please make sure you have [bundler installed](https://bundler.io/#getting-started)
on your system, then use it to install all dependencies needed for this project,
by running

```shell
% bundle install
**Prerequisites**
1. Make sure you have [bundler installed](https://bundler.io/#getting-started)
on your system. If you are using Fedora, you can get `bundler` using
```shell
sudo dnf install rubygem-bundler
```
2. If you are using Fedora, you may need these additional packages
```shell
sudo dnf install -y ruby-devel redhat-rpm-config
```

Now, go to the root directory of this project and use `bundler` to install all
dependencies needed for this project by running

```console
$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
Expand All @@ -159,21 +169,43 @@ NOTE some systems may require you to run this command with sudo.
If you already have those gems installed, make sure they are up-to-date:

```shell
% bundle update
bundle update
```

With all dependencies in place and up-to-date we can now run the tests:

```shell
% rake spec
rake spec
```

This will execute all the [rspec tests](http://rspec-puppet.com/) tests
under [spec/defines](./spec/defines), [spec/classes](./spec/classes),
and so on. rspec tests may have the same kind of dependencies as the
module they are testing. While the module defines in its [Modulefile](./Modulefile),
This will execute all the [rspec tests](http://rspec-puppet.com/) tests under
[spec/defines](./spec/defines), [spec/classes](./spec/classes), and so on.
rspec tests may have the same kind of dependencies as the module they are
testing. While the module defines in its [metadata.json](./metadata.json),
rspec tests define them in [.fixtures.yml](./fixtures.yml).

To run specific tests, use the spec test file name and a filter like:

```shell
bundle exec rspec spec/classes/foreman_spec.rb -e 'should restart passenger'
```
More filter info available [here](https://relishapp.com/rspec/rspec-core/v/3-9/docs/command-line/example-option)

To run OS specific tests:

```shell
SPEC_FACTS_OS=redhat-7-x86_64 bundle exec rspec spec/classes/foreman_spec.rb
```

If you have more than one version of `redhat` OS specified in metadata.json,
you can run them all like:

```shell
SPEC_FACTS_OS=redhat bundle exec rspec spec/classes/foreman_spec.rb
```
For more information on running the tests, see [rspec-puppet-facts](https://github.com/mcanevet/rspec-puppet-facts)
and specifically the [section for running tests](https://github.com/mcanevet/rspec-puppet-facts#running-your-tests).

Writing Tests
-------------

Expand Down Expand Up @@ -246,3 +278,13 @@ Additional Resources
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
Modulesync
==========
Various files, including this one, are
[modulesynced](https://github.com/voxpupuli/modulesync) using
[foreman-installer-modulesync](https://github.com/theforeman/foreman-installer-modulesync)
configuration. Changes should be made over there and then synced to
all [managed
modules](https://github.com/theforeman/foreman-installer-modulesync/blob/master/managed_modules.yml).
32 changes: 6 additions & 26 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,18 @@ source 'https://rubygems.org'

gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 5.5'

gem 'rake'
gem 'rspec', '~> 3.0'
gem 'rspec-puppet', '~> 2.3'
gem 'rspec-puppet-facts', '>= 1.7'
gem 'puppetlabs_spec_helper', '>= 2.1.1'
gem 'puppet-lint', '>= 2'
gem 'puppet-lint-classes_and_types_beginning_with_digits-check'
gem 'kafo_module_lint'
gem 'puppet-lint-empty_string-check'
gem 'puppet-lint-file_ensure-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-param-docs', '>= 1.3.0'
gem 'puppet-lint-spaceship_operator_without_tag-check'
gem 'puppet-lint-strict_indent-check'
gem 'puppet-lint-trailing_comma-check'
gem 'puppet-lint-undef_in_function-check'
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-version_comparison-check'
gem 'simplecov'
gem 'github_changelog_generator', '>= 1.15.0'
gem 'puppet-blacksmith', '>= 4.1.0', {"groups"=>["development"]}
gem 'beaker', '>= 4.2.0', {"groups"=>["system_tests"]}
gem 'beaker-docker', {"groups"=>["system_tests"]}
gem 'beaker-hostgenerator', '>= 1.1.10', {"groups"=>["system_tests"]}
gem 'beaker-puppet', {"groups"=>["system_tests"]}
gem 'beaker-vagrant', {"groups"=>["system_tests"]}
gem 'beaker-rspec', {"groups"=>["system_tests"]}
gem 'beaker-module_install_helper', {"groups"=>["system_tests"]}
gem 'beaker-puppet_install_helper', {"groups"=>["system_tests"]}
gem 'metadata-json-lint'
gem 'kafo_module_lint'
gem 'parallel_tests'
gem 'voxpupuli-test', '~> 1.4'
gem 'github_changelog_generator', '>= 1.15.0', {"groups"=>["development"]}
gem 'puppet-blacksmith', '>= 6.0.0', {"groups"=>["development"]}
gem 'voxpupuli-acceptance', '~> 0.2', {"groups"=>["system_tests"]}
gem 'beaker-hiera', {"git"=>"https://github.com/ekohl/beaker-hiera", "branch"=>"fix", "groups"=>["system_tests"]}
gem 'webmock', '~> 2.0'
gem 'oauth'

Expand Down
45 changes: 45 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
## [14.0.0](https://github.com/theforeman/puppet-foreman/tree/14.0.0) (2020-02-12)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/13.1.0...14.0.0)

**Breaking changes:**

- Drop foreman::config::passenger::fragment [\#799](https://github.com/theforeman/puppet-foreman/pull/799) ([ekohl](https://github.com/ekohl))
- Ensure plugins are installed before the database [\#792](https://github.com/theforeman/puppet-foreman/pull/792) ([ekohl](https://github.com/ekohl))
- Drop keepalive parameters [\#785](https://github.com/theforeman/puppet-foreman/pull/785) ([ekohl](https://github.com/ekohl))
- Drop listen\_on\_interface [\#784](https://github.com/theforeman/puppet-foreman/pull/784) ([ekohl](https://github.com/ekohl))
- Drop the selinux parameter [\#783](https://github.com/theforeman/puppet-foreman/pull/783) ([ekohl](https://github.com/ekohl))
- Drop multiple database support [\#781](https://github.com/theforeman/puppet-foreman/pull/781) ([ekohl](https://github.com/ekohl))
- Drop Debian 9 and Ubuntu 16.04, add Debian 10 [\#777](https://github.com/theforeman/puppet-foreman/pull/777) ([mmoll](https://github.com/mmoll))
- Fixes [\#28067](https://projects.theforeman.org/issues/28067) - dynflow sidekiq services config [\#761](https://github.com/theforeman/puppet-foreman/pull/761) ([ezr-ondrej](https://github.com/ezr-ondrej))

**Implemented enhancements:**

- Run migrations if there are pending migrations [\#778](https://github.com/theforeman/puppet-foreman/pull/778) ([ehelms](https://github.com/ehelms))
- Fixes [\#26739](https://projects.theforeman.org/issues/26739) - Add admin users locale and timezone setting [\#731](https://github.com/theforeman/puppet-foreman/pull/731) ([sbernhard](https://github.com/sbernhard))

**Fixed bugs:**

- Refs [\#28067](https://projects.theforeman.org/issues/28067): Ensure dynflow worker config exists before service [\#791](https://github.com/theforeman/puppet-foreman/pull/791) ([ehelms](https://github.com/ehelms))

## [13.1.0](https://github.com/theforeman/puppet-foreman/tree/13.1.0) (2019-11-25)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/13.0.1...13.1.0)

**Implemented enhancements:**

- Add Foreman AzureRM cli option [\#772](https://github.com/theforeman/puppet-foreman/pull/772) ([apuntamb](https://github.com/apuntamb))
- Initial AzureRM support [\#767](https://github.com/theforeman/puppet-foreman/pull/767) ([apuntamb](https://github.com/apuntamb))

**Fixed bugs:**

- Fixes [\#28200](https://projects.theforeman.org/issues/28200) - Change cockpit port from 9999 to 19090 [\#768](https://github.com/theforeman/puppet-foreman/pull/768) ([adamruzicka](https://github.com/adamruzicka))

## [13.0.1](https://github.com/theforeman/puppet-foreman/tree/13.0.1) (2019-10-31)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/13.0.0...13.0.1)

**Fixed bugs:**

- Fixes [\#28146](https://projects.theforeman.org/issues/28146) - Drop double leading slash from cockpit url [\#764](https://github.com/theforeman/puppet-foreman/pull/764) ([adamruzicka](https://github.com/adamruzicka))

## [13.0.0](https://github.com/theforeman/puppet-foreman/tree/13.0.0) (2019-10-24)

[Full Changelog](https://github.com/theforeman/puppet-foreman/compare/12.2.0...13.0.0)
Expand Down
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ Many Foreman plugins can be installed by adding additional `foreman::plugin::*`
classes, extra compute resource support via `foreman::compute::*` classes and
the Hammer CLI can be installed by adding `foreman::cli`.

By default, it configures Foreman to run under Apache and Passenger plus
with a PostgreSQL database. A standalone service can be configured instead by
setting `passenger` to false, though this isn't recommended in production.
By default, it configures Foreman to run as a standalone service fronted by
Apache as a reverse proxy with a PostgreSQL database.

The web interface is configured to use Puppet's SSL certificates by default, so
ensure they're present first, reconfigure `server_ssl_*` or disable the `ssl`
Expand All @@ -34,6 +33,35 @@ on the host this module is applied to. Databases will be created with using the
`en_US.utf8` locale, which means a respective OS locale must be available on
the database host. The database management can be disabled with `db_manage`.

## Rails Cache support

Foreman supports different backends as Rails cache. This is handled by this
module using the parameter `rails_cache_store`. The parameter takes a hash
containing the type and options specfic to the backend.

The default is the file backend, configured via `{'type' => 'file'}`. To
setup for redis use a hash similar to `{'type' => 'redis', 'urls' => ['localhost:8479/0'], 'options' => {'compress' => 'true', 'namespace' => 'foreman'}}`
where `urls` takes an array of redis urls which get prepended with `redis://`
and `options` using a hash with options from [rails](https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-store)
falling back to `{'compress' => 'true', 'namespace' => 'foreman'}` if no
option is provided.

An example configuration for activating the redis backend with a local instance
could look like this:

```puppet
class { 'foreman':
rails_cache_store => {
'type' => 'redis',
'urls' => ['localhost:8479/0'],
'options' => {
'compress' => 'true',
'namespace' => 'foreman'
}
}
}
```

## Support policy

At any time, the module supports two releases, however the previous version
Expand All @@ -48,14 +76,6 @@ previous stable release.

This module targets Foreman 2.0+.

## Running without passenger

To use this module without passenger, the `passenger` parameter must be set to
`false`. This will install the `foreman-service` package and ensure the service
is running.

This introduces a soft dependency on `camptocamp-systemd`.

## Types and providers

`foreman_config_entry` can be used to manage settings in Foreman's database, as
Expand Down
Loading