├── data └── common.yaml ├── .yardopts ├── pdk.yaml ├── .vscode ├── settings.json ├── extensions.json └── tasks.json ├── .rspec ├── templates ├── spec.epp └── motd.epp ├── CODEOWNERS ├── .gitattributes ├── .gitpod.yml ├── CONTRIBUTING.md ├── .github ├── workflows │ ├── release.yml │ ├── mend.yml │ ├── nightly.yml │ ├── release_prep.yml │ └── ci.yml └── pull_request_template.md ├── spec ├── spec_helper_acceptance.rb ├── default_facts.yml ├── spec_helper.rb ├── acceptance │ └── motd_spec.rb └── classes │ └── motd_spec.rb ├── .devcontainer ├── Dockerfile ├── devcontainer.json └── README.md ├── .pmtignore ├── .puppet-lint.rc ├── .fixtures.yml ├── .gitignore ├── NOTICE ├── .rubocop_todo.yml ├── hiera.yaml ├── .sync.yml ├── .pdkignore ├── Rakefile ├── .gitpod.Dockerfile ├── provision.yaml ├── metadata.json ├── REFERENCE.md ├── HISTORY.md ├── readmes └── README_ja_JP.md ├── README.md ├── manifests └── init.pp ├── Gemfile ├── LICENSE ├── CHANGELOG.md └── .rubocop.yml /data/common.yaml: -------------------------------------------------------------------------------- 1 | --- {} 2 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --markup markdown 2 | -------------------------------------------------------------------------------- /pdk.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ignore: [] 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format documentation 3 | -------------------------------------------------------------------------------- /templates/spec.epp: -------------------------------------------------------------------------------- 1 | Test Template for Rspec 2 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Setting ownership to the modules team 2 | * @puppetlabs/modules 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.rb eol=lf 2 | *.erb eol=lf 3 | *.pp eol=lf 4 | *.sh eol=lf 5 | *.epp eol=lf 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "puppet.puppet-vscode", 4 | "Shopify.ruby-lsp" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .gitpod.Dockerfile 3 | 4 | tasks: 5 | - init: pdk bundle install 6 | 7 | vscode: 8 | extensions: 9 | - puppet.puppet-vscode@1.2.0:f5iEPbmOj6FoFTOV6q8LTg== 10 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Puppet modules 2 | 3 | Check out our [Contributing to Supported Modules Blog Post](https://puppetlabs.github.io/iac/docs/contributing_to_a_module.html) to find all the information that you will need. 4 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: "Publish module" 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | release: 8 | uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main" 9 | secrets: "inherit" 10 | -------------------------------------------------------------------------------- /spec/spec_helper_acceptance.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'puppet_litmus' 4 | require 'spec_helper_acceptance_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_acceptance_local.rb')) 5 | 6 | PuppetLitmus.configure! 7 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM puppet/pdk:latest 2 | 3 | # [Optional] Uncomment this section to install additional packages. 4 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 5 | # && apt-get -y install --no-install-recommends 6 | 7 | -------------------------------------------------------------------------------- /.pmtignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | pkg/ 3 | Gemfile.lock 4 | Gemfile.local 5 | vendor/ 6 | .vendor/ 7 | spec/fixtures/manifests/ 8 | spec/fixtures/modules/ 9 | .vagrant/ 10 | .bundle/ 11 | .ruby-version 12 | coverage/ 13 | log/ 14 | .idea/ 15 | .dependencies/ 16 | .librarian/ 17 | Puppetfile.lock 18 | *.iml 19 | .*.sw? 20 | .yardoc/ 21 | -------------------------------------------------------------------------------- /.github/workflows/mend.yml: -------------------------------------------------------------------------------- 1 | name: "mend" 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "main" 7 | schedule: 8 | - cron: "0 0 * * *" 9 | workflow_dispatch: 10 | 11 | jobs: 12 | 13 | mend: 14 | uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main" 15 | secrets: "inherit" 16 | -------------------------------------------------------------------------------- /templates/motd.epp: -------------------------------------------------------------------------------- 1 | <%= $facts[os][name] %> <%= $facts[os][release][full] %> <%= $facts[os][architecture] %> 2 | 3 | FQDN: <%= $facts[networking][fqdn] %> (<%= $facts[networking][ip] %>) 4 | Processor: <%= $facts[processors][models][0] %> 5 | Kernel: <%= $facts[kernel] %> 6 | Memory Size: <%= $facts[memory][system][available] %> 7 | -------------------------------------------------------------------------------- /spec/default_facts.yml: -------------------------------------------------------------------------------- 1 | # Use default_module_facts.yml for module specific facts. 2 | # 3 | # Facts specified here will override the values provided by rspec-puppet-facts. 4 | --- 5 | networking: 6 | ip: "172.16.254.254" 7 | ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" 8 | mac: "AA:AA:AA:AA:AA:AA" 9 | fqdn: "foo.example.com" 10 | is_pe: false 11 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Puppet Development Kit (Community)", 3 | "dockerFile": "Dockerfile", 4 | 5 | "settings": { 6 | "terminal.integrated.profiles.linux": { 7 | "bash": { 8 | "path": "bash" 9 | } 10 | } 11 | }, 12 | 13 | "extensions": [ 14 | "puppet.puppet-vscode", 15 | "rebornix.Ruby" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.puppet-lint.rc: -------------------------------------------------------------------------------- 1 | --fail-on-warnings 2 | --relative 3 | --no-80chars-check 4 | --no-140chars-check 5 | --no-class_inherits_from_params_class-check 6 | --no-autoloader_layout-check 7 | --no-documentation-check 8 | --no-single_quote_string_with_variables-check 9 | --ignore-paths=.vendor/**/*.pp,.bundle/**/*.pp,pkg/**/*.pp,spec/**/*.pp,tests/**/*.pp,types/**/*.pp,vendor/**/*.pp 10 | -------------------------------------------------------------------------------- /.fixtures.yml: -------------------------------------------------------------------------------- 1 | fixtures: 2 | repositories: 3 | facts: 'https://github.com/puppetlabs/puppetlabs-facts.git' 4 | provision: 'https://github.com/puppetlabs/provision.git' 5 | puppet_agent: 6 | repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git' 7 | registry: 'https://github.com/puppetlabs/puppetlabs-registry.git' 8 | stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git' 9 | symlinks: 10 | motd: "#{source_dir}" 11 | -------------------------------------------------------------------------------- /.github/workflows/nightly.yml: -------------------------------------------------------------------------------- 1 | name: "nightly" 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | workflow_dispatch: 7 | 8 | jobs: 9 | Spec: 10 | uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" 11 | secrets: "inherit" 12 | 13 | Acceptance: 14 | needs: Spec 15 | uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" 16 | secrets: "inherit" 17 | with: 18 | flags: "--nightly" 19 | -------------------------------------------------------------------------------- /.github/workflows/release_prep.yml: -------------------------------------------------------------------------------- 1 | name: "Release Prep" 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | version: 7 | description: "Module version to be released. Must be a valid semver string. (1.2.3)" 8 | required: true 9 | 10 | jobs: 11 | release_prep: 12 | uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main" 13 | with: 14 | version: "${{ github.event.inputs.version }}" 15 | secrets: "inherit" 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: "ci" 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "main" 7 | workflow_dispatch: 8 | 9 | jobs: 10 | Spec: 11 | uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" 12 | secrets: "inherit" 13 | 14 | Acceptance: 15 | needs: Spec 16 | uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" 17 | secrets: "inherit" 18 | with: 19 | flags: "--nightly" 20 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Summary 2 | Provide a detailed description of all the changes present in this pull request. 3 | 4 | ## Additional Context 5 | Add any additional context about the problem here. 6 | - [ ] Root cause and the steps to reproduce. (If applicable) 7 | - [ ] Thought process behind the implementation. 8 | 9 | ## Related Issues (if any) 10 | Mention any related issues or pull requests. 11 | 12 | ## Checklist 13 | - [ ] 🟢 Spec tests. 14 | - [ ] 🟢 Acceptance tests. 15 | - [ ] Manually verified. (For example `puppet apply`) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .*.sw[op] 3 | .metadata 4 | .yardoc 5 | .yardwarns 6 | *.iml 7 | /.bundle/ 8 | /.idea/ 9 | /.vagrant/ 10 | /coverage/ 11 | /bin/ 12 | /doc/ 13 | /Gemfile.local 14 | /Gemfile.lock 15 | /junit/ 16 | /log/ 17 | /pkg/ 18 | /spec/fixtures/manifests/ 19 | /spec/fixtures/modules/* 20 | /tmp/ 21 | /vendor/ 22 | /.vendor/ 23 | /convert_report.txt 24 | /update_report.txt 25 | .DS_Store 26 | .project 27 | .envrc 28 | /inventory.yaml 29 | /spec/fixtures/litmus_inventory.yaml 30 | .resource_types 31 | .modules 32 | .task_cache.json 33 | .plan_cache.json 34 | .rerun.json 35 | bolt-debug.log 36 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Puppet Module - puppetlabs-motd 2 | 3 | Copyright 2017 Puppet, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. -------------------------------------------------------------------------------- /.rubocop_todo.yml: -------------------------------------------------------------------------------- 1 | # This configuration was generated by 2 | # `rubocop --auto-gen-config` 3 | # on 2023-11-28 13:52:46 UTC using RuboCop version 1.48.1. 4 | # The point is for the user to remove these configuration records 5 | # one by one as the offenses are removed from the code base. 6 | # Note that changes in the inspected code, or installation of new 7 | # versions of RuboCop, may require this file to be generated again. 8 | 9 | # Offense count: 21 10 | # Configuration parameters: EnforcedStyle, IgnoreSharedExamples. 11 | # SupportedStyles: always, named_only 12 | RSpec/NamedSubject: 13 | Exclude: 14 | - 'spec/classes/motd_spec.rb' 15 | -------------------------------------------------------------------------------- /hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 5 3 | 4 | defaults: # Used for any hierarchy level that omits these keys. 5 | datadir: data # This path is relative to hiera.yaml's directory. 6 | data_hash: yaml_data # Use the built-in YAML backend. 7 | 8 | hierarchy: 9 | - name: "osfamily/major release" 10 | paths: 11 | # Used to distinguish between Debian and Ubuntu 12 | - "os/%{facts.os.name}/%{facts.os.release.major}.yaml" 13 | - "os/%{facts.os.family}/%{facts.os.release.major}.yaml" 14 | # Used for Solaris 15 | - "os/%{facts.os.family}/%{facts.kernelrelease}.yaml" 16 | - name: "osfamily" 17 | paths: 18 | - "os/%{facts.os.name}.yaml" 19 | - "os/%{facts.os.family}.yaml" 20 | - name: 'common' 21 | path: 'common.yaml' 22 | -------------------------------------------------------------------------------- /.sync.yml: -------------------------------------------------------------------------------- 1 | --- 2 | common: 3 | service_url: https://facade-main-6f3kfepqcq-ew.a.run.app/v1/provision 4 | 5 | ".gitlab-ci.yml": 6 | delete: true 7 | appveyor.yml: 8 | delete: true 9 | .rubocop.yml: 10 | include_todos: true 11 | 12 | spec/default_facts.yml: 13 | extra_facts: 14 | networking: 15 | fqdn: "foo.example.com" 16 | spec/spec_helper.rb: 17 | mock_with: ":rspec" 18 | coverage_report: true 19 | .gitpod.Dockerfile: 20 | unmanaged: false 21 | .gitpod.yml: 22 | unmanaged: false 23 | .github/workflows/auto_release.yml: 24 | unmanaged: false 25 | .github/workflows/ci.yml: 26 | unmanaged: false 27 | .github/workflows/nightly.yml: 28 | unmanaged: false 29 | .github/workflows/release.yml: 30 | unmanaged: false 31 | .travis.yml: 32 | delete: true 33 | -------------------------------------------------------------------------------- /.pdkignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .*.sw[op] 3 | .metadata 4 | .yardoc 5 | .yardwarns 6 | *.iml 7 | /.bundle/ 8 | /.idea/ 9 | /.vagrant/ 10 | /coverage/ 11 | /bin/ 12 | /doc/ 13 | /Gemfile.local 14 | /Gemfile.lock 15 | /junit/ 16 | /log/ 17 | /pkg/ 18 | /spec/fixtures/manifests/ 19 | /spec/fixtures/modules/* 20 | /tmp/ 21 | /vendor/ 22 | /.vendor/ 23 | /convert_report.txt 24 | /update_report.txt 25 | .DS_Store 26 | .project 27 | .envrc 28 | /inventory.yaml 29 | /spec/fixtures/litmus_inventory.yaml 30 | .resource_types 31 | .modules 32 | .task_cache.json 33 | .plan_cache.json 34 | .rerun.json 35 | bolt-debug.log 36 | /.fixtures.yml 37 | /Gemfile 38 | /.gitattributes 39 | /.github/ 40 | /.gitignore 41 | /.pdkignore 42 | /.puppet-lint.rc 43 | /Rakefile 44 | /rakelib/ 45 | /.rspec 46 | /..yml 47 | /.yardopts 48 | /spec/ 49 | /.vscode/ 50 | /.sync.yml 51 | /.devcontainer/ 52 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'bundler' 4 | require 'puppet_litmus/rake_tasks' if Gem.loaded_specs.key? 'puppet_litmus' 5 | require 'puppetlabs_spec_helper/rake_tasks' 6 | require 'puppet-syntax/tasks/puppet-syntax' 7 | require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings' 8 | 9 | PuppetLint.configuration.send('disable_relative') 10 | PuppetLint.configuration.send('disable_80chars') 11 | PuppetLint.configuration.send('disable_140chars') 12 | PuppetLint.configuration.send('disable_class_inherits_from_params_class') 13 | PuppetLint.configuration.send('disable_autoloader_layout') 14 | PuppetLint.configuration.send('disable_documentation') 15 | PuppetLint.configuration.send('disable_single_quote_string_with_variables') 16 | PuppetLint.configuration.fail_on_warnings = true 17 | PuppetLint.configuration.ignore_paths = [".vendor/**/*.pp", ".bundle/**/*.pp", "pkg/**/*.pp", "spec/**/*.pp", "tests/**/*.pp", "types/**/*.pp", "vendor/**/*.pp"] 18 | 19 | -------------------------------------------------------------------------------- /.devcontainer/README.md: -------------------------------------------------------------------------------- 1 | # devcontainer 2 | 3 | 4 | For format details, see https://aka.ms/devcontainer.json. 5 | 6 | For config options, see the README at: 7 | https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet 8 | 9 | ``` json 10 | { 11 | "name": "Puppet Development Kit (Community)", 12 | "dockerFile": "Dockerfile", 13 | 14 | // Set *default* container specific settings.json values on container create. 15 | "settings": { 16 | "terminal.integrated.profiles.linux": { 17 | "bash": { 18 | "path": "bash", 19 | } 20 | } 21 | }, 22 | 23 | // Add the IDs of extensions you want installed when the container is created. 24 | "extensions": [ 25 | "puppet.puppet-vscode", 26 | "rebornix.Ruby" 27 | ], 28 | 29 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 30 | "forwardPorts": [], 31 | 32 | // Use 'postCreateCommand' to run commands after the container is created. 33 | "postCreateCommand": "pdk --version", 34 | } 35 | ``` 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /.gitpod.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gitpod/workspace-full 2 | RUN sudo wget https://apt.puppet.com/puppet-tools-release-bionic.deb && \ 3 | wget https://apt.puppetlabs.com/puppet6-release-bionic.deb && \ 4 | sudo dpkg -i puppet6-release-bionic.deb && \ 5 | sudo dpkg -i puppet-tools-release-bionic.deb && \ 6 | sudo apt-get update && \ 7 | sudo apt-get install -y pdk zsh puppet-agent && \ 8 | sudo apt-get clean && \ 9 | sudo rm -rf /var/lib/apt/lists/* 10 | RUN sudo usermod -s $(which zsh) gitpod && \ 11 | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \ 12 | echo "plugins=(git gitignore github gem pip bundler python ruby docker docker-compose)" >> /home/gitpod/.zshrc && \ 13 | echo 'PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin"' >> /home/gitpod/.zshrc && \ 14 | sudo /opt/puppetlabs/puppet/bin/gem install puppet-debugger hub -N && \ 15 | mkdir -p /home/gitpod/.config/puppet && \ 16 | /opt/puppetlabs/puppet/bin/ruby -r yaml -e "puts ({'disabled' => true}).to_yaml" > /home/gitpod/.config/puppet/analytics.yml 17 | RUN rm -f puppet6-release-bionic.deb puppet-tools-release-bionic.deb 18 | ENTRYPOINT /usr/bin/zsh 19 | -------------------------------------------------------------------------------- /provision.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default: 3 | provisioner: docker 4 | images: 5 | - litmusimage/centos:7 6 | vagrant: 7 | provisioner: vagrant 8 | images: 9 | - centos/7 10 | - generic/ubuntu1804 11 | - gusztavvargadr/windows-server 12 | docker_deb: 13 | provisioner: docker 14 | images: 15 | - litmusimage/debian:8 16 | - litmusimage/debian:9 17 | - litmusimage/debian:10 18 | docker_ub_6: 19 | provisioner: docker 20 | images: 21 | - litmusimage/ubuntu:14.04 22 | - litmusimage/ubuntu:16.04 23 | - litmusimage/ubuntu:18.04 24 | - litmusimage/ubuntu:20.04 25 | docker_el7: 26 | provisioner: docker 27 | images: 28 | - litmusimage/centos:7 29 | - litmusimage/oraclelinux:7 30 | - litmusimage/scientificlinux:7 31 | docker_el8: 32 | provisioner: docker 33 | images: 34 | - litmusimage/centos:8 35 | release_checks_6: 36 | provisioner: abs 37 | images: 38 | - redhat-6-x86_64 39 | - redhat-7-x86_64 40 | - redhat-8-x86_64 41 | - centos-6-x86_64 42 | - centos-7-x86_64 43 | - centos-8-x86_64 44 | - oracle-5-x86_64 45 | - oracle-6-x86_64 46 | - oracle-7-x86_64 47 | - scientific-6-x86_64 48 | - scientific-7-x86_64 49 | - debian-8-x86_64 50 | - debian-9-x86_64 51 | - debian-10-x86_64 52 | - sles-12-x86_64 53 | - sles-15-x86_64 54 | - ubuntu-1404-x86_64 55 | - ubuntu-1604-x86_64 56 | - ubuntu-1804-x86_64 57 | - ubuntu-2004-x86_64 58 | - win-2008r2-x86_64 59 | - win-2012r2-x86_64 60 | - win-2016-core-x86_64 61 | - win-2019-core-x86_64 62 | - win-10-pro-x86_64 63 | release_checks_7: 64 | provisioner: abs 65 | images: 66 | - redhat-7-x86_64 67 | - redhat-8-x86_64 68 | - centos-7-x86_64 69 | - centos-8-x86_64 70 | - oracle-7-x86_64 71 | - scientific-7-x86_64 72 | - debian-9-x86_64 73 | - debian-10-x86_64 74 | - sles-12-x86_64 75 | - sles-15-x86_64 76 | - ubuntu-1804-x86_64 77 | - ubuntu-2004-x86_64 78 | - win-2012r2-x86_64 79 | - win-2016-core-x86_64 80 | - win-2019-core-x86_64 81 | - win-10-pro-x86_64 82 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "PDK Realease checks", 8 | "type": "shell", 9 | "command": "pdk bundle exec rake release_checks" 10 | }, 11 | { 12 | "label": "PDK build and release", 13 | "type": "shell", 14 | "command": "pdk bundle exec rake module:release", 15 | "group": { 16 | "kind": "build", 17 | "isDefault": true 18 | } 19 | }, 20 | { 21 | "label": "PDK Bundle install local", 22 | "type": "shell", 23 | "command": "pdk bundle install --path vendor/bundle" 24 | }, 25 | { 26 | "label": "Litmus dependency check", 27 | "type": "shell", 28 | "command": "ruby --version && docker --version && git --version && pdk --version", 29 | "group": { 30 | "kind": "test", 31 | "isDefault": true 32 | } 33 | }, 34 | { 35 | "label": "litmus Bundle install", 36 | "type": "shell", 37 | "command": "bundle install --path .bundle/gems/" 38 | }, 39 | { 40 | "label": "litmus:provision", 41 | "type": "shell", 42 | "command": "bundle exec rake 'litmus:provision[docker, centos:7]'" 43 | }, 44 | { 45 | "label": "litmus:install_agent", 46 | "type": "shell", 47 | "command": "bundle exec rake litmus:install_agent" 48 | }, 49 | { 50 | "label": "litmus:install_module", 51 | "type": "shell", 52 | "command": "bundle exec rake litmus:install_module" 53 | }, 54 | { 55 | "label": "litmus:acceptance:parallel", 56 | "type": "shell", 57 | "command": "bundle exec rake litmus:acceptance:parallel" 58 | } 59 | 60 | ] 61 | } -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | RSpec.configure do |c| 4 | c.mock_with :rspec 5 | end 6 | 7 | require 'puppetlabs_spec_helper/module_spec_helper' 8 | require 'rspec-puppet-facts' 9 | 10 | require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb')) 11 | 12 | include RspecPuppetFacts 13 | 14 | default_facts = { 15 | puppetversion: Puppet.version, 16 | facterversion: Facter.version, 17 | } 18 | 19 | default_fact_files = [ 20 | File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')), 21 | File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')), 22 | ] 23 | 24 | default_fact_files.each do |f| 25 | next unless File.exist?(f) && File.readable?(f) && File.size?(f) 26 | 27 | begin 28 | require 'deep_merge' 29 | default_facts.deep_merge!(YAML.safe_load_file(f, permitted_classes: [], permitted_symbols: [], aliases: true)) 30 | rescue StandardError => e 31 | RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}" 32 | end 33 | end 34 | 35 | # read default_facts and merge them over what is provided by facterdb 36 | default_facts.each do |fact, value| 37 | add_custom_fact fact, value, merge_facts: true 38 | end 39 | 40 | RSpec.configure do |c| 41 | c.default_facts = default_facts 42 | c.before :each do 43 | # set to strictest setting for testing 44 | # by default Puppet runs at warning level 45 | Puppet.settings[:strict] = :warning 46 | Puppet.settings[:strict_variables] = true 47 | end 48 | c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT'] 49 | c.after(:suite) do 50 | RSpec::Puppet::Coverage.report!(0) 51 | end 52 | 53 | # Filter backtrace noise 54 | backtrace_exclusion_patterns = [ 55 | %r{spec_helper}, 56 | %r{gems}, 57 | ] 58 | 59 | if c.respond_to?(:backtrace_exclusion_patterns) 60 | c.backtrace_exclusion_patterns = backtrace_exclusion_patterns 61 | elsif c.respond_to?(:backtrace_clean_patterns) 62 | c.backtrace_clean_patterns = backtrace_exclusion_patterns 63 | end 64 | end 65 | 66 | # Ensures that a module is defined 67 | # @param module_name Name of the module 68 | def ensure_module_defined(module_name) 69 | module_name.split('::').reduce(Object) do |last_module, next_module| 70 | last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false) 71 | last_module.const_get(next_module, false) 72 | end 73 | end 74 | 75 | # 'spec_overrides' from sync.yml will appear below this line 76 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "puppetlabs-motd", 3 | "version": "7.3.0", 4 | "author": "puppetlabs", 5 | "summary": "A simple module to demonstrate managing /etc/motd or Windows Logon Message as a template", 6 | "license": "Apache-2.0", 7 | "source": "https://github.com/puppetlabs/puppetlabs-motd", 8 | "project_page": "https://github.com/puppetlabs/puppetlabs-motd", 9 | "issues_url": "https://github.com/puppetlabs/puppetlabs-motd/issues", 10 | "dependencies": [ 11 | { 12 | "name": "puppetlabs/registry", 13 | "version_requirement": ">= 1.0.0 < 6.0.0" 14 | }, 15 | { 16 | "name": "puppetlabs/stdlib", 17 | "version_requirement": ">= 2.1.0 < 10.0.0" 18 | } 19 | ], 20 | "operatingsystem_support": [ 21 | { 22 | "operatingsystem": "RedHat", 23 | "operatingsystemrelease": [ 24 | "7", 25 | "8", 26 | "9" 27 | ] 28 | }, 29 | { 30 | "operatingsystem": "CentOS", 31 | "operatingsystemrelease": [ 32 | "7", 33 | "8", 34 | "9" 35 | ] 36 | }, 37 | { 38 | "operatingsystem": "OracleLinux", 39 | "operatingsystemrelease": [ 40 | "7", 41 | "9" 42 | ] 43 | }, 44 | { 45 | "operatingsystem": "Scientific", 46 | "operatingsystemrelease": [ 47 | "7" 48 | ] 49 | }, 50 | { 51 | "operatingsystem": "Debian", 52 | "operatingsystemrelease": [ 53 | "10", 54 | "11", 55 | "12" 56 | ] 57 | }, 58 | { 59 | "operatingsystem": "SLES", 60 | "operatingsystemrelease": [ 61 | "12", 62 | "15" 63 | ] 64 | }, 65 | { 66 | "operatingsystem": "Ubuntu", 67 | "operatingsystemrelease": [ 68 | "18.04", 69 | "20.04", 70 | "22.04", 71 | "24.04" 72 | ] 73 | }, 74 | { 75 | "operatingsystem": "Windows", 76 | "operatingsystemrelease": [ 77 | "2012 R2", 78 | "2016", 79 | "2019", 80 | "2022", 81 | "10" 82 | ] 83 | }, 84 | { 85 | "operatingsystem": "Rocky", 86 | "operatingsystemrelease": [ 87 | "8", 88 | "9" 89 | ] 90 | }, 91 | { 92 | "operatingsystem": "AlmaLinux", 93 | "operatingsystemrelease": [ 94 | "8", 95 | "9" 96 | ] 97 | } 98 | ], 99 | "requirements": [ 100 | { 101 | "name": "puppet", 102 | "version_requirement": ">= 8.0.0 < 9.0.0" 103 | } 104 | ], 105 | "description": "This module simply manages /etc/motd or the Windows Logon Message as a template, showing interpolation of system attributes", 106 | "template-url": "https://github.com/puppetlabs/pdk-templates.git#main", 107 | "template-ref": "heads/main-0-g5c7dd04", 108 | "pdk-version": "3.5.1" 109 | } 110 | -------------------------------------------------------------------------------- /REFERENCE.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | 4 | 5 | ## Table of Contents 6 | 7 | ### Classes 8 | 9 | * [`motd`](#motd): This module configures a system message of the day on a wide variety of systems. 10 | 11 | ## Classes 12 | 13 | ### `motd` 14 | 15 | This module configures a system message of the day on a wide variety of systems. 16 | 17 | #### Examples 18 | 19 | ##### Basic usage 20 | 21 | ```puppet 22 | include motd 23 | ``` 24 | 25 | #### Parameters 26 | 27 | The following parameters are available in the `motd` class: 28 | 29 | * [`dynamic_motd`](#-motd--dynamic_motd) 30 | * [`template`](#-motd--template) 31 | * [`content`](#-motd--content) 32 | * [`issue_template`](#-motd--issue_template) 33 | * [`issue_content`](#-motd--issue_content) 34 | * [`issue_net_template`](#-motd--issue_net_template) 35 | * [`issue_net_content`](#-motd--issue_net_content) 36 | * [`windows_motd_title`](#-motd--windows_motd_title) 37 | 38 | ##### `dynamic_motd` 39 | 40 | Data type: `Boolean` 41 | 42 | Enables or disables dynamic motd on Debian systems. 43 | 44 | Default value: `true` 45 | 46 | ##### `template` 47 | 48 | Data type: `Optional[String]` 49 | 50 | Specifies a custom template. A template takes precedence over `content`. Valid options: '/mymodule/mytemplate.erb'. 51 | 52 | Default value: `undef` 53 | 54 | ##### `content` 55 | 56 | Data type: `Optional[String]` 57 | 58 | Specifies a static string as the motd content. 59 | 60 | Default value: `undef` 61 | 62 | ##### `issue_template` 63 | 64 | Data type: `Optional[String]` 65 | 66 | Specifies a custom template to process and save to `/etc/issue`. A template takes precedence over `issue_content`. 67 | 68 | Default value: `undef` 69 | 70 | ##### `issue_content` 71 | 72 | Data type: `Optional[String]` 73 | 74 | Specifies a static string as the `/etc/issue` content. 75 | 76 | Default value: `undef` 77 | 78 | ##### `issue_net_template` 79 | 80 | Data type: `Optional[String]` 81 | 82 | Specifies a custom template to process and save to `/etc/issue.net`. A template takes precedence over `issue_net_content`. 83 | 84 | Default value: `undef` 85 | 86 | ##### `issue_net_content` 87 | 88 | Data type: `Optional[String]` 89 | 90 | Specifies a static string as the `/etc/issue.net` content. 91 | 92 | Default value: `undef` 93 | 94 | ##### `windows_motd_title` 95 | 96 | Data type: `String` 97 | 98 | Specifies a static string to be used for: 99 | 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext' 100 | and 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption' 101 | The 'legalnoticetext' registry key is shown before login on a Windows system. 102 | 103 | Default value: `'Message of the day'` 104 | 105 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | ## 1.9.0 2 | ## Summary 3 | This release includes a change that makes this module *compatible* with AIX. 4 | 5 | #### Added 6 | - Make MOTD compatible with AIX. ([MODULES-7069](https://tickets.puppetlabs.com/browse/MODULES-7069)) 7 | - Parameter `windows_motd_title` to allow users to customize the Windows message of the day title. 8 | - Converted to the latest version of PDK (1.5.0). 9 | 10 | ## Release 1.8.0 11 | ### Summary 12 | This release includes a change that makes this module *compatible* with FreeBSD. 13 | 14 | #### Added 15 | - Make MOTD compatible with FreeBSD. ([MODULES-6599](https://tickets.puppetlabs.com/browse/MODULES-6599)) 16 | 17 | ## Release 1.7.0 18 | ### Summary 19 | Release for PDK 1.3.2 compatibility. 20 | 21 | #### Changed 22 | - Converted to the latest version of PDK. Mainly introduces travis to the release branch. 23 | 24 | ## Release 1.6.0 25 | ### Summary 26 | A release that updates motd to become PDK compatible. 27 | 28 | #### Changed 29 | - All changes in this release are the product of PDK convert, the module is now PDK compatible. 30 | 31 | ## Release 1.5.1 32 | ### Summary 33 | This release is to update the formatting of the module, rubocop having been run for all ruby files and been set to run automatically on all future commits. 34 | 35 | ### Changed 36 | - Rubocop has been implemented. 37 | 38 | ## Release 1.5.0 39 | ### Summary 40 | This release is a rollup of changes. 41 | 42 | #### Features: 43 | - Support added for Solaris SunOS. 44 | - Default MOTD message changed to provide greater out of the box usability. 45 | - Removed support for deprecated versions of Ubuntu. 46 | - Added a permissions mode for the file. 47 | 48 | #### Bug Fixes: 49 | - Changed fact processor name. 50 | 51 | ## Release 1.4.0 52 | ### Summary 53 | First Puppet Labs supported release of this module! Contains new features and bug fixes for tests. 54 | 55 | #### Features: 56 | - New readme file added for tests. Also several new tests added. 57 | - Addition of handling in tests to run with Debian 8. 58 | 59 | #### Bug Fixes: 60 | - Tests tweaked to handle several Debian versions. 61 | - Fixed acceptance tests for Windows. 62 | 63 | 64 | ## Release 1.3.0 65 | ### Summary 66 | This release adds documentation updates, test improvements, and os support. 67 | 68 | #### Features: 69 | - Acceptance testing on Linux platforms. 70 | - Rewritten documentation, inclusion of strings for automated documentation. 71 | - Linting of manifest to conform to style guidelines. 72 | - Adds support for several operating systems: 73 | - Debian 6, 7 74 | - CentOS 5, 6, 7 75 | - Oracle Linux 6, 7 76 | - Scientific Linux 5, 6, 7 77 | 78 | ### 2014-10-31 Release 1.2.0 79 | ### Summary 80 | - Add content parameter to allow setting static motd content. 81 | 82 | ## 2014-07-15 Release 1.1.1 83 | ###Summary 84 | 85 | This release merely updates metadata.json so the module can be uninstalled and 86 | upgraded via the puppet module command. 87 | 88 | ## 2014-05-28 Release 1.1.0 89 | ###Summary 90 | 91 | The main feature of this release is support for external templates. 92 | It also includes documentation and testing improvements. 93 | 94 | ####Features 95 | 96 | - Added class parameter to support external templates. 97 | - Updated README documentation. 98 | - Improved Testing. 99 | 100 | ####Fixes 101 | 102 | - Add LICENSE file. 103 | 104 | ####Known Bugs 105 | -------------------------------------------------------------------------------- /readmes/README_ja_JP.md: -------------------------------------------------------------------------------- 1 | # motd 2 | 3 | #### 目次 4 | 5 | 1. [概要](#overview) 6 | 2. [説明 - モジュールの機能とその有益性](#module-description) 7 | 3. [セットアップ - motdモジュール導入の基本](#setup) 8 | * [motdモジュールの導入](#beginning-with-the-motd-module) 9 | 4. [使用 - 設定オプションと追加機能](#usage) 10 | 5. [参考 - モジュールの機能と動作について](#reference) 11 | 6. [制約 - OS互換性など](#limitations) 12 | 7. [開発 - モジュール貢献についてのガイド](#development) 13 | 14 | ## モジュールの概要 15 | 16 | motdモジュールでは、システムが表示する「本日のメッセージ(Message of The Day)」を構成できます。このモジュールには、デフォルトのメッセージテンプレートが含まれていますが、別のテンプレートや、静的な文字列を指定することもできます。 17 | 18 | ## セットアップ 19 | 20 | ### motdモジュールの導入 21 | 22 | システムにmotdを構成するには、`include motd`と記述し、`motd`クラスをインクルードします。 23 | 24 | ## 使用 25 | 26 | motdモジュールは、幅広いシステムにおいて本日のメッセージを構成します。本モジュールは、基本テンプレートファイルの内容から、`/etc/motd`、`/etc/issue`、および`/etc/issue.net` (POSIXシステムの場合)またはレジストリキー(Windowsシステムの場合)のいずれかを生成します。 27 | 28 | デフォルトでは、モジュールは含まれているテンプレートを使用してmotdを生成しますが、別のテンプレートまたは静的な文字列を指定することもできます。たとえば、カスタムのテンプレートを使用するには、次のようにテンプレートパラメータを設定します。 29 | 30 | ```puppet 31 | class { 'motd': 32 | template => 'mymodule/mytemplate.epp', 33 | } 34 | ``` 35 | 36 | 本日のメッセージとして文字列を指定するには、次のようにします。 37 | 38 | ```puppet 39 | class { 'motd': 40 | content => "使用しないときは、ワークステーションをロックしてください\n", 41 | } 42 | ``` 43 | 44 | 45 | ## リファレンス 46 | [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-motd/blob/main/REFERENCE.md)を参照してください。 47 | 48 | #### パブリッククラス 49 | 50 | * `motd`: 本日のメッセージを構成します。 51 | 52 | #### パラメータ 53 | 54 | `motd`では、次のパラメータを使用できます。すべてのパラメータはオプションです。 55 | 56 | ##### `template` 57 | 58 | カスタムのEPPテンプレートを指定します。テンプレートは`content`より優先されます。有効なオプション: '/mymodule/mytemplate.epp'。デフォルト: 'undef'。 59 | 60 | ##### `content` 61 | 62 | motdの内容として、静的な文字列を指定します。有効なオプション: "こんにちは!\n"や"使用しないときは、ワークステーションをロックしてください\n"などの文字列。デフォルト: 'undef'。 63 | 64 | ##### `dynamic_motd` 65 | 66 | Debianシステムにおいて、動的なmotdの有効/無効を切り替えます。有効なオプション: trueまたはfalse。デフォルト: true。 67 | 68 | ##### `issue_template` 69 | 70 | 処理するカスタムEPPテンプレートを指定し、 `/etc/issue`に保存します。テンプレートは`issue_content`より優先されます。有効なオプション: '/mymodule/mytemplate.epp'。デフォルト: 'undef'。 71 | 72 | ##### `issue_content` 73 | 74 | `/etc/issue`の内容として静的な文字列を指定します。有効なオプション: "こんにちは\n"や"使用しないときは、ワークステーションをロックしてください\n"などの文字列。デフォルト: 'undef'。 75 | 76 | ##### `issue_net_template` 77 | 78 | 処理するカスタムEPPテンプレートを指定して、`/etc/issue.net`に保存します。テンプレートは`issue_net_content`より優先されます。有効なオプション: '/mymodule/mytemplate.epp'。デフォルト: 'undef'。 79 | 80 | ##### `issue_net_content` 81 | 82 | `/etc/issue.net`の内容として静的な文字列を指定します。有効なオプション: "こんにちは\n"や"使用しないときは、ワークステーションをロックしてください\n"などの文字列。デフォルト: 'undef'。 83 | 84 | ## 制約 85 | 86 | サポートされているオペレーティングシステムの一覧については、[metadata.json](https://github.com/puppetlabs/puppetlabs-motd/blob/main/metadata.json)を参照してください。 87 | 88 | 動的なmotdの無効化は、Debianのみでサポートされています。 89 | 90 | ### Windowsについての注意事項 91 | 92 | Windowsシステムでは、motdモジュールは`HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext`および`HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption`の内容を生成します。`legalnoticetext`レジストリキーは、Windowsシステムにログインする前に表示されます。 93 | 94 | ## 開発 95 | 96 | Puppet Forgeに公開されているPuppet Labsモジュールはオープンプロジェクトのため、維持するにはコミュニティの貢献が不可欠です。Puppetは、現在私たちがアクセスできない無数のプラットフォームやハードウェア、ソフトウェア、デプロイ構成にも利用されることを目的としています。私たちの目標は、できる限り簡単に変更に貢献し、みなさまの環境で私たちのモジュールが機能できるようにすることです。最高の状態を維持するため、コントリビュータにはいくつかのガイドラインを守っていただく必要があります。詳細については、[モジュールコントリビューションガイド](https://docs.puppetlabs.com/forge/contributing.html)を参照してください。 97 | 98 | ## コントリビュータ 99 | 100 | コントリビュータのリストは、[https://github.com/puppetlabs/puppetlabs-motd/graphs/contributors](https://github.com/puppetlabs/puppetlabs-motd/graphs/contributors)で見ることができます。 101 | -------------------------------------------------------------------------------- /spec/acceptance/motd_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper_acceptance' 4 | 5 | describe 'Message of the day' do 6 | context 'when static message from content' do 7 | pp = <<-PUPPETCODE 8 | class { motd: 9 | content => "Hello world!\n", 10 | } 11 | PUPPETCODE 12 | 13 | it do 14 | idempotent_apply(pp) 15 | 16 | unless os[:family] == 'windows' 17 | expect(file('/etc/motd')).to be_file 18 | expect(file('/etc/motd')).to contain("Hello world!\n") 19 | end 20 | end 21 | end 22 | 23 | context 'when static message from template' do 24 | pp = <<-PUPPETCODE 25 | class { motd: 26 | template => "motd/spec.epp", 27 | } 28 | PUPPETCODE 29 | 30 | it do 31 | idempotent_apply(pp) 32 | 33 | unless os[:family] == 'windows' 34 | expect(file('/etc/motd')).to be_file 35 | expect(file('/etc/motd')).to contain('Test Template for Rspec') 36 | end 37 | end 38 | end 39 | 40 | context 'when static message from content in /etc/issue' do 41 | pp = <<-PUPPETCODE 42 | class { motd: 43 | issue_content => "Hello world!\n", 44 | content => "Hello world!\n", 45 | } 46 | PUPPETCODE 47 | 48 | it do 49 | idempotent_apply(pp) 50 | 51 | unless os[:family] == 'windows' 52 | expect(file('/etc/issue')).to be_file 53 | expect(file('/etc/issue')).to contain("Hello world!\n") 54 | end 55 | end 56 | end 57 | 58 | context 'when static message from template in /etc/issue' do 59 | pp = <<-PUPPETCODE 60 | class { motd: 61 | issue_template => "motd/spec.epp", 62 | content => "Hello world!\n", 63 | } 64 | PUPPETCODE 65 | 66 | it do 67 | idempotent_apply(pp) 68 | 69 | unless os[:family] == 'windows' 70 | expect(file('/etc/issue')).to be_file 71 | expect(file('/etc/issue')).to contain('Test Template for Rspec') 72 | end 73 | end 74 | end 75 | 76 | context 'when static message from content in /etc/issue.net' do 77 | pp = <<-PUPPETCODE 78 | class { motd: 79 | issue_net_content => "Hello world!\n", 80 | content => "Hello world!\n", 81 | } 82 | PUPPETCODE 83 | 84 | it do 85 | idempotent_apply(pp) 86 | 87 | unless os[:family] == 'windows' 88 | expect(file('/etc/issue.net')).to be_file 89 | expect(file('/etc/issue.net')).to contain("Hello world!\n") 90 | end 91 | end 92 | end 93 | 94 | context 'when static message from template in /etc/issue.net' do 95 | pp = <<-PUPPETCODE 96 | class { motd: 97 | issue_net_template => "motd/spec.epp", 98 | content => "Hello world!\n", 99 | } 100 | PUPPETCODE 101 | 102 | it do 103 | idempotent_apply(pp) 104 | 105 | unless os[:family] == 'windows' 106 | expect(file('/etc/issue.net')).to be_file 107 | expect(file('/etc/issue.net')).to contain('Test Template for Rspec') 108 | end 109 | end 110 | end 111 | 112 | context 'when disable dynamic motd settings on Debian', if: os[:family] == 'debian' do 113 | pp = <<-PUPPETCODE 114 | class { motd: 115 | dynamic_motd => false, 116 | content => "Hello world!\n", 117 | } 118 | PUPPETCODE 119 | 120 | it do 121 | idempotent_apply(pp) 122 | 123 | unless os[:family] == 'windows' 124 | expect(file('/etc/motd')).to be_file 125 | expect(file('/etc/motd')).to contain("Hello world!\n") 126 | end 127 | end 128 | 129 | describe file('/etc/pam.d/sshd') do 130 | its(:content) { is_expected.not_to match %r{session optional pam_motd.so motd=/run/motd.dynamic} } 131 | end 132 | end 133 | end 134 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # motd 2 | 3 | #### Table of Contents 4 | 5 | 1. [Overview](#overview) 6 | 2. [Module Description - What the module does and why it is useful](#module-description) 7 | 3. [Setup - The basics of getting started with the motd module](#setup) 8 | * [Beginning with the motd module](#beginning-with-the-motd-module) 9 | 4. [Usage - Configuration options and additional functionality](#usage) 10 | 5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) 11 | 6. [Limitations - OS compatibility, etc.](#limitations) 12 | 7. [License](#license) 13 | 8. [Development - Guide for contributing to the module](#development) 14 | 15 | ## Module Description 16 | 17 | The motd module configures a system message of the day. The module includes a default message template. Alternatively, you can specify a different template or a static string. 18 | 19 | ## Setup 20 | 21 | ### Beginning with the motd module 22 | 23 | To configure motd on your system, include the `motd` class: `include motd`. 24 | 25 | ## Usage 26 | 27 | The motd module configures the message of the day on a wide variety of systems. The module populates either `/etc/motd`, `/etc/issue` and `/etc/issue.net` (on POSIX systems) or a registry key (on Windows systems) with the contents of a basic template file. 28 | 29 | By default, the module populates motd using the included template. Alternatively, you can specify a different template or a static string. For example, to use a custom template you would set the template parameter: 30 | 31 | ```puppet 32 | class { 'motd': 33 | template => 'mymodule/mytemplate.epp', 34 | } 35 | ``` 36 | 37 | To specify a string as the message of the day: 38 | 39 | ```puppet 40 | class { 'motd': 41 | content => "Hello world!\n", 42 | } 43 | ``` 44 | 45 | ## Reference 46 | 47 | See [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-motd/blob/main/REFERENCE.md) 48 | 49 | ## Limitations 50 | 51 | For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-motd/blob/main/metadata.json) 52 | 53 | Disabling dynamic motd is supported only on Debian. 54 | 55 | ### A note on Windows 56 | 57 | On Windows systems, the motd module populates the contents of `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext` and `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption`. The `legalnoticetext` registry key is shown before login on a Windows system. 58 | 59 | ## License 60 | 61 | This codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of [AGPL](https://opensource.org/license/agpl-v3/), [BSD-2](https://opensource.org/license/bsd-2-clause/), [BSD-3](https://opensource.org/license/bsd-3-clause/), [GPL2.0](https://opensource.org/license/gpl-2-0/), [LGPL](https://opensource.org/license/lgpl-3-0/), [MIT](https://opensource.org/license/mit/) and [MPL](https://opensource.org/license/mpl-2-0/) Licensing. 62 | 63 | ## Development 64 | 65 | We are experimenting with a new tool for running acceptance tests. It's name is [puppet_litmus](https://github.com/puppetlabs/puppet_litmus) this replaces beaker as the test runner. To run the acceptance tests follow the instructions [here](https://github.com/puppetlabs/puppet_litmus/wiki/Tutorial:-use-Litmus-to-execute-acceptance-tests-with-a-sample-module-(MoTD)#install-the-necessary-gems-for-the-module). 66 | 67 | Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad hardware, software, and deployment configurations that Puppet is intended to serve. We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. For more information, see our [module contribution guide.](https://puppet.com/docs/puppet/latest/contributing.html) 68 | 69 | ## Contributors 70 | 71 | The list of contributors can be found at: [https://github.com/puppetlabs/puppetlabs-motd/graphs/contributors](https://github.com/puppetlabs/puppetlabs-motd/graphs/contributors). 72 | -------------------------------------------------------------------------------- /manifests/init.pp: -------------------------------------------------------------------------------- 1 | # @summary 2 | # This module configures a system message of the day on a wide variety of systems. 3 | # 4 | # @example Basic usage 5 | # include motd 6 | # 7 | # @param dynamic_motd 8 | # Enables or disables dynamic motd on Debian systems. 9 | # 10 | # @param template 11 | # Specifies a custom template. A template takes precedence over `content`. Valid options: '/mymodule/mytemplate.erb'. 12 | # 13 | # @param content 14 | # Specifies a static string as the motd content. 15 | # 16 | # @param issue_template 17 | # Specifies a custom template to process and save to `/etc/issue`. A template takes precedence over `issue_content`. 18 | # 19 | # @param issue_content 20 | # Specifies a static string as the `/etc/issue` content. 21 | # 22 | # @param issue_net_template 23 | # Specifies a custom template to process and save to `/etc/issue.net`. A template takes precedence over `issue_net_content`. 24 | # 25 | # @param issue_net_content 26 | # Specifies a static string as the `/etc/issue.net` content. 27 | # 28 | # @param windows_motd_title 29 | # Specifies a static string to be used for: 30 | # 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext' 31 | # and 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption' 32 | # The 'legalnoticetext' registry key is shown before login on a Windows system. 33 | # 34 | class motd ( 35 | Boolean $dynamic_motd = true, 36 | Optional[String] $template = undef, 37 | Optional[String] $content = undef, 38 | Optional[String] $issue_template = undef, 39 | Optional[String] $issue_content = undef, 40 | Optional[String] $issue_net_template = undef, 41 | Optional[String] $issue_net_content = undef, 42 | String $windows_motd_title = 'Message of the day', 43 | ) { 44 | if $template { 45 | if $content { 46 | warning('Both $template and $content parameters passed to motd, ignoring content') 47 | } 48 | $motd_content = epp($template) 49 | } elsif $content { 50 | $motd_content = $content 51 | } else { 52 | $motd_content = epp('motd/motd.epp') 53 | } 54 | 55 | if $issue_template { 56 | if $issue_content { 57 | warning('Both $issue_template and $issue_content parameters passed to motd, ignoring issue_content') 58 | } 59 | $_issue_content = epp($issue_template) 60 | } elsif $issue_content { 61 | $_issue_content = $issue_content 62 | } else { 63 | $_issue_content = false 64 | } 65 | 66 | if $issue_net_template { 67 | if $issue_net_content { 68 | warning('Both $issue_net_template and $issue_net_content parameters passed to motd, ignoring issue_net_content') 69 | } 70 | $_issue_net_content = epp($issue_net_template) 71 | } elsif $issue_net_content { 72 | $_issue_net_content = $issue_net_content 73 | } else { 74 | $_issue_net_content = false 75 | } 76 | 77 | $owner = $facts['kernel'] ? { 78 | 'AIX' => 'bin', 79 | default => 'root', 80 | } 81 | 82 | $group = $facts['kernel'] ? { 83 | 'AIX' => 'bin', 84 | 'FreeBSD' => 'wheel', 85 | default => 'root', 86 | } 87 | 88 | $mode = $facts['kernel'] ? { 89 | default => '0644', 90 | } 91 | 92 | File { 93 | owner => $owner, 94 | group => $group, 95 | mode => $mode, 96 | } 97 | 98 | if $facts['kernel'] in ['Linux', 'SunOS', 'FreeBSD', 'AIX'] { 99 | if $facts['kernel'] == 'FreeBSD' { 100 | if versioncmp($facts['os']['release']['major'], '13') >= 0 { 101 | $_motd_location = '/etc/motd.template' 102 | } else { 103 | $_motd_location = '/etc/motd' 104 | } 105 | } else { 106 | $_motd_location = '/etc/motd' 107 | 108 | if $_issue_content { 109 | file { '/etc/issue': 110 | ensure => file, 111 | backup => false, 112 | content => $_issue_content, 113 | } 114 | } 115 | 116 | if $_issue_net_content { 117 | file { '/etc/issue.net': 118 | ensure => file, 119 | backup => false, 120 | content => $_issue_net_content, 121 | } 122 | } 123 | } 124 | 125 | file { $_motd_location: 126 | ensure => file, 127 | backup => false, 128 | content => $motd_content, 129 | } 130 | 131 | if ($facts['os']['family'] == 'Debian') and ($dynamic_motd == false) { 132 | if $facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '7') > 0 { 133 | $_line_to_remove = 'session optional pam_motd.so motd=/run/motd.dynamic' 134 | } elsif $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '16.00') > 0 { 135 | $_line_to_remove = 'session optional pam_motd.so motd=/run/motd.dynamic' 136 | } else { 137 | $_line_to_remove = 'session optional pam_motd.so motd=/run/motd.dynamic noupdate' 138 | } 139 | 140 | file_line { 'dynamic_motd': 141 | ensure => absent, 142 | path => '/etc/pam.d/sshd', 143 | line => $_line_to_remove, 144 | } 145 | } 146 | } elsif $facts['kernel'] == 'windows' { 147 | registry_value { 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption': 148 | ensure => present, 149 | type => string, 150 | data => $windows_motd_title, 151 | } 152 | registry_value { 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext': 153 | ensure => present, 154 | type => string, 155 | data => $motd_content, 156 | } 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # For puppetcore, set GEM_SOURCE_PUPPETCORE = 'https://rubygems-puppetcore.puppet.com' 4 | gemsource_default = ENV['GEM_SOURCE'] || 'https://rubygems.org' 5 | gemsource_puppetcore = if ENV['PUPPET_FORGE_TOKEN'] 6 | 'https://rubygems-puppetcore.puppet.com' 7 | else 8 | ENV['GEM_SOURCE_PUPPETCORE'] || gemsource_default 9 | end 10 | source gemsource_default 11 | 12 | def location_for(place_or_constraint, fake_constraint = nil, opts = {}) 13 | git_url_regex = /\A(?(?:https?|git)[:@][^#]*)(?:#(?.*))?/ 14 | file_url_regex = %r{\Afile://(?.*)} 15 | 16 | if place_or_constraint && (git_url = place_or_constraint.match(git_url_regex)) 17 | # Git source → ignore :source, keep fake_constraint 18 | [fake_constraint, { git: git_url[:url], branch: git_url[:branch], require: false }].compact 19 | 20 | elsif place_or_constraint && (file_url = place_or_constraint.match(file_url_regex)) 21 | # File source → ignore :source, keep fake_constraint or default >= 0 22 | [fake_constraint || '>= 0', { path: File.expand_path(file_url[:path]), require: false }] 23 | 24 | else 25 | # Plain version constraint → merge opts (including :source if provided) 26 | [place_or_constraint, { require: false }.merge(opts)] 27 | end 28 | end 29 | 30 | # Print debug information if DEBUG_GEMS or VERBOSE is set 31 | def print_gem_statement_for(gems) 32 | puts 'DEBUG: Gem definitions that will be generated:' 33 | gems.each do |gem_name, gem_params| 34 | puts "DEBUG: gem #{([gem_name.inspect] + gem_params.map(&:inspect)).join(', ')}" 35 | end 36 | end 37 | 38 | group :development do 39 | gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 40 | gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 41 | gem "racc", '~> 1.4.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 42 | gem "deep_merge", '~> 1.2.2', require: false 43 | gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false 44 | gem "facterdb", '~> 2.1', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 45 | gem "facterdb", '~> 3.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 46 | gem "metadata-json-lint", '~> 4.0', require: false 47 | gem "json-schema", '< 5.1.1', require: false 48 | gem "rspec-puppet-facts", '~> 4.0', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 49 | gem "rspec-puppet-facts", '~> 5.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 50 | gem "dependency_checker", '~> 1.0.0', require: false 51 | gem "parallel_tests", '= 3.12.1', require: false 52 | gem "pry", '~> 0.10', require: false 53 | gem "simplecov-console", '~> 0.9', require: false 54 | gem "puppet-debugger", '~> 1.6', require: false 55 | gem "rubocop", '~> 1.73.0', require: false 56 | gem "rubocop-performance", '~> 1.24.0', require: false 57 | gem "rubocop-rspec", '~> 3.5.0', require: false 58 | gem "rubocop-rspec_rails", '~> 2.31.0', require: false 59 | gem "rubocop-factory_bot", '~> 2.27.0', require: false 60 | gem "rubocop-capybara", '~> 2.22.0', require: false 61 | gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] 62 | gem "bigdecimal", '< 3.2.2', require: false, platforms: [:mswin, :mingw, :x64_mingw] 63 | end 64 | group :development, :release_prep do 65 | gem "puppet-strings", '~> 4.0', require: false 66 | gem "puppetlabs_spec_helper", '~> 8.0', require: false 67 | gem "puppet-blacksmith", '~> 7.0', require: false 68 | end 69 | group :system_tests do 70 | gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw] if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty? 71 | gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] if ENV['PUPPET_FORGE_TOKEN'].to_s.empty? 72 | gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw] 73 | gem "serverspec", '~> 2.41', require: false 74 | end 75 | 76 | gems = {} 77 | bolt_version = ENV.fetch('BOLT_GEM_VERSION', nil) 78 | puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil) 79 | facter_version = ENV.fetch('FACTER_GEM_VERSION', nil) 80 | hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil) 81 | 82 | gems['bolt'] = location_for(bolt_version, nil, { source: gemsource_puppetcore }) 83 | gems['puppet'] = location_for(puppet_version, nil, { source: gemsource_puppetcore }) 84 | gems['facter'] = location_for(facter_version, nil, { source: gemsource_puppetcore }) 85 | gems['hiera'] = location_for(hiera_version, nil, {}) if hiera_version 86 | 87 | # Generate the gem definitions 88 | print_gem_statement_for(gems) if ENV['DEBUG'] 89 | gems.each do |gem_name, gem_params| 90 | gem gem_name, *gem_params 91 | end 92 | 93 | # Evaluate Gemfile.local and ~/.gemfile if they exist 94 | extra_gemfiles = [ 95 | "#{__FILE__}.local", 96 | File.join(Dir.home, '.gemfile') 97 | ] 98 | 99 | extra_gemfiles.each do |gemfile| 100 | next unless File.file?(gemfile) && File.readable?(gemfile) 101 | 102 | # rubocop:disable Security/Eval 103 | eval(File.read(gemfile), binding) 104 | # rubocop:enable Security/Eval 105 | end 106 | # vim: syntax=ruby 107 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /spec/classes/motd_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe 'motd', type: :class do 6 | describe 'On a non-linux system' do 7 | let(:facts) do 8 | { 9 | kernel: 'Unknown', 10 | os: { 11 | name: 'Unknown', 12 | family: 'Unknown', 13 | architecture: 'Unknown', 14 | release: { 15 | major: 'Unknown' 16 | } 17 | }, 18 | memory: { 19 | system: { 20 | available: 'Unknown' 21 | } 22 | }, 23 | processors: { 24 | models: [ 25 | 'Unknown', 26 | ] 27 | } 28 | } 29 | end 30 | 31 | it 'does not fail' do 32 | expect(subject).not_to raise_error 33 | end 34 | 35 | it { is_expected.not_to contain_file('/etc/motd') } 36 | it { is_expected.not_to contain_file('/etc/issue') } 37 | it { is_expected.not_to contain_file('/etc/issue.net') } 38 | end 39 | 40 | describe 'On Linux' do 41 | let(:facts) { on_supported_os['redhat-9-x86_64'] } 42 | 43 | context 'when neither template or source are specified' do 44 | it do 45 | expect(subject).to contain_File('/etc/motd').with( 46 | ensure: 'file', backup: 'false', 47 | # The following Regex checks for the matching content in this comment and allows for two different IP values to be matched after foo.example.com. This is a workaround to ensure that PDK 48 | # integration testing passes while the MOTD unit tests dont break. The string we are looking for is: 49 | # "RedHat 9.3 x86_64\n\nFQDN: foo.example.com (172.16.254.254 OR 10.109.1.2)\n 50 | # Processor: (Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz OR AMD Ryzen 7 PRO 4750U with Radeon Graphic)s\nKernel: Linux\nMemory Size: 1.44 GiB\n", 51 | content: %r{RedHat\s9\.3\sx86_64\n\nFQDN:\s*foo\.example\.com\s\(\d*\.\d*\.\d*\.\d*\)\nProcessor:\s*(Intel\(R\)\sXeon\(R\)|AMD\sRyzen).*\nKernel:\s*Linux\nMemory\sSize:\s*\d+\.\d+\sGiB}, 52 | owner: 'root', group: 'root', mode: '0644' 53 | ) 54 | end 55 | end 56 | 57 | context 'when both template and source are specified' do 58 | let(:params) do 59 | { 60 | content: 'Hello!', 61 | template: 'motd/spec.epp' 62 | } 63 | end 64 | 65 | it do 66 | expect(subject).to contain_File('/etc/motd').with( 67 | ensure: 'file', 68 | backup: 'false', 69 | content: "Test Template for Rspec\n", 70 | ) 71 | end 72 | end 73 | 74 | context 'when a source is specified' do 75 | let(:params) { { content: 'Hello!' } } 76 | 77 | it do 78 | expect(subject).to contain_File('/etc/motd').with( 79 | ensure: 'file', 80 | backup: 'false', 81 | content: 'Hello!', 82 | ) 83 | end 84 | end 85 | 86 | context 'when an external template is specified' do 87 | let(:params) { { template: 'motd/spec.epp' } } 88 | 89 | it do 90 | expect(subject).to contain_File('/etc/motd').with( 91 | ensure: 'file', 92 | backup: 'false', 93 | content: "Test Template for Rspec\n", 94 | ) 95 | end 96 | end 97 | 98 | context 'when a template is specified for /etc/issue' do 99 | let(:params) { { issue_template: 'motd/spec.epp' } } 100 | 101 | it do 102 | expect(subject).to contain_File('/etc/issue').with( 103 | ensure: 'file', backup: 'false', 104 | content: "Test Template for Rspec\n", 105 | owner: 'root', group: 'root', mode: '0644' 106 | ) 107 | end 108 | end 109 | 110 | context 'when content is specified for /etc/issue' do 111 | let(:params) { { issue_content: 'Hello!' } } 112 | 113 | it do 114 | expect(subject).to contain_File('/etc/issue').with( 115 | ensure: 'file', 116 | backup: 'false', 117 | content: 'Hello!', 118 | ) 119 | end 120 | end 121 | 122 | context 'when both content and template is specified for /etc/issue' do 123 | # FIXME: duplicate behaviour described in FM-5956 until I'm allowed to fix it 124 | let(:params) do 125 | { 126 | issue_content: 'Hello!', 127 | issue_template: 'motd/spec.epp' 128 | } 129 | end 130 | 131 | it do 132 | expect(subject).to contain_File('/etc/issue').with( 133 | ensure: 'file', 134 | backup: 'false', 135 | content: "Test Template for Rspec\n", 136 | ) 137 | end 138 | end 139 | 140 | context 'when a template is specified for /etc/issue.net' do 141 | let(:params) { { issue_net_template: 'motd/spec.epp' } } 142 | 143 | it do 144 | expect(subject).to contain_File('/etc/issue.net').with( 145 | ensure: 'file', backup: 'false', 146 | content: "Test Template for Rspec\n", 147 | owner: 'root', group: 'root', mode: '0644' 148 | ) 149 | end 150 | end 151 | 152 | context 'when content is specified for /etc/issue.net' do 153 | let(:params) { { issue_net_content: 'Hello!' } } 154 | 155 | it do 156 | expect(subject).to contain_File('/etc/issue.net').with( 157 | ensure: 'file', 158 | backup: 'false', 159 | content: 'Hello!', 160 | ) 161 | end 162 | end 163 | 164 | context 'when both content and template is specified for /etc/issue.net' do 165 | # FIXME: duplicate behaviour described in FM-5956 until I'm allowed to fix it 166 | let(:params) do 167 | { 168 | issue_net_content: 'Hello!', 169 | issue_net_template: 'motd/spec.epp' 170 | } 171 | end 172 | 173 | it do 174 | expect(subject).to contain_File('/etc/issue.net').with( 175 | ensure: 'file', 176 | backup: 'false', 177 | content: "Test Template for Rspec\n", 178 | ) 179 | end 180 | end 181 | end 182 | 183 | describe 'On Debian based Operating Systems' do 184 | let(:facts) { on_supported_os['debian-11-x86_64'] } 185 | 186 | context 'when dynamic motd is false' do 187 | let(:params) { { dynamic_motd: false } } 188 | 189 | it { is_expected.to contain_file_line('dynamic_motd').with_line('session optional pam_motd.so motd=/run/motd.dynamic') } 190 | end 191 | 192 | context 'when dynamic motd is true' do 193 | let(:params) { { dynamic_motd: true } } 194 | 195 | it { is_expected.not_to contain_file_line('dynamic_motd') } 196 | end 197 | end 198 | 199 | describe 'On Windows' do 200 | let(:facts) { on_supported_os['windows-10-x86_64'] } 201 | 202 | context 'when neither template or source are specified' do 203 | it do 204 | expect(subject).to contain_Registry_value('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext').with( 205 | ensure: 'present', 206 | type: 'string', 207 | # The following Regex checks for the matching content in this comment and allows for two different IP values to be matched after foo.example.com. This is a workaround to ensure that PDK 208 | # integration testing passes while the MOTD unit tests dont break. The string we are looking for is: 209 | # "windows 10 x64\n\nFQDN: foo.example.com (172.16.254.254)\nProcessor: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz\nKernel: windows\nMemory Size: 14.34 GiB\n", 210 | # or 211 | # "windows 10 x64\n\nFQDN: foo.example.com (172.16.254.254)\nProcessor: 12th Gen Intel(R) Core(TM) i9-12900K\nKernel: windows\nMemory Size: 1.53 GiB" 212 | data: %r{windows\s10\sx64\n\nFQDN:\s*foo.example.com\s\(\d*\.\d*\.\d*\.\d*\)\nProcessor:\s*(?:Intel\(R\)\sXeon\(R\)|12th\sGen\sIntel).*\nKernel:\s*windows\nMemory\sSize:\s*\d+\.\d+\sGiB}, 213 | ) 214 | end 215 | end 216 | 217 | context 'when content is specified' do 218 | let(:params) do 219 | { 220 | content: 'Hello!', 221 | windows_motd_title: 'This is the title.' 222 | } 223 | end 224 | 225 | it do 226 | expect(subject).to contain_Registry_value('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext').with( 227 | ensure: 'present', 228 | type: 'string', 229 | data: 'Hello!', 230 | ) 231 | end 232 | 233 | it do 234 | expect(subject).to contain_Registry_value('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption').with( 235 | ensure: 'present', 236 | type: 'string', 237 | data: 'This is the title.', 238 | ) 239 | end 240 | end 241 | end 242 | 243 | describe 'On FreeBSD' do 244 | # let(:facts) { on_supported_os['freebsd-12-amd64'] } 245 | let :facts do 246 | { 247 | kernel: 'FreeBSD', 248 | path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 249 | os: { 250 | name: 'FreeBSD', 251 | family: 'FreeBSD', 252 | architecture: 'amd64', 253 | release: { 254 | full: '11', 255 | major: '11' 256 | } 257 | }, 258 | networking: { 259 | fqdn: 'test.example.com', 260 | ip: '123.23.243.1' 261 | }, 262 | memory: { 263 | system: { 264 | available: '16.00 GB' 265 | } 266 | }, 267 | processors: { 268 | models: [ 269 | 'intel', 270 | ] 271 | } 272 | } 273 | end 274 | 275 | context 'when neither template or source are specified' do 276 | it do 277 | expect(subject).to contain_File('/etc/motd').with( 278 | ensure: 'file', 279 | backup: 'false', 280 | content: "FreeBSD 11 amd64\n\nFQDN: test.example.com (123.23.243.1)\nProcessor: intel\nKernel: FreeBSD\nMemory Size: 16.00 GB\n", 281 | ) 282 | end 283 | end 284 | 285 | context 'when both template and source are specified' do 286 | let(:params) do 287 | { 288 | content: 'Hello!', 289 | template: 'motd/spec.epp' 290 | } 291 | end 292 | 293 | it do 294 | expect(subject).to contain_File('/etc/motd').with( 295 | ensure: 'file', 296 | backup: 'false', 297 | content: "Test Template for Rspec\n", 298 | ) 299 | end 300 | end 301 | 302 | context 'when a source is specified' do 303 | let(:params) { { content: 'Hello!' } } 304 | 305 | it do 306 | expect(subject).to contain_File('/etc/motd').with( 307 | ensure: 'file', 308 | backup: 'false', 309 | content: 'Hello!', 310 | ) 311 | end 312 | end 313 | 314 | context 'when an external template is specified' do 315 | let(:params) { { template: 'motd/spec.epp' } } 316 | 317 | it do 318 | expect(subject).to contain_File('/etc/motd').with( 319 | ensure: 'file', 320 | backup: 'false', 321 | content: "Test Template for Rspec\n", 322 | ) 323 | end 324 | end 325 | end 326 | 327 | describe 'On AIX' do 328 | # let(:facts) { on_supported_os['aix-7.1-power'] } 329 | let :facts do 330 | { 331 | kernel: 'AIX', 332 | path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 333 | os: { 334 | name: 'AIX', 335 | family: 'AIX', 336 | architecture: 'PowerPC_POWER8', 337 | release: { 338 | full: '7100-04-02-1614' 339 | } 340 | }, 341 | networking: { 342 | fqdn: 'test.example.com', 343 | ip: '123.23.243.1' 344 | }, 345 | memory: { 346 | system: { 347 | available: '16.00 GB' 348 | } 349 | }, 350 | processors: { 351 | models: [ 352 | 'PowerPC_POWER8', 353 | ] 354 | } 355 | } 356 | end 357 | 358 | context 'when neither template or source are specified' do 359 | it do 360 | expect(subject).to contain_File('/etc/motd').with( 361 | ensure: 'file', backup: 'false', 362 | content: "AIX 7100-04-02-1614 PowerPC_POWER8\n\nFQDN: test.example.com (123.23.243.1)\nProcessor: \PowerPC_POWER8\nKernel: AIX\nMemory Size: 16.00 GB\n", 363 | owner: 'bin', group: 'bin', mode: '0644' 364 | ) 365 | end 366 | end 367 | 368 | context 'when a template is specified for /etc/issue' do 369 | let(:params) { { issue_template: 'motd/spec.epp' } } 370 | 371 | it do 372 | expect(subject).to contain_File('/etc/issue').with( 373 | ensure: 'file', backup: 'false', 374 | content: "Test Template for Rspec\n", 375 | owner: 'bin', group: 'bin', mode: '0644' 376 | ) 377 | end 378 | end 379 | 380 | context 'when a template is specified for /etc/issue.net' do 381 | let(:params) { { issue_net_template: 'motd/spec.epp' } } 382 | 383 | it do 384 | expect(subject).to contain_File('/etc/issue.net').with( 385 | ensure: 'file', backup: 'false', 386 | content: "Test Template for Rspec\n", 387 | owner: 'bin', group: 'bin', mode: '0644' 388 | ) 389 | end 390 | end 391 | end 392 | end 393 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | # Changelog 3 | 4 | All notable changes to this project will be documented in this file. 5 | 6 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). 7 | 8 | ## [v7.3.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v7.3.0) - 2025-04-18 9 | 10 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v7.2.0...v7.3.0) 11 | 12 | ### Added 13 | 14 | - (MODULES-11473) Add windows 2022 support [#526](https://github.com/puppetlabs/puppetlabs-motd/pull/526) ([amitkarsale](https://github.com/amitkarsale)) 15 | 16 | ## [v7.2.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v7.2.0) - 2024-12-17 17 | 18 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v7.1.0...v7.2.0) 19 | 20 | ### Added 21 | 22 | - (CAT-2124) Add support for Ubuntu 24 [#522](https://github.com/puppetlabs/puppetlabs-motd/pull/522) ([skyamgarp](https://github.com/skyamgarp)) 23 | - (CAT-2100) Add Debian 12 support [#521](https://github.com/puppetlabs/puppetlabs-motd/pull/521) ([shubhamshinde360](https://github.com/shubhamshinde360)) 24 | 25 | ### Fixed 26 | 27 | - (CAT-2180) Upgrade rexml to address CVE-2024-49761 [#523](https://github.com/puppetlabs/puppetlabs-motd/pull/523) ([amitkarsale](https://github.com/amitkarsale)) 28 | - (BUGFIX) Update values to correctly reflect what is expected [#508](https://github.com/puppetlabs/puppetlabs-motd/pull/508) ([david22swan](https://github.com/david22swan)) 29 | 30 | ## [v7.1.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v7.1.0) - 2023-06-20 31 | 32 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v7.0.0...v7.1.0) 33 | 34 | ### Added 35 | 36 | - pdksync - (MAINT) - Allow Stdlib 9.x [#487](https://github.com/puppetlabs/puppetlabs-motd/pull/487) ([LukasAud](https://github.com/LukasAud)) 37 | 38 | ### Fixed 39 | 40 | - (CONT-860) Update registry dependency [#475](https://github.com/puppetlabs/puppetlabs-motd/pull/475) ([LukasAud](https://github.com/LukasAud)) 41 | 42 | ## [v7.0.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v7.0.0) - 2023-04-05 43 | 44 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v6.3.0...v7.0.0) 45 | 46 | ### Changed 47 | 48 | - (Cont 787) Add Support for Puppet 8 / Drop Support for Puppet 6 [#472](https://github.com/puppetlabs/puppetlabs-motd/pull/472) ([david22swan](https://github.com/david22swan)) 49 | 50 | ### Fixed 51 | 52 | - pdksync - (CONT-189) Remove support for RedHat6 / OracleLinux6 / Scientific6 [#456](https://github.com/puppetlabs/puppetlabs-motd/pull/456) ([david22swan](https://github.com/david22swan)) 53 | - pdksync - (CONT-130) - Dropping Support for Debian 9 [#450](https://github.com/puppetlabs/puppetlabs-motd/pull/450) ([jordanbreen28](https://github.com/jordanbreen28)) 54 | 55 | ## [v6.3.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v6.3.0) - 2022-10-03 56 | 57 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v6.2.0...v6.3.0) 58 | 59 | ### Added 60 | 61 | - pdksync - (GH-cat-11) Certify Support for Ubuntu 22.04 [#447](https://github.com/puppetlabs/puppetlabs-motd/pull/447) ([david22swan](https://github.com/david22swan)) 62 | - pdksync - (GH-cat-12) Add Support for Redhat 9 [#446](https://github.com/puppetlabs/puppetlabs-motd/pull/446) ([david22swan](https://github.com/david22swan)) 63 | 64 | ### Fixed 65 | 66 | - (MAINT) Dropped support for Windows Server 2008 R2 and FreeBSD [#448](https://github.com/puppetlabs/puppetlabs-motd/pull/448) ([jordanbreen28](https://github.com/jordanbreen28)) 67 | 68 | ## [v6.2.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v6.2.0) - 2022-05-30 69 | 70 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v6.1.0...v6.2.0) 71 | 72 | ### Added 73 | 74 | - Update motd location for FreeBSD 13 and above [#431](https://github.com/puppetlabs/puppetlabs-motd/pull/431) ([Scnaeg](https://github.com/Scnaeg)) 75 | - pdksync - (IAC-1753) - Add Support for AlmaLinux 8 [#428](https://github.com/puppetlabs/puppetlabs-motd/pull/428) ([david22swan](https://github.com/david22swan)) 76 | - pdksync - (IAC-1751) - Add Support for Rocky 8 [#427](https://github.com/puppetlabs/puppetlabs-motd/pull/427) ([david22swan](https://github.com/david22swan)) 77 | 78 | ### Fixed 79 | 80 | - pdksync - (GH-iac-334) Remove Support for Ubuntu 16.04 [#433](https://github.com/puppetlabs/puppetlabs-motd/pull/433) ([david22swan](https://github.com/david22swan)) 81 | - pdksync - (IAC-1787) Remove Support for CentOS 6 [#430](https://github.com/puppetlabs/puppetlabs-motd/pull/430) ([david22swan](https://github.com/david22swan)) 82 | - pdksync - (IAC-1598) - Remove Support for Debian 8 [#426](https://github.com/puppetlabs/puppetlabs-motd/pull/426) ([david22swan](https://github.com/david22swan)) 83 | 84 | ## [v6.1.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v6.1.0) - 2021-08-26 85 | 86 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v6.0.0...v6.1.0) 87 | 88 | ### Added 89 | 90 | - pdksync - (IAC-1709) - Add Support for Debian 11 [#420](https://github.com/puppetlabs/puppetlabs-motd/pull/420) ([david22swan](https://github.com/david22swan)) 91 | 92 | ### Fixed 93 | 94 | - (IAC-1741) Allow stdlib v8.0.0 [#421](https://github.com/puppetlabs/puppetlabs-motd/pull/421) ([david22swan](https://github.com/david22swan)) 95 | 96 | ## [v6.0.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v6.0.0) - 2021-05-10 97 | 98 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v5.0.0...v6.0.0) 99 | 100 | ### Fixed 101 | 102 | - (IAC-1497) - Removal of unsupported `translate` dependency [#404](https://github.com/puppetlabs/puppetlabs-motd/pull/404) ([david22swan](https://github.com/david22swan)) 103 | 104 | ## [v5.0.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v5.0.0) - 2021-03-01 105 | 106 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v4.3.0...v5.0.0) 107 | 108 | ### Changed 109 | 110 | - Update metadata.json - remove ubuntu 14.04 [#401](https://github.com/puppetlabs/puppetlabs-motd/pull/401) ([daianamezdrea](https://github.com/daianamezdrea)) 111 | - pdksync - Remove SLES 11 support [#399](https://github.com/puppetlabs/puppetlabs-motd/pull/399) ([sanfrancrisko](https://github.com/sanfrancrisko)) 112 | - pdksync - Remove RHEL 5 family support [#398](https://github.com/puppetlabs/puppetlabs-motd/pull/398) ([sanfrancrisko](https://github.com/sanfrancrisko)) 113 | - pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0 [#394](https://github.com/puppetlabs/puppetlabs-motd/pull/394) ([carabasdaniel](https://github.com/carabasdaniel)) 114 | 115 | ## [v4.3.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v4.3.0) - 2020-12-14 116 | 117 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v4.2.0...v4.3.0) 118 | 119 | ### Added 120 | 121 | - pdksync - (feat) - Add support for Puppet 7 [#369](https://github.com/puppetlabs/puppetlabs-motd/pull/369) ([daianamezdrea](https://github.com/daianamezdrea)) 122 | 123 | ## [v4.2.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v4.2.0) - 2020-08-20 124 | 125 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v4.1.1...v4.2.0) 126 | 127 | ### Added 128 | 129 | - (IAC-974) - Removal of inappropriate terminology [#326](https://github.com/puppetlabs/puppetlabs-motd/pull/326) ([david22swan](https://github.com/david22swan)) 130 | - pdksync - (IAC-973) - Update travis/appveyor to run on new default branch main [#320](https://github.com/puppetlabs/puppetlabs-motd/pull/320) ([david22swan](https://github.com/david22swan)) 131 | - (IAC-746) - Add ubuntu 20.04 support [#309](https://github.com/puppetlabs/puppetlabs-motd/pull/309) ([david22swan](https://github.com/david22swan)) 132 | 133 | ## [v4.1.1](https://github.com/puppetlabs/puppetlabs-motd/tree/v4.1.1) - 2020-05-19 134 | 135 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v4.1.0...v4.1.1) 136 | 137 | ### Fixed 138 | 139 | - (MAINT) Ensure FreeBSD compatibility [#271](https://github.com/puppetlabs/puppetlabs-motd/pull/271) ([dandrzejewski](https://github.com/dandrzejewski)) 140 | 141 | ## [v4.1.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v4.1.0) - 2020-01-21 142 | 143 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v4.0.0...v4.1.0) 144 | 145 | ### Added 146 | 147 | - (MODULES-10242) Add back support for Ubuntu 14.04 [#267](https://github.com/puppetlabs/puppetlabs-motd/pull/267) ([sheenaajay](https://github.com/sheenaajay)) 148 | - (FM-8691) - Addition of Support for CentOS 8 [#264](https://github.com/puppetlabs/puppetlabs-motd/pull/264) ([david22swan](https://github.com/david22swan)) 149 | 150 | ### Fixed 151 | 152 | - (MODULES-10387) Raise lower bound for puppetlabs-registry dependency to 4.0.0 [#276](https://github.com/puppetlabs/puppetlabs-motd/pull/276) ([daianamezdrea](https://github.com/daianamezdrea)) 153 | 154 | ## [v4.0.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v4.0.0) - 2019-11-11 155 | 156 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v3.1.0...v4.0.0) 157 | 158 | ### Changed 159 | 160 | - pdksync - FM-8499 - remove ubuntu14 support [#262](https://github.com/puppetlabs/puppetlabs-motd/pull/262) ([lionce](https://github.com/lionce)) 161 | 162 | ### Added 163 | 164 | - FM-8405 Debian10 support [#242](https://github.com/puppetlabs/puppetlabs-motd/pull/242) ([lionce](https://github.com/lionce)) 165 | 166 | ## [v3.1.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v3.1.0) - 2019-08-01 167 | 168 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/v3.0.0...v3.1.0) 169 | 170 | ### Added 171 | 172 | - (MODULES-9653) Add Windows Server 2019 support [#235](https://github.com/puppetlabs/puppetlabs-motd/pull/235) ([eimlav](https://github.com/eimlav)) 173 | - FM-8043 - redhat8 support [#222](https://github.com/puppetlabs/puppetlabs-motd/pull/222) ([lionce](https://github.com/lionce)) 174 | 175 | ### Fixed 176 | 177 | - (bugfix) allow private keys in ssh testing [#223](https://github.com/puppetlabs/puppetlabs-motd/pull/223) ([tphoney](https://github.com/tphoney)) 178 | 179 | ## [v3.0.0](https://github.com/puppetlabs/puppetlabs-motd/tree/v3.0.0) - 2019-05-20 180 | 181 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/2.1.2...v3.0.0) 182 | 183 | ### Changed 184 | 185 | - pdksync - (MODULES-8444) - Raise lower Puppet bound [#208](https://github.com/puppetlabs/puppetlabs-motd/pull/208) ([david22swan](https://github.com/david22swan)) 186 | 187 | ### Added 188 | 189 | - simplistic support for vscode integration to litmus added [#212](https://github.com/puppetlabs/puppetlabs-motd/pull/212) ([abuxton](https://github.com/abuxton)) 190 | - (MODULES-8767) Add support for SLES 15 [#205](https://github.com/puppetlabs/puppetlabs-motd/pull/205) ([eimlav](https://github.com/eimlav)) 191 | - (FM-7647) use puppet_litmus for acceptance testing [#200](https://github.com/puppetlabs/puppetlabs-motd/pull/200) ([tphoney](https://github.com/tphoney)) 192 | 193 | ### Fixed 194 | 195 | - (bugfix) remove scientific 5 testing [#217](https://github.com/puppetlabs/puppetlabs-motd/pull/217) ([tphoney](https://github.com/tphoney)) 196 | - (FM-8073) litmus block support [#216](https://github.com/puppetlabs/puppetlabs-motd/pull/216) ([tphoney](https://github.com/tphoney)) 197 | - (bugfix) changes needed for litmus 0.1.0 release [#214](https://github.com/puppetlabs/puppetlabs-motd/pull/214) ([tphoney](https://github.com/tphoney)) 198 | - (MODULES-8758) Change memoryfree to memorysize in template [#204](https://github.com/puppetlabs/puppetlabs-motd/pull/204) ([eimlav](https://github.com/eimlav)) 199 | 200 | ## [2.1.2](https://github.com/puppetlabs/puppetlabs-motd/tree/2.1.2) - 2019-01-24 201 | 202 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/2.1.1...2.1.2) 203 | 204 | ### Fixed 205 | 206 | - pdksync - (FM-7655) Fix rubygems-update for ruby < 2.3 [#188](https://github.com/puppetlabs/puppetlabs-motd/pull/188) ([tphoney](https://github.com/tphoney)) 207 | 208 | ## [2.1.1](https://github.com/puppetlabs/puppetlabs-motd/tree/2.1.1) - 2018-09-28 209 | 210 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/2.1.0...2.1.1) 211 | 212 | ### Fixed 213 | 214 | - (fix) - Changelog Fix [#171](https://github.com/puppetlabs/puppetlabs-motd/pull/171) ([david22swan](https://github.com/david22swan)) 215 | 216 | ## [2.1.0](https://github.com/puppetlabs/puppetlabs-motd/tree/2.1.0) - 2018-09-28 217 | 218 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/2.0.0...2.1.0) 219 | 220 | ### Added 221 | 222 | - pdksync - (MODULES-6805) metadata.json shows support for puppet 6 [#164](https://github.com/puppetlabs/puppetlabs-motd/pull/164) ([tphoney](https://github.com/tphoney)) 223 | 224 | ## [2.0.0](https://github.com/puppetlabs/puppetlabs-motd/tree/2.0.0) - 2018-09-19 225 | 226 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.9.0...2.0.0) 227 | 228 | ### Changed 229 | 230 | - [FM-6965] Removal of unsupported OS from motd [#131](https://github.com/puppetlabs/puppetlabs-motd/pull/131) ([david22swan](https://github.com/david22swan)) 231 | 232 | ### Added 233 | 234 | - (FM-7310)- Updating Windows version support [#156](https://github.com/puppetlabs/puppetlabs-motd/pull/156) ([lionce](https://github.com/lionce)) 235 | - (FM-7306) - Added Puppet 4 data types and changed templates to .epp [#152](https://github.com/puppetlabs/puppetlabs-motd/pull/152) ([eimlav](https://github.com/eimlav)) 236 | - (FM-7307) - added translation functionality [#150](https://github.com/puppetlabs/puppetlabs-motd/pull/150) ([Lavinia-Dan](https://github.com/Lavinia-Dan)) 237 | - (maint) removing registry pin, update stdlib bound [#145](https://github.com/puppetlabs/puppetlabs-motd/pull/145) ([tphoney](https://github.com/tphoney)) 238 | - (FM-7237) - Addition of support for Ubuntu 18.04 on motd [#140](https://github.com/puppetlabs/puppetlabs-motd/pull/140) ([david22swan](https://github.com/david22swan)) 239 | 240 | ## [1.9.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.9.0) - 2018-05-04 241 | 242 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.8.0...1.9.0) 243 | 244 | ### Added 245 | 246 | - (MODULES-7069) Add compatibility for AIX [#115](https://github.com/puppetlabs/puppetlabs-motd/pull/115) ([jarretlavallee](https://github.com/jarretlavallee)) 247 | - windows_motd_title parameter added [#108](https://github.com/puppetlabs/puppetlabs-motd/pull/108) ([cgpeanut](https://github.com/cgpeanut)) 248 | 249 | ## [1.8.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.8.0) - 2018-02-20 250 | 251 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.7.0...1.8.0) 252 | 253 | ### Added 254 | 255 | - (MODULES-6599) Make MOTD compatible with FreeBSD [#104](https://github.com/puppetlabs/puppetlabs-motd/pull/104) ([Q1tum](https://github.com/Q1tum)) 256 | 257 | ## [1.7.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.7.0) - 2018-01-22 258 | 259 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.6.0...1.7.0) 260 | 261 | ## [1.6.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.6.0) - 2018-01-04 262 | 263 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.5.1...1.6.0) 264 | 265 | ### Added 266 | 267 | - Convert module to PDK standards using pdk convert [#89](https://github.com/puppetlabs/puppetlabs-motd/pull/89) ([davinhanlon](https://github.com/davinhanlon)) 268 | 269 | ## [1.5.1](https://github.com/puppetlabs/puppetlabs-motd/tree/1.5.1) - 2017-10-31 270 | 271 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.5.0...1.5.1) 272 | 273 | ## [1.5.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.5.0) - 2017-10-24 274 | 275 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.4.0...1.5.0) 276 | 277 | ### Added 278 | 279 | - Add set mode for File [#81](https://github.com/puppetlabs/puppetlabs-motd/pull/81) ([willmeek](https://github.com/willmeek)) 280 | - Added Solaris support to motd [#74](https://github.com/puppetlabs/puppetlabs-motd/pull/74) ([wfsaxton](https://github.com/wfsaxton)) 281 | - (#5955) Support for /etc/issue and /etc/issue.net [#60](https://github.com/puppetlabs/puppetlabs-motd/pull/60) ([GeoffWilliams](https://github.com/GeoffWilliams)) 282 | 283 | ### Fixed 284 | 285 | - (MODULES-5468) removed 'delete appveyor' code from .sync.yml [#77](https://github.com/puppetlabs/puppetlabs-motd/pull/77) ([8675309](https://github.com/8675309)) 286 | - (MODULES-3593) Changes default MOTD to something more useful [#76](https://github.com/puppetlabs/puppetlabs-motd/pull/76) ([8675309](https://github.com/8675309)) 287 | - Corrected SLES version [#67](https://github.com/puppetlabs/puppetlabs-motd/pull/67) ([cetanu](https://github.com/cetanu)) 288 | - [MODULES-4556] Remove PE requirement from metadata.json [#66](https://github.com/puppetlabs/puppetlabs-motd/pull/66) ([wilson208](https://github.com/wilson208)) 289 | 290 | ## [1.4.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.4.0) - 2016-01-25 291 | 292 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.3.0...1.4.0) 293 | 294 | ### Added 295 | 296 | - (FM-3924) Create Master/Agent automation test for Puppetlabs-motd [#29](https://github.com/puppetlabs/puppetlabs-motd/pull/29) ([phongdly](https://github.com/phongdly)) 297 | 298 | ## [1.3.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.3.0) - 2015-12-10 299 | 300 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.2.0...1.3.0) 301 | 302 | ### Added 303 | 304 | - Added option to disable dynamic motd on Debian based systems [#20](https://github.com/puppetlabs/puppetlabs-motd/pull/20) ([dlactin](https://github.com/dlactin)) 305 | - Added logic for Windows Logon Message [#19](https://github.com/puppetlabs/puppetlabs-motd/pull/19) ([ncorrare](https://github.com/ncorrare)) 306 | 307 | ### Fixed 308 | 309 | - Use strings for parameter documentation MODULES-2664 [#26](https://github.com/puppetlabs/puppetlabs-motd/pull/26) ([borcean](https://github.com/borcean)) 310 | - Fix for MODULES-2590 [#22](https://github.com/puppetlabs/puppetlabs-motd/pull/22) ([HelenCampbell](https://github.com/HelenCampbell)) 311 | - Add missing stdlib fixture [#21](https://github.com/puppetlabs/puppetlabs-motd/pull/21) ([arioch](https://github.com/arioch)) 312 | 313 | ## [1.2.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.2.0) - 2014-11-04 314 | 315 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.1.1...1.2.0) 316 | 317 | ### Added 318 | 319 | - Add source parameter to motd [#16](https://github.com/puppetlabs/puppetlabs-motd/pull/16) ([adreyer](https://github.com/adreyer)) 320 | 321 | ## [1.1.1](https://github.com/puppetlabs/puppetlabs-motd/tree/1.1.1) - 2014-07-15 322 | 323 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.1.0...1.1.1) 324 | 325 | ## [1.1.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.1.0) - 2014-05-28 326 | 327 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.0.1...1.1.0) 328 | 329 | ### Added 330 | 331 | - add test and ERB conditional logic for when ::domain not present [#13](https://github.com/puppetlabs/puppetlabs-motd/pull/13) ([nrvale0](https://github.com/nrvale0)) 332 | - Added class parameter for external templates and tests [#7](https://github.com/puppetlabs/puppetlabs-motd/pull/7) ([solarkennedy](https://github.com/solarkennedy)) 333 | 334 | ### Fixed 335 | 336 | - fix a deprecation warning introduced by puppet issue 19058 [#5](https://github.com/puppetlabs/puppetlabs-motd/pull/5) ([nagas](https://github.com/nagas)) 337 | - Init.pp doesn't meet puppet style guidelines [#2](https://github.com/puppetlabs/puppetlabs-motd/pull/2) ([brianvans](https://github.com/brianvans)) 338 | 339 | ## [1.0.1](https://github.com/puppetlabs/puppetlabs-motd/tree/1.0.1) - 2012-03-26 340 | 341 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/1.0.0...1.0.1) 342 | 343 | ## [1.0.0](https://github.com/puppetlabs/puppetlabs-motd/tree/1.0.0) - 2012-03-26 344 | 345 | [Full Changelog](https://github.com/puppetlabs/puppetlabs-motd/compare/9702b8126e28be589b9edd9ea2a357f81a22e029...1.0.0) 346 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | plugins: 3 | - rubocop-performance 4 | - rubocop-rspec 5 | - rubocop-rspec_rails 6 | - rubocop-factory_bot 7 | - rubocop-capybara 8 | AllCops: 9 | NewCops: enable 10 | DisplayCopNames: true 11 | TargetRubyVersion: 3.1 12 | Include: 13 | - "**/*.rb" 14 | Exclude: 15 | - bin/* 16 | - ".vendor/**/*" 17 | - "**/Gemfile" 18 | - "**/Rakefile" 19 | - pkg/**/* 20 | - spec/fixtures/**/* 21 | - vendor/**/* 22 | - "**/Puppetfile" 23 | - "**/Vagrantfile" 24 | - "**/Guardfile" 25 | inherit_from: ".rubocop_todo.yml" 26 | Layout/LineLength: 27 | Description: People have wide screens, use them. 28 | Max: 200 29 | RSpec/BeforeAfterAll: 30 | Description: Beware of using after(:all) as it may cause state to leak between tests. 31 | A necessary evil in acceptance testing. 32 | Exclude: 33 | - spec/acceptance/**/*.rb 34 | RSpec/HookArgument: 35 | Description: Prefer explicit :each argument, matching existing module's style 36 | EnforcedStyle: each 37 | RSpec/DescribeSymbol: 38 | Exclude: 39 | - spec/unit/facter/**/*.rb 40 | Style/BlockDelimiters: 41 | Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to 42 | be consistent then. 43 | EnforcedStyle: braces_for_chaining 44 | Style/ClassAndModuleChildren: 45 | Description: Compact style reduces the required amount of indentation. 46 | EnforcedStyle: compact 47 | Style/EmptyElse: 48 | Description: Enforce against empty else clauses, but allow `nil` for clarity. 49 | EnforcedStyle: empty 50 | Style/FormatString: 51 | Description: Following the main puppet project's style, prefer the % format format. 52 | EnforcedStyle: percent 53 | Style/FormatStringToken: 54 | Description: Following the main puppet project's style, prefer the simpler template 55 | tokens over annotated ones. 56 | EnforcedStyle: template 57 | Style/Lambda: 58 | Description: Prefer the keyword for easier discoverability. 59 | EnforcedStyle: literal 60 | Style/RegexpLiteral: 61 | Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168 62 | EnforcedStyle: percent_r 63 | Style/TernaryParentheses: 64 | Description: Checks for use of parentheses around ternary conditions. Enforce parentheses 65 | on complex expressions for better readability, but seriously consider breaking 66 | it up. 67 | EnforcedStyle: require_parentheses_when_complex 68 | Style/TrailingCommaInArguments: 69 | Description: Prefer always trailing comma on multiline argument lists. This makes 70 | diffs, and re-ordering nicer. 71 | EnforcedStyleForMultiline: comma 72 | Style/TrailingCommaInArrayLiteral: 73 | Description: Prefer always trailing comma on multiline literals. This makes diffs, 74 | and re-ordering nicer. 75 | EnforcedStyleForMultiline: comma 76 | Style/SymbolArray: 77 | Description: Using percent style obscures symbolic intent of array's contents. 78 | EnforcedStyle: brackets 79 | RSpec/MessageSpies: 80 | EnforcedStyle: receive 81 | Style/Documentation: 82 | Exclude: 83 | - lib/puppet/parser/functions/**/* 84 | - spec/**/* 85 | Style/WordArray: 86 | EnforcedStyle: brackets 87 | Performance/AncestorsInclude: 88 | Enabled: true 89 | Performance/BigDecimalWithNumericArgument: 90 | Enabled: true 91 | Performance/BlockGivenWithExplicitBlock: 92 | Enabled: true 93 | Performance/CaseWhenSplat: 94 | Enabled: true 95 | Performance/ConstantRegexp: 96 | Enabled: true 97 | Performance/MethodObjectAsBlock: 98 | Enabled: true 99 | Performance/RedundantSortBlock: 100 | Enabled: true 101 | Performance/RedundantStringChars: 102 | Enabled: true 103 | Performance/ReverseFirst: 104 | Enabled: true 105 | Performance/SortReverse: 106 | Enabled: true 107 | Performance/Squeeze: 108 | Enabled: true 109 | Performance/StringInclude: 110 | Enabled: true 111 | Performance/Sum: 112 | Enabled: true 113 | Style/CollectionMethods: 114 | Enabled: true 115 | Style/MethodCalledOnDoEndBlock: 116 | Enabled: true 117 | Style/StringMethods: 118 | Enabled: true 119 | Bundler/GemFilename: 120 | Enabled: false 121 | Bundler/InsecureProtocolSource: 122 | Enabled: false 123 | Capybara/CurrentPathExpectation: 124 | Enabled: false 125 | Capybara/VisibilityMatcher: 126 | Enabled: false 127 | FactoryBot/AttributeDefinedStatically: 128 | Enabled: false 129 | FactoryBot/CreateList: 130 | Enabled: false 131 | FactoryBot/FactoryClassName: 132 | Enabled: false 133 | Gemspec/DuplicatedAssignment: 134 | Enabled: false 135 | Gemspec/OrderedDependencies: 136 | Enabled: false 137 | Gemspec/RequiredRubyVersion: 138 | Enabled: false 139 | Gemspec/RubyVersionGlobalsUsage: 140 | Enabled: false 141 | Layout/ArgumentAlignment: 142 | Enabled: false 143 | Layout/BeginEndAlignment: 144 | Enabled: false 145 | Layout/ClosingHeredocIndentation: 146 | Enabled: false 147 | Layout/EmptyComment: 148 | Enabled: false 149 | Layout/EmptyLineAfterGuardClause: 150 | Enabled: false 151 | Layout/EmptyLinesAroundArguments: 152 | Enabled: false 153 | Layout/EmptyLinesAroundAttributeAccessor: 154 | Enabled: false 155 | Layout/EndOfLine: 156 | Enabled: false 157 | Layout/FirstArgumentIndentation: 158 | Enabled: false 159 | Layout/HashAlignment: 160 | Enabled: false 161 | Layout/HeredocIndentation: 162 | Enabled: false 163 | Layout/LeadingEmptyLines: 164 | Enabled: false 165 | Layout/SpaceAroundMethodCallOperator: 166 | Enabled: false 167 | Layout/SpaceInsideArrayLiteralBrackets: 168 | Enabled: false 169 | Layout/SpaceInsideReferenceBrackets: 170 | Enabled: false 171 | Lint/BigDecimalNew: 172 | Enabled: false 173 | Lint/BooleanSymbol: 174 | Enabled: false 175 | Lint/ConstantDefinitionInBlock: 176 | Enabled: false 177 | Lint/DeprecatedOpenSSLConstant: 178 | Enabled: false 179 | Lint/DisjunctiveAssignmentInConstructor: 180 | Enabled: false 181 | Lint/DuplicateElsifCondition: 182 | Enabled: false 183 | Lint/DuplicateRequire: 184 | Enabled: false 185 | Lint/DuplicateRescueException: 186 | Enabled: false 187 | Lint/EmptyConditionalBody: 188 | Enabled: false 189 | Lint/EmptyFile: 190 | Enabled: false 191 | Lint/ErbNewArguments: 192 | Enabled: false 193 | Lint/FloatComparison: 194 | Enabled: false 195 | Lint/HashCompareByIdentity: 196 | Enabled: false 197 | Lint/IdentityComparison: 198 | Enabled: false 199 | Lint/InterpolationCheck: 200 | Enabled: false 201 | Lint/MissingCopEnableDirective: 202 | Enabled: false 203 | Lint/MixedRegexpCaptureTypes: 204 | Enabled: false 205 | Lint/NestedPercentLiteral: 206 | Enabled: false 207 | Lint/NonDeterministicRequireOrder: 208 | Enabled: false 209 | Lint/OrderedMagicComments: 210 | Enabled: false 211 | Lint/OutOfRangeRegexpRef: 212 | Enabled: false 213 | Lint/RaiseException: 214 | Enabled: false 215 | Lint/RedundantCopEnableDirective: 216 | Enabled: false 217 | Lint/RedundantRequireStatement: 218 | Enabled: false 219 | Lint/RedundantSafeNavigation: 220 | Enabled: false 221 | Lint/RedundantWithIndex: 222 | Enabled: false 223 | Lint/RedundantWithObject: 224 | Enabled: false 225 | Lint/RegexpAsCondition: 226 | Enabled: false 227 | Lint/ReturnInVoidContext: 228 | Enabled: false 229 | Lint/SafeNavigationConsistency: 230 | Enabled: false 231 | Lint/SafeNavigationWithEmpty: 232 | Enabled: false 233 | Lint/SelfAssignment: 234 | Enabled: false 235 | Lint/SendWithMixinArgument: 236 | Enabled: false 237 | Lint/ShadowedArgument: 238 | Enabled: false 239 | Lint/StructNewOverride: 240 | Enabled: false 241 | Lint/ToJSON: 242 | Enabled: false 243 | Lint/TopLevelReturnWithArgument: 244 | Enabled: false 245 | Lint/TrailingCommaInAttributeDeclaration: 246 | Enabled: false 247 | Lint/UnreachableLoop: 248 | Enabled: false 249 | Lint/UriEscapeUnescape: 250 | Enabled: false 251 | Lint/UriRegexp: 252 | Enabled: false 253 | Lint/UselessMethodDefinition: 254 | Enabled: false 255 | Lint/UselessTimes: 256 | Enabled: false 257 | Metrics/AbcSize: 258 | Enabled: false 259 | Metrics/BlockLength: 260 | Enabled: false 261 | Metrics/BlockNesting: 262 | Enabled: false 263 | Metrics/ClassLength: 264 | Enabled: false 265 | Metrics/CyclomaticComplexity: 266 | Enabled: false 267 | Metrics/MethodLength: 268 | Enabled: false 269 | Metrics/ModuleLength: 270 | Enabled: false 271 | Metrics/ParameterLists: 272 | Enabled: false 273 | Metrics/PerceivedComplexity: 274 | Enabled: false 275 | Migration/DepartmentName: 276 | Enabled: false 277 | Naming/AccessorMethodName: 278 | Enabled: false 279 | Naming/BlockParameterName: 280 | Enabled: false 281 | Naming/HeredocDelimiterCase: 282 | Enabled: false 283 | Naming/HeredocDelimiterNaming: 284 | Enabled: false 285 | Naming/MemoizedInstanceVariableName: 286 | Enabled: false 287 | Naming/MethodParameterName: 288 | Enabled: false 289 | Naming/RescuedExceptionsVariableName: 290 | Enabled: false 291 | Naming/VariableNumber: 292 | Enabled: false 293 | Performance/BindCall: 294 | Enabled: false 295 | Performance/DeletePrefix: 296 | Enabled: false 297 | Performance/DeleteSuffix: 298 | Enabled: false 299 | Performance/InefficientHashSearch: 300 | Enabled: false 301 | Performance/UnfreezeString: 302 | Enabled: false 303 | Performance/UriDefaultParser: 304 | Enabled: false 305 | RSpec/Be: 306 | Enabled: false 307 | RSpec/ContainExactly: 308 | Enabled: false 309 | RSpec/ContextMethod: 310 | Enabled: false 311 | RSpec/ContextWording: 312 | Enabled: false 313 | RSpec/DescribeClass: 314 | Enabled: false 315 | RSpec/Dialect: 316 | Enabled: false 317 | RSpec/EmptyHook: 318 | Enabled: false 319 | RSpec/EmptyLineAfterExample: 320 | Enabled: false 321 | RSpec/EmptyLineAfterExampleGroup: 322 | Enabled: false 323 | RSpec/EmptyLineAfterHook: 324 | Enabled: false 325 | RSpec/ExampleLength: 326 | Enabled: false 327 | RSpec/ExampleWithoutDescription: 328 | Enabled: false 329 | RSpec/ExpectChange: 330 | Enabled: false 331 | RSpec/ExpectInHook: 332 | Enabled: false 333 | RSpec/HooksBeforeExamples: 334 | Enabled: false 335 | RSpec/ImplicitBlockExpectation: 336 | Enabled: false 337 | RSpec/ImplicitSubject: 338 | Enabled: false 339 | RSpec/LeakyConstantDeclaration: 340 | Enabled: false 341 | RSpec/LetBeforeExamples: 342 | Enabled: false 343 | RSpec/MatchArray: 344 | Enabled: false 345 | RSpec/MissingExampleGroupArgument: 346 | Enabled: false 347 | RSpec/MultipleExpectations: 348 | Enabled: false 349 | RSpec/MultipleMemoizedHelpers: 350 | Enabled: false 351 | RSpec/MultipleSubjects: 352 | Enabled: false 353 | RSpec/NestedGroups: 354 | Enabled: false 355 | RSpec/PredicateMatcher: 356 | Enabled: false 357 | RSpec/ReceiveCounts: 358 | Enabled: false 359 | RSpec/ReceiveNever: 360 | Enabled: false 361 | RSpec/RepeatedExampleGroupBody: 362 | Enabled: false 363 | RSpec/RepeatedExampleGroupDescription: 364 | Enabled: false 365 | RSpec/RepeatedIncludeExample: 366 | Enabled: false 367 | RSpec/ReturnFromStub: 368 | Enabled: false 369 | RSpec/SharedExamples: 370 | Enabled: false 371 | RSpec/StubbedMock: 372 | Enabled: false 373 | RSpec/UnspecifiedException: 374 | Enabled: false 375 | RSpec/VariableDefinition: 376 | Enabled: false 377 | RSpec/VoidExpect: 378 | Enabled: false 379 | RSpec/Yield: 380 | Enabled: false 381 | Security/Open: 382 | Enabled: false 383 | Style/AccessModifierDeclarations: 384 | Enabled: false 385 | Style/AccessorGrouping: 386 | Enabled: false 387 | Style/BisectedAttrAccessor: 388 | Enabled: false 389 | Style/CaseLikeIf: 390 | Enabled: false 391 | Style/ClassEqualityComparison: 392 | Enabled: false 393 | Style/ColonMethodDefinition: 394 | Enabled: false 395 | Style/CombinableLoops: 396 | Enabled: false 397 | Style/CommentedKeyword: 398 | Enabled: false 399 | Style/Dir: 400 | Enabled: false 401 | Style/DoubleCopDisableDirective: 402 | Enabled: false 403 | Style/EmptyBlockParameter: 404 | Enabled: false 405 | Style/EmptyLambdaParameter: 406 | Enabled: false 407 | Style/Encoding: 408 | Enabled: false 409 | Style/EvalWithLocation: 410 | Enabled: false 411 | Style/ExpandPathArguments: 412 | Enabled: false 413 | Style/ExplicitBlockArgument: 414 | Enabled: false 415 | Style/ExponentialNotation: 416 | Enabled: false 417 | Style/FloatDivision: 418 | Enabled: false 419 | Style/FrozenStringLiteralComment: 420 | Enabled: false 421 | Style/GlobalStdStream: 422 | Enabled: false 423 | Style/HashAsLastArrayItem: 424 | Enabled: false 425 | Style/HashLikeCase: 426 | Enabled: false 427 | Style/HashTransformKeys: 428 | Enabled: false 429 | Style/HashTransformValues: 430 | Enabled: false 431 | Style/IfUnlessModifier: 432 | Enabled: false 433 | Style/KeywordParametersOrder: 434 | Enabled: false 435 | Style/MinMax: 436 | Enabled: false 437 | Style/MixinUsage: 438 | Enabled: false 439 | Style/MultilineWhenThen: 440 | Enabled: false 441 | Style/NegatedUnless: 442 | Enabled: false 443 | Style/NumericPredicate: 444 | Enabled: false 445 | Style/OptionalBooleanParameter: 446 | Enabled: false 447 | Style/OrAssignment: 448 | Enabled: false 449 | Style/RandomWithOffset: 450 | Enabled: false 451 | Style/RedundantAssignment: 452 | Enabled: false 453 | Style/RedundantCondition: 454 | Enabled: false 455 | Style/RedundantConditional: 456 | Enabled: false 457 | Style/RedundantFetchBlock: 458 | Enabled: false 459 | Style/RedundantFileExtensionInRequire: 460 | Enabled: false 461 | Style/RedundantRegexpCharacterClass: 462 | Enabled: false 463 | Style/RedundantRegexpEscape: 464 | Enabled: false 465 | Style/RedundantSelfAssignment: 466 | Enabled: false 467 | Style/RedundantSort: 468 | Enabled: false 469 | Style/RescueStandardError: 470 | Enabled: false 471 | Style/SingleArgumentDig: 472 | Enabled: false 473 | Style/SlicingWithRange: 474 | Enabled: false 475 | Style/SoleNestedConditional: 476 | Enabled: false 477 | Style/StderrPuts: 478 | Enabled: false 479 | Style/StringConcatenation: 480 | Enabled: false 481 | Style/Strip: 482 | Enabled: false 483 | Style/SymbolProc: 484 | Enabled: false 485 | Style/TrailingBodyOnClass: 486 | Enabled: false 487 | Style/TrailingBodyOnMethodDefinition: 488 | Enabled: false 489 | Style/TrailingBodyOnModule: 490 | Enabled: false 491 | Style/TrailingCommaInHashLiteral: 492 | Enabled: false 493 | Style/TrailingMethodEndStatement: 494 | Enabled: false 495 | Style/UnpackFirst: 496 | Enabled: false 497 | Capybara/MatchStyle: 498 | Enabled: false 499 | Capybara/NegationMatcher: 500 | Enabled: false 501 | Capybara/SpecificActions: 502 | Enabled: false 503 | Capybara/SpecificFinders: 504 | Enabled: false 505 | Capybara/SpecificMatcher: 506 | Enabled: false 507 | FactoryBot/ConsistentParenthesesStyle: 508 | Enabled: false 509 | FactoryBot/FactoryNameStyle: 510 | Enabled: false 511 | FactoryBot/SyntaxMethods: 512 | Enabled: false 513 | Gemspec/DeprecatedAttributeAssignment: 514 | Enabled: false 515 | Gemspec/DevelopmentDependencies: 516 | Enabled: false 517 | Gemspec/RequireMFA: 518 | Enabled: false 519 | Layout/LineContinuationLeadingSpace: 520 | Enabled: false 521 | Layout/LineContinuationSpacing: 522 | Enabled: false 523 | Layout/LineEndStringConcatenationIndentation: 524 | Enabled: false 525 | Layout/SpaceBeforeBrackets: 526 | Enabled: false 527 | Lint/AmbiguousAssignment: 528 | Enabled: false 529 | Lint/AmbiguousOperatorPrecedence: 530 | Enabled: false 531 | Lint/AmbiguousRange: 532 | Enabled: false 533 | Lint/ConstantOverwrittenInRescue: 534 | Enabled: false 535 | Lint/DeprecatedConstants: 536 | Enabled: false 537 | Lint/DuplicateBranch: 538 | Enabled: false 539 | Lint/DuplicateMagicComment: 540 | Enabled: false 541 | Lint/DuplicateMatchPattern: 542 | Enabled: false 543 | Lint/DuplicateRegexpCharacterClassElement: 544 | Enabled: false 545 | Lint/EmptyBlock: 546 | Enabled: false 547 | Lint/EmptyClass: 548 | Enabled: false 549 | Lint/EmptyInPattern: 550 | Enabled: false 551 | Lint/IncompatibleIoSelectWithFiberScheduler: 552 | Enabled: false 553 | Lint/LambdaWithoutLiteralBlock: 554 | Enabled: false 555 | Lint/NoReturnInBeginEndBlocks: 556 | Enabled: false 557 | Lint/NonAtomicFileOperation: 558 | Enabled: false 559 | Lint/NumberedParameterAssignment: 560 | Enabled: false 561 | Lint/OrAssignmentToConstant: 562 | Enabled: false 563 | Lint/RedundantDirGlobSort: 564 | Enabled: false 565 | Lint/RefinementImportMethods: 566 | Enabled: false 567 | Lint/RequireRangeParentheses: 568 | Enabled: false 569 | Lint/RequireRelativeSelfPath: 570 | Enabled: false 571 | Lint/SymbolConversion: 572 | Enabled: false 573 | Lint/ToEnumArguments: 574 | Enabled: false 575 | Lint/TripleQuotes: 576 | Enabled: false 577 | Lint/UnexpectedBlockArity: 578 | Enabled: false 579 | Lint/UnmodifiedReduceAccumulator: 580 | Enabled: false 581 | Lint/UselessRescue: 582 | Enabled: false 583 | Lint/UselessRuby2Keywords: 584 | Enabled: false 585 | Metrics/CollectionLiteralLength: 586 | Enabled: false 587 | Naming/BlockForwarding: 588 | Enabled: false 589 | Performance/CollectionLiteralInLoop: 590 | Enabled: false 591 | Performance/ConcurrentMonotonicTime: 592 | Enabled: false 593 | Performance/MapCompact: 594 | Enabled: false 595 | Performance/RedundantEqualityComparisonBlock: 596 | Enabled: false 597 | Performance/RedundantSplitRegexpArgument: 598 | Enabled: false 599 | Performance/StringIdentifierArgument: 600 | Enabled: false 601 | RSpec/BeEq: 602 | Enabled: false 603 | RSpec/BeNil: 604 | Enabled: false 605 | RSpec/ChangeByZero: 606 | Enabled: false 607 | RSpec/ClassCheck: 608 | Enabled: false 609 | RSpec/DuplicatedMetadata: 610 | Enabled: false 611 | RSpec/ExcessiveDocstringSpacing: 612 | Enabled: false 613 | RSpec/IdenticalEqualityAssertion: 614 | Enabled: false 615 | RSpec/NoExpectationExample: 616 | Enabled: false 617 | RSpec/PendingWithoutReason: 618 | Enabled: false 619 | RSpec/RedundantAround: 620 | Enabled: false 621 | RSpec/SkipBlockInsideExample: 622 | Enabled: false 623 | RSpec/SortMetadata: 624 | Enabled: false 625 | RSpec/SubjectDeclaration: 626 | Enabled: false 627 | RSpec/VerifiedDoubleReference: 628 | Enabled: false 629 | RSpecRails/AvoidSetupHook: 630 | Enabled: false 631 | RSpecRails/HaveHttpStatus: 632 | Enabled: false 633 | RSpecRails/InferredSpecType: 634 | Enabled: false 635 | RSpecRails/MinitestAssertions: 636 | Enabled: false 637 | RSpecRails/TravelAround: 638 | Enabled: false 639 | Security/CompoundHash: 640 | Enabled: false 641 | Security/IoMethods: 642 | Enabled: false 643 | Style/ArgumentsForwarding: 644 | Enabled: false 645 | Style/ArrayIntersect: 646 | Enabled: false 647 | Style/CollectionCompact: 648 | Enabled: false 649 | Style/ComparableClamp: 650 | Enabled: false 651 | Style/ConcatArrayLiterals: 652 | Enabled: false 653 | Style/DataInheritance: 654 | Enabled: false 655 | Style/DirEmpty: 656 | Enabled: false 657 | Style/DocumentDynamicEvalDefinition: 658 | Enabled: false 659 | Style/EmptyHeredoc: 660 | Enabled: false 661 | Style/EndlessMethod: 662 | Enabled: false 663 | Style/EnvHome: 664 | Enabled: false 665 | Style/FetchEnvVar: 666 | Enabled: false 667 | Style/FileEmpty: 668 | Enabled: false 669 | Style/FileRead: 670 | Enabled: false 671 | Style/FileWrite: 672 | Enabled: false 673 | Style/HashConversion: 674 | Enabled: false 675 | Style/HashExcept: 676 | Enabled: false 677 | Style/IfWithBooleanLiteralBranches: 678 | Enabled: false 679 | Style/InPatternThen: 680 | Enabled: false 681 | Style/MagicCommentFormat: 682 | Enabled: false 683 | Style/MapCompactWithConditionalBlock: 684 | Enabled: false 685 | Style/MapToHash: 686 | Enabled: false 687 | Style/MapToSet: 688 | Enabled: false 689 | Style/MinMaxComparison: 690 | Enabled: false 691 | Style/MultilineInPatternThen: 692 | Enabled: false 693 | Style/NegatedIfElseCondition: 694 | Enabled: false 695 | Style/NestedFileDirname: 696 | Enabled: false 697 | Style/NilLambda: 698 | Enabled: false 699 | Style/NumberedParameters: 700 | Enabled: false 701 | Style/NumberedParametersLimit: 702 | Enabled: false 703 | Style/ObjectThen: 704 | Enabled: false 705 | Style/OpenStructUse: 706 | Enabled: false 707 | Style/OperatorMethodCall: 708 | Enabled: false 709 | Style/QuotedSymbols: 710 | Enabled: false 711 | Style/RedundantArgument: 712 | Enabled: false 713 | Style/RedundantConstantBase: 714 | Enabled: false 715 | Style/RedundantDoubleSplatHashBraces: 716 | Enabled: false 717 | Style/RedundantEach: 718 | Enabled: false 719 | Style/RedundantHeredocDelimiterQuotes: 720 | Enabled: false 721 | Style/RedundantInitialize: 722 | Enabled: false 723 | Style/RedundantLineContinuation: 724 | Enabled: false 725 | Style/RedundantSelfAssignmentBranch: 726 | Enabled: false 727 | Style/RedundantStringEscape: 728 | Enabled: false 729 | Style/SelectByRegexp: 730 | Enabled: false 731 | Style/StringChars: 732 | Enabled: false 733 | Style/SwapValues: 734 | Enabled: false 735 | --------------------------------------------------------------------------------