Init repo
This commit is contained in:
commit
830ca960a2
|
@ -0,0 +1,22 @@
|
|||
# == Private class: root::configuration
|
||||
#
|
||||
class root::configuration {
|
||||
|
||||
File {
|
||||
owner => root,
|
||||
group => root,
|
||||
mode => 600,
|
||||
}
|
||||
|
||||
# Set .profile and bashrc files
|
||||
file { $root::profile_path:
|
||||
ensure => present,
|
||||
content => template($root::profile_content),
|
||||
}
|
||||
|
||||
file { $root::bashrc_path:
|
||||
ensure => present,
|
||||
content => template($root::bashrc_content),
|
||||
}
|
||||
|
||||
} # Private class: root::configuration
|
|
@ -0,0 +1,47 @@
|
|||
# == Class: root
|
||||
#
|
||||
# Define some root's preferences
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# Document parameters here.
|
||||
#
|
||||
# [*sample_parameter*]
|
||||
# Explanation of what this parameter affects and what it defaults to.
|
||||
# e.g. "Specify one or more upstream ntp servers as an array."
|
||||
#
|
||||
# === Variables
|
||||
#
|
||||
# Here you should define a list of variables that this module would require.
|
||||
#
|
||||
# [*sample_variable*]
|
||||
# Explanation of how this variable affects the funtion of this class and if
|
||||
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
|
||||
# External Node Classifier as a comma separated list of hostnames." (Note,
|
||||
# global variables should be avoided in favor of class parameters as
|
||||
# of Puppet 2.6.)
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# class { 'root':
|
||||
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
|
||||
# }
|
||||
#
|
||||
# === Authors
|
||||
#
|
||||
# Author Name <author@domain.com>
|
||||
#
|
||||
# === Copyright
|
||||
#
|
||||
# Copyright 2016 Your name here, unless otherwise noted.
|
||||
#
|
||||
class root (
|
||||
$profile_path = $root::params::profile_path,
|
||||
$profile_content = $root::params::profile_content,
|
||||
$bashrc_path = $root::params::bashrc_path,
|
||||
$bashrc_content = $root::params::bashrc_content,
|
||||
) inherits root::params {
|
||||
|
||||
include '::root::config'
|
||||
|
||||
} # public class : root
|
|
@ -0,0 +1,11 @@
|
|||
# == Private class: root::params
|
||||
#
|
||||
class root::params {
|
||||
|
||||
$profile_path = '/root/.profile'
|
||||
$profile_content = 'root/preferences/profile.erb'
|
||||
|
||||
$bashrc_path = 'root/.bashrc'
|
||||
$bashrc_content = 'root/preferences/bashrc.erb'
|
||||
|
||||
} # Private class: root::params
|
|
@ -0,0 +1,20 @@
|
|||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
|
||||
# Note: PS1 and umask are already set in /etc/profile. You should not
|
||||
# need this unless you want different defaults for root.
|
||||
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
|
||||
# umask 022
|
||||
|
||||
# You may uncomment the following lines if you want `ls' to be colorized:
|
||||
# export LS_OPTIONS='--color=auto'
|
||||
# eval "`dircolors`"
|
||||
# alias ls='ls $LS_OPTIONS'
|
||||
# alias ll='ls $LS_OPTIONS -l'
|
||||
# alias l='ls $LS_OPTIONS -lA'
|
||||
#
|
||||
# Some more alias to avoid making mistakes:
|
||||
# alias rm='rm -i'
|
||||
# alias cp='cp -i'
|
||||
# alias mv='mv -i'
|
||||
|
||||
alias z='zsh'
|
|
@ -0,0 +1,17 @@
|
|||
# ~/.profile: executed by Bourne-compatible login shells.
|
||||
|
||||
if [ "$BASH" ]; then
|
||||
if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi
|
||||
fi
|
||||
|
||||
ZSH_IP="(129.20.79.141|129.20.79.142)"
|
||||
|
||||
if [ "$(echo "${SSH_CLIENT}" | grep -E "${ZSH_IP}")" ]; then
|
||||
printf '%b' "Launch ZSH\n"
|
||||
exec zsh
|
||||
fi
|
||||
|
||||
|
||||
mesg n
|
Reference in New Issue