Using Vim to edit Puppet code

# yum -y install vim-enhanced # vi /etc/profile # add at the last line alias vi=’vim’ # source /etc/profile # reload # cat .vimrc ” vimrc: Managed by puppet – DO NOT EDIT ” Changes manually to this file can, and will, be lostset nocompatibleif has(“syntax”) syntax on set background=dark endif if has(“autocmd”) au BufReadPost

Puppet – Custom Facts – Check SAP Oracle version

REMARK – use *** ¬†puppet facts find <servername> –render-as yaml | grep sap_ora Make a custom fact (ruby code) that determins the Oracle version SAP is using. Under ¬†modules tree /modules/<module_name>/lib/oracleversion.rb   Facter.add("sap_oracleversion") do confine :operatingsystem => 'SLES' if Facter.value(:sapprepsids) != nil setcode do result = "none" sapprep_sid = Facter.value(:sapprepsids) first_sid = sapprep_sid.to_s.split(',')[0] second_sid =

Vagrant: use Putty as ssh client

Usually with vagrant ssh <box> a connection to the box can be made via ssh. When putty is preferred as ssh client then this is possible, a vagrant plugin (vagrant-multi-putty) is available for this. just goto the command line and issue this command: vagrant plugin install vagrant-multi-putty Be sure that the putty binary can be

Install Vagrant, Virtualbox and Git to setup a development environment

Based on this below one can setup a virtual development enviroment with vagrant, virtualbox and git. This page describes how to do that on a computer with Windows 10. A. Download software: 1. 2. 3. B. Install software: 1. Install Virtualbox 2. Install Vagrant (reboot is recommended after installation) 3. Install

Puppet – external data – Hiera

Hiera is nothing, but a key value look up tool, which can be ordered and organized nicely without meddling with the actual code. Just give hiera the data that your modules need, and you are ready to go. “Hiera makes your data separate from the module’s, so that the module code remains untouched. This helps