cellinfo
/
puppet-root
Archived
2
0
Fork 0
Puppet module to define root's preferences
This repository has been archived on 2020-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Jeremy Gardais c1d99759ae Add a variable to set root's default shell. 2016-11-28 18:52:17 +01:00
manifests Add a variable to set root's default shell. 2016-11-28 18:52:17 +01:00
templates/preferences Verify if zsh is available on the system before launch 2016-11-28 15:06:53 +01:00
README.md Add README.md 2016-11-28 18:38:26 +01:00

README.md

root

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with root
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.

Overview

This "root" module simply define few preferences for the root user.

Setup

What root affects

  • Root's configuration files (/root/.profile, /root/.bashrc,…).

Beginning with root

To begin using root module with default parameter, declare the class with include root.

Usage

Exec ZSH for some clients

To autoload ZSH as "default" shell, you can pass a regex to the IP_ZSH argument. Then for every new connection, the .profile file will compare the $SSH_CLIENT variable environnment with this regex:

class { 'root':
  ip_zsh => "(10.10.10.1|192.168.0.42)",
}

Then, every connection from 10.10.10.1 or 192.168.0.42 will automatically have ZSH as default shell.

Reference

Classes

  • root: Main class, automatically load all needed privates classes.

Parameters

  • profile_path: Path to the .profile to load personal initialization. Defaults to '/root/.profile'.
  • profile_content: Template file used to generate the previous configuration file. Defaults to 'root/preferences/profile.erb'.
  • bashrc_path: Path to the Bash's rcfile. Defaults to '/root/.bashrc'.
  • bashrc_content: Template file used to generate the previous configuration file. Default to 'root/preferences/bashrc.erb'.
  • ip_zsh: A regex to determine if a ssh client should have ZSH as default shell. Defaults to '127.0.0.1'.

Limitations

This module was only tested on Debian 7.x and 8.x but should work quite few Debian's fork.