Baseline classes for common rules
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
files
lib/facter
manifests
spec
templates
tests
.fixtures.yml
.gitignore
CHANGELOG.md
Gemfile
README.md
Rakefile
deps.sh
metadata.json

README.md

Rbaselines

Table of Contents

  1. Description
  2. Preconfiguration steps
  3. Parametarized classes
  4. Classes

Description

This module provides baselines classes to be picked up and used by many systems.
The ideia is not to apply all classes to all systems, but just agregate in this module the classes that could be used by many systems.

Examples:

  • Users
  • Repositories
  • Timezone and NTP servers

Preconfiguration steps

To chocolatey packges to work, put this on site.pp:
if ( $::kernel == 'Windows' ){
Package { provider => 'chocolatey' }
}

Parametarized classes

Parametarized classes offers a way to reuse code by putting some data outside the class definition.
Hiera is usually used on Puppet, but since we use Foreman, we´ll let Foreman handle these parameters.
That way, we can easily change the root password for a group of hosts or NTP servers for all the hosts just editing a paratmeter in the web interface instead of deploying new configuration throught the entire deploy process.

Classes

common dns

Manages DNS servers.
Class: infra_baselines::common::dns
OS Support: Linux and Windows.
Parameters (handled by Foreman):

  • manage_dns: Whether to manage dns or not.
  • dns_servers: Array of DNS servers.

common ntp

Manages NTP servers.
Class: infra_baselines::common::ntp
OS Support: Linux and Windows.
Parameters (handled by Foreman):

  • manage_ntp: Whether to manage ntp or not.
  • ntp_servers: Array of NTP servers.

common timezone

Manages the timezone.
Class: infra_baselines::common::timezone
OS Support: Linux and Windows.
Parameters (handled by Foreman):

  • manage_timezone: boolean. To manage timezone or not.
  • timezone: the timezone. Specific for each OS. Example: Etc/UTC for Linux is just UTC on Windows.

common vmwaretools

Ensure vmwaretools is installed and running. Uses open-vm-tools package on Linux and vmware-tools chocolatey package on windows.
Class: infra_baselines::common::vmwaretools
OS Support: Linux and Windows.
No parameters.

linux users root

Ensure the root user and password.
Class: infra_baselines::linux::users::root
OS Support: Linux
Parameters (handled by Foreman):

  • manage_root: boolean. Wherer to manage the host root user or not.
  • root_password: String. Hash of the password.

linux custom_profile

Set some bash customizations like idle timeout, history format, df and dmesg aliases etc.
Class: infra_baselines::linux::custom_profile
OS Support: Linux

linux inputrc

Configure some options in inputrc.
Class: infra_baselines::linux::inputrc
OS Support: Linux
No parameters.

linux packages

Installs and removes some packages.
Class: infra_baselines::linux::packages
OS Support: Linux
List of packages taken from params.pp

linux puppet_agent

Configures some options in the linux puppet agent.
Class: infra_baselines::linux::puppet_agent
OS Support: Linux
Parameters (taken from params.pp):

  • puppet_server:
  • puppet_runinterval: run interval of the puppet agent. Default is 1800

linux redhat_insights

Installs the RedHat insights agent on RedHat Linuxes.
Class: infra_baselines::linux::redhat_insights
OS Support: RedHat Linux
No parameters

linux sshd

Configures some options on ssh server.
Class: infra_baselines::linux::sshd
OS Support: Linux
Parameters (handled by Foreman):

  • sshd_permitrootlogin: whether to permit root login or not.
  • sshd_x11forwarding: X11 forwarding.
  • sshd_usedns: use reverse dns lookups on client connect.

linux sysctl_common

Make some sysctl tunning.
Class: infra_baselines::linux::sysctl_common
OS Support: Linux
Parameters (handled by Foreman):

  • sysctl_kernel_panic: time in seconds to reboot the system after a panic
  • sysctl_panic_on_oom: whether to panic when the OOM Killer gets triggered

linux sysctl

Provides a simple interface to manage many sysctl tunnings.
Defined type: infra_baselines::linux::sysctl
OS Support: Linux
Parameters:

  • sysctl_options: hash of sysctl options

windows chocolatey

Installs chocolatey package manager.
Class: infra_baselines::windows::chocolatey
OS Support: Windows
No parameters.

windows rdp

Ensure the terminal service is enabled
Class: infra_baselines::windows::rdp
OS Support: Windows
No parameters.

windows winrm

Ensure the winrm is enabled
Class: infra_baselines::windows::winrm
OS Support: Windows
No parameters.

check_linux

Class to test and fail in case it´s not a Linux system
Class: infra_baselines::check_linux
OS Support: Linux

check_windows

Class to test and fail in case it´s not a Windows system
Class: infra_baselines::check_windows
OS Support: Windows

params

Class to provide some default parameters values used by other classes.
Class: infra_baselines::params