Showing with 1,439 additions and 1,204 deletions.
  1. +0 −1 .fixtures.yml
  2. +1 −0 .gitignore
  3. +2 −6 .sync.yml
  4. +44 −0 .travis.yml
  5. +41 −0 CHANGELOG.md
  6. +54 −12 CONTRIBUTING.md
  7. +5 −25 Gemfile
  8. +4 −2 README.md
  9. +4 −17 Rakefile
  10. +1 −2 examples/basic.pp
  11. +1 −2 examples/dual.pp
  12. +1 −2 examples/dynflow.pp
  13. +1 −2 examples/journald.pp
  14. +32 −0 examples/tftp.pp
  15. +14 −4 lib/puppet/functions/foreman_proxy/get_network_in_addr.rb
  16. +38 −84 manifests/config.pp
  17. +1 −1 manifests/feature.pp
  18. +17 −0 manifests/globals.pp
  19. +147 −154 manifests/init.pp
  20. +2 −1 manifests/install.pp
  21. +45 −0 manifests/module.pp
  22. +16 −0 manifests/module/bmc.pp
  23. +16 −0 manifests/module/dhcp.pp
  24. +16 −0 manifests/module/dns.pp
  25. +25 −0 manifests/module/httpboot.pp
  26. +17 −0 manifests/module/logs.pp
  27. +17 −0 manifests/module/puppet.pp
  28. +17 −0 manifests/module/puppetca.pp
  29. +17 −0 manifests/module/realm.pp
  30. +17 −0 manifests/module/templates.pp
  31. +16 −0 manifests/module/tftp.pp
  32. +39 −28 manifests/params.pp
  33. +11 −4 manifests/plugin.pp
  34. +4 −12 manifests/plugin/abrt.pp
  35. +24 −28 manifests/plugin/ansible.pp
  36. +5 −2 manifests/plugin/ansible/params.pp
  37. +1 −1 manifests/plugin/ansible/runner.pp
  38. +11 −20 manifests/plugin/chef.pp
  39. +3 −4 manifests/plugin/chef/params.pp
  40. +1 −5 manifests/plugin/dhcp/infoblox.pp
  41. +1 −5 manifests/plugin/dhcp/remote_isc.pp
  42. +13 −13 manifests/plugin/discovery.pp
  43. +2 −2 manifests/plugin/discovery/params.pp
  44. +1 −5 manifests/plugin/dns/infoblox.pp
  45. +1 −5 manifests/plugin/dns/powerdns.pp
  46. +18 −23 manifests/plugin/dynflow.pp
  47. +3 −2 manifests/plugin/dynflow/params.pp
  48. +43 −0 manifests/plugin/module.pp
  49. +4 −12 manifests/plugin/monitoring.pp
  50. +2 −3 manifests/plugin/monitoring/icinga2.pp
  51. +7 −8 manifests/plugin/monitoring/icingadirector.pp
  52. +6 −2 manifests/plugin/monitoring/icingadirector/params.pp
  53. +8 −12 manifests/plugin/omaha.pp
  54. +4 −8 manifests/plugin/openscap.pp
  55. +31 −0 manifests/plugin/provider.pp
  56. +20 −23 manifests/plugin/pulp.pp
  57. +2 −3 manifests/plugin/pulp/params.pp
  58. +4 −9 manifests/plugin/realm/ad.pp
  59. +11 −22 manifests/plugin/remote_execution/ssh.pp
  60. +13 −21 manifests/plugin/salt.pp
  61. +1 −2 manifests/plugin/salt/params.pp
  62. +17 −0 manifests/provider.pp
  63. +11 −10 manifests/proxydhcp.pp
  64. +40 −27 manifests/proxydns.pp
  65. +2 −1 manifests/register.pp
  66. +2 −1 manifests/remote_file.pp
  67. +4 −7 manifests/service.pp
  68. +18 −50 manifests/settings_file.pp
  69. +15 −12 manifests/tftp.pp
  70. +30 −44 manifests/tftp/netboot.pp
  71. +6 −23 manifests/tftp/netboot/params.pp
  72. +10 −8 metadata.json
  73. +3 −21 spec/acceptance/basic_spec.rb
  74. +1 −8 spec/acceptance/dual_spec.rb
  75. +3 −24 spec/acceptance/dynflow_spec.rb
  76. +2 −1 spec/acceptance/foreman_remote_file_spec.rb
  77. +1 −9 spec/acceptance/http_spec.rb
  78. +3 −21 spec/acceptance/journald_spec.rb
  79. +27 −0 spec/acceptance/netboot_spec.rb
  80. +1 −15 spec/classes/foreman_proxy__plugin__abrt_spec.rb
  81. +9 −8 spec/classes/foreman_proxy__plugin__ansible_spec.rb
  82. +15 −4 spec/classes/foreman_proxy__plugin__chef__spec.rb
  83. +59 −47 spec/classes/foreman_proxy__plugin__dynflow_spec.rb
  84. +1 −18 spec/classes/foreman_proxy__plugin__monitoring_spec.rb
  85. +1 −15 spec/classes/foreman_proxy__plugin__omaha_spec.rb
  86. +2 −2 spec/classes/foreman_proxy__plugin__openscap_spec.rb
  87. +0 −15 spec/classes/foreman_proxy__plugin__pulp_spec.rb
  88. +1 −17 spec/classes/foreman_proxy__plugin__realm__ad_spec.rb
  89. +4 −4 spec/classes/foreman_proxy__plugin__remote_execution__ssh_spec.rb
  90. +1 −15 spec/classes/foreman_proxy__plugin__salt_spec.rb
  91. +2 −2 spec/classes/foreman_proxy__proxydns__spec.rb
  92. +6 −6 spec/classes/foreman_proxy__spec.rb
  93. +17 −22 spec/classes/foreman_proxy__tftp__netboot_spec.rb
  94. +7 −11 spec/defines/foreman_proxy_feature_spec.rb
  95. +53 −0 spec/defines/foreman_proxy_module_spec.rb
  96. +21 −0 spec/defines/foreman_proxy_plugin_module_spec.rb
  97. +25 −0 spec/defines/foreman_proxy_plugin_provider_spec.rb
  98. +2 −6 spec/defines/foreman_proxy_plugin_spec.rb
  99. +23 −0 spec/defines/foreman_proxy_provider_spec.rb
  100. +14 −51 spec/defines/foreman_proxy_settings_file_spec.rb
  101. +3 −0 spec/setup_acceptance_node.pp
  102. +1 −42 spec/spec_helper.rb
  103. +18 −37 spec/spec_helper_acceptance.rb
  104. +8 −0 spec/support/acceptance/cleanup.rb
  105. +14 −0 spec/support/acceptance/examples.rb
  106. +3 −0 spec/support/aio.rb
  107. +1 −1 templates/plugin/chef.yml.erb
  108. +4 −0 templates/plugin/omaha.yml.erb
  109. +4 −0 templates/plugin/test.yml.erb
  110. +1 −0 types/listenon.pp
1 change: 0 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ fixtures:
dns: 'https://github.com/theforeman/puppet-dns'
extlib: 'https://github.com/voxpupuli/puppet-extlib'
foreman: 'https://github.com/theforeman/puppet-foreman'
mysql: 'https://github.com/puppetlabs/puppetlabs-mysql'
puppet: 'https://github.com/theforeman/puppet-puppet'
redis: 'https://github.com/voxpupuli/puppet-redis'
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib'
Expand Down
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
8 changes: 2 additions & 6 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
.travis.yml:
beaker_sets:
- centos7-64
- centos8-64
- debian10-64
- ubuntu1804-64
env:
global:
- PARALLEL_TEST_PROCESSORS=8
Rakefile:
param_docs_pattern:
- manifests/init.pp
- manifests/plugin/**/*.pp
spec/spec_helper.rb:
custom_facts:
- name: sudoversion
value: 1.8.23
source: saz-sudo
spec/spec_helper_acceptance.rb:
install_epel: true
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
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Changelog

## [14.0.0](https://github.com/theforeman/puppet-foreman_proxy/tree/14.0.0) (2020-05-16)

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

**Breaking changes:**

- Use modern facts [\#586](https://github.com/theforeman/puppet-foreman_proxy/issues/586)
- Remove old Red Hat TFTP install methods [\#590](https://github.com/theforeman/puppet-foreman_proxy/pull/590) ([ekohl](https://github.com/ekohl))
- Move Ruby package prefix to params [\#575](https://github.com/theforeman/puppet-foreman_proxy/pull/575) ([ekohl](https://github.com/ekohl))
- Drop group parameter on plugins [\#573](https://github.com/theforeman/puppet-foreman_proxy/pull/573) ([ekohl](https://github.com/ekohl))
- Introduce foreman\_proxy::globals [\#572](https://github.com/theforeman/puppet-foreman_proxy/pull/572) ([ekohl](https://github.com/ekohl))
- Remove redundant parameters [\#571](https://github.com/theforeman/puppet-foreman_proxy/pull/571) ([ekohl](https://github.com/ekohl))

**Implemented enhancements:**

- Switch AIO detection to use aio\_agent\_version fact [\#585](https://github.com/theforeman/puppet-foreman_proxy/issues/585)
- Update module dependencies to allow EL8 supported versions [\#595](https://github.com/theforeman/puppet-foreman_proxy/pull/595) ([wbclark](https://github.com/wbclark))
- Fixes [\#29213](https://projects.theforeman.org/issues/29213) - Support el8 [\#582](https://github.com/theforeman/puppet-foreman_proxy/pull/582) ([wbclark](https://github.com/wbclark))
- add support for flatcar [\#579](https://github.com/theforeman/puppet-foreman_proxy/pull/579) ([TheKangaroo](https://github.com/TheKangaroo))
- Allow extlib 5.x [\#578](https://github.com/theforeman/puppet-foreman_proxy/pull/578) ([mmoll](https://github.com/mmoll))
- Declare features on SSH and Pulp modules [\#570](https://github.com/theforeman/puppet-foreman_proxy/pull/570) ([ekohl](https://github.com/ekohl))
- Document classes using puppet-strings [\#568](https://github.com/theforeman/puppet-foreman_proxy/pull/568) ([ekohl](https://github.com/ekohl))
- Refactor modules, plugins and providers design [\#564](https://github.com/theforeman/puppet-foreman_proxy/pull/564) ([ekohl](https://github.com/ekohl))
- Fixes [\#29005](https://projects.theforeman.org/issues/29005) - Make IPv4 optional in proxydns [\#521](https://github.com/theforeman/puppet-foreman_proxy/pull/521) ([ekohl](https://github.com/ekohl))

**Fixed bugs:**

- correct needed foreman dependency [\#596](https://github.com/theforeman/puppet-foreman_proxy/pull/596) ([mmoll](https://github.com/mmoll))
- Fixes [\#29690](https://projects.theforeman.org/issues/29690) - install shimx64.efi and shim.efi [\#592](https://github.com/theforeman/puppet-foreman_proxy/pull/592) ([lzap](https://github.com/lzap))
- Use $f\_p::plugin::dynflow::external\_core [\#574](https://github.com/theforeman/puppet-foreman_proxy/pull/574) ([ekohl](https://github.com/ekohl))
- Fix chef plugin listen on [\#567](https://github.com/theforeman/puppet-foreman_proxy/pull/567) ([ekohl](https://github.com/ekohl))

**Closed issues:**

- Smart proxy plugin packages not lining up [\#561](https://github.com/theforeman/puppet-foreman_proxy/issues/561)

**Merged pull requests:**

- add Ubuntu integration tests [\#577](https://github.com/theforeman/puppet-foreman_proxy/pull/577) ([mmoll](https://github.com/mmoll))
- Update the compatibility matrix in the README [\#563](https://github.com/theforeman/puppet-foreman_proxy/pull/563) ([ekohl](https://github.com/ekohl))

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

[Full Changelog](https://github.com/theforeman/puppet-foreman_proxy/compare/12.1.0...13.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).
30 changes: 5 additions & 25 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,16 @@ 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-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"]}

# vim:ft=ruby
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ Part of the Foreman installer: <https://github.com/theforeman/foreman-installer>

| Module version | Proxy versions | Notes |
|----------------|----------------|-----------------------------------------------------|
| 11.x | 1.19 and newer | See compatibility notes in its README for 1.19-1.21 |
| 13.x | 2.0 and newer | |
| 12.x | 1.19 - 1.24 | See compatibility notes in its README for 1.19-1.22 |
| 11.x | 1.19 - 1.23 | See compatibility notes in its README for 1.19-1.21 |
| 10.x | 1.19 - 1.21 | |
| 5.x - 9.x | 1.16 - 1.20 | See compatibility notes in its README for 1.16-1.18 |
| 4.x | 1.12 - 1.17 | See compatibility notes in its README for 1.15+ |
| 3.x | 1.11 | |
| 2.x | 1.5 - 1.10 | |
| 1.x | 1.4 and older | |

Starting version 1.22 the Puppet CA configuration is split depending on the provider. When using the module with 1.19 - 1.21, set `puppetca_split_configs` to `false`.
12.x has dropped support for Puppet 3 which was officially unsupported for a while and Foreman Proxy 1.23 dropped altogether.

## Examples

Expand Down
21 changes: 4 additions & 17 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# This file is managed centrally by modulesync
# https://github.com/theforeman/foreman-installer-modulesync

require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'voxpupuli/test/rake'

# We use fixtures in our modules, which is not the default
task :beaker => 'spec_prep'

# blacksmith isn't always present, e.g. on Travis with --without development
begin
Expand Down Expand Up @@ -39,18 +41,3 @@ begin
end
rescue LoadError
end

PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*.pp"]
PuppetLint.configuration.log_format = '%{path}:%{line}:%{KIND}: %{message}'

require 'puppet-lint-param-docs/tasks'
PuppetLintParamDocs.define_selective do |config|
config.pattern = ["manifests/init.pp", "manifests/plugin/**/*.pp"]
end

require 'kafo_module_lint/tasks'
KafoModuleLint::RakeTask.new do |config|
config.pattern = ["manifests/init.pp", "manifests/plugin/**/*.pp"]
end

task :default => [:release_checks]
3 changes: 1 addition & 2 deletions examples/basic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

# Install a proxy
class { 'foreman_proxy':
repo => 'nightly',
puppet_group => 'root',
register_in_foreman => false,
ssl_ca => $certificate,
Expand All @@ -19,7 +18,7 @@
creates => $directory,
}
-> exec { 'Generate certificate':
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['networking']['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
path => ['/bin', '/usr/bin'],
creates => $certificate,
umask => '0022',
Expand Down
3 changes: 1 addition & 2 deletions examples/dual.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

# Install a proxy
class { 'foreman_proxy':
repo => 'nightly',
puppet_group => 'root',
register_in_foreman => false,
ssl_ca => $certificate,
Expand All @@ -20,7 +19,7 @@
creates => $directory,
}
-> exec { 'Generate certificate':
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['networking']['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
path => ['/bin', '/usr/bin'],
creates => $certificate,
umask => '0022',
Expand Down
3 changes: 1 addition & 2 deletions examples/dynflow.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

# Install a proxy
class { 'foreman_proxy':
repo => 'nightly',
puppet_group => 'root',
register_in_foreman => false,
ssl_ca => $certificate,
Expand All @@ -21,7 +20,7 @@
creates => $directory,
}
-> exec { 'Generate certificate':
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['networking']['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
path => ['/bin', '/usr/bin'],
creates => $certificate,
umask => '0022',
Expand Down
3 changes: 1 addition & 2 deletions examples/journald.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Install a proxy
class { 'foreman_proxy':
log => 'JOURNAL',
repo => 'nightly',
puppet_group => 'root',
register_in_foreman => false,
ssl_ca => $certificate,
Expand All @@ -20,7 +19,7 @@
creates => $directory,
}
-> exec { 'Generate certificate':
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
command => "openssl req -nodes -x509 -newkey rsa:2048 -subj '/CN=${facts['networking']['fqdn']}' -keyout '${key}' -out '${certificate}' -days 365",
path => ['/bin', '/usr/bin'],
creates => $certificate,
umask => '0022',
Expand Down
Loading