Kumari.net
Interesting things... ?
  1. You are here:  
  2. Home
  3. System Administration
  4. SysAdmin Tips and Tricks

Puppet Tips and Tricks

Simple Puppet snippets for easier cutting and pasting...

Setting up puppet on a new machine:

wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
dpkg -i puppetlabs-release-pc1-xenial.deb
apt-get update
apt-get upgrade
apt-get install puppet-agent
ln -s /opt/puppetlabs/bin/* /usr/local/bin

 

Create a new module:

puppet module generate wkumari-foo

 

Run / apply a single module (for example, while testing):

puppet apply --noop --test -e "include foo"

or the longer version:

puppet apply  --noop --test --modulepath="/etc/puppetlabs/code/modules:/etc/puppetlabs/code/environments/production/modules" -e "class {test_mailserver: param => 'bar'} include test_mailserver" 

and with hiera info:

puppet apply --hiera_config /etc/puppetlabs/puppet/hiera.yaml --noop --test --modulepath="/etc/puppetlabs/code/modules:/etc/puppetlabs/code/environments/production/modules" -e " include test_mailserver" 

 

 

Emacs Tips and Tricks

Emacs Tips and Tricks

The only thing Emacs is missing is a good editor.
     -- Anon

To set a variable:
  M-: (setq variable "value")

 

Merging files:

To deal with git merge conflicts, use smerge-mode.

smerge-next bound to smerge-command-prefixn to move to next conflict.
smerge-previous bound to smerge-command-prefixp to move to previous conflict.
smerge-keep-current bound to smerge-command-prefixRET to keep the version the cursor is on.
smerge-keep-mine bound to smerge-command-prefixm to keep your changes.
smerge-keep-other bound to smerge-command-prefixo to keep other changes.
smerge-ediff bound to smerge-command-prefixE to start an ediff session to merge the conflicts. 

 

 

Making OpenVPN Connect Client allow profile import

OpenVPN Access Server gives users a nice, preconfigured .dmg, which includes a profile for connecting to the server. Unfortunatly this client is configured to be very basic, and does not allow for importing profiles.

This can be configured from the access-server, but it is often nicer to be able to do this on a per-client basis (with the "basic_client" parameter). This is how to do it on OS X.

To get status: 
/Library/Frameworks/OpenVPN.framework/Versions/Current/bin/capicli GetPreferences

 

To allow adding profiles:
/Library/Frameworks/OpenVPN.framework/Versions/Current/bin/capicli -k basic_client -v false SetPreference

Installing / reinstalling Dell Openmanage on Ubuntu

This keeps breaking, with weird unmet dependencies. apt-get-f install, etc seems to become sad. Completely removing and reinstalling seems easiest...

Getting errors like:

* Already started
Processing triggers for libc-bin (2.23-0ubuntu4) ...
Errors were encountered while processing:
/var/cache/apt/archives/srvadmin-hapi_8.4.0-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

Fixed with:

apt-get -f purge srvadmin-isvc srvadmin-hapi srvadmin-ominst
apt-get -f purge srvadmin-storage srvadmin-omacore srvadmin-storage-cli apt-get -f install apt-get update apt-get install srvadmin-isvc srvadmin-hapi srvadmin-ominst
apt-get install srvadmin-storage srvadmin-omacore srvadmin-storage-cli service dataeng start omreport storage controller

ZFS tips and tricks

Quick notes on creating a ZFS filesystem.

root@ron:~/src/configs/gitosis-admin# zfs create tank/data/scratch
root@ron:~/src/configs/gitosis-admin# zfs set quota=10G tank/data/scratch
root@ron:~/src/configs/gitosis-admin# touch /tank/data/scratch/.duplicity-ignore
root@ron:~/src/configs/gitosis-admin#

Creating .duplicity-ignore will prevent Duply (well, Duplicity) from backing up this directory.

 

Checking the compression ratio:

zfs get all  | grep compressratio
  1. Migrating from SVN to Git
  2. Turning a Linux machine into an Ethernet tap.
  3. Adding a user to a group (e.g sudo)
  4. Ubuntu: Making Dell OpenManage run on newer Ubuntu

Page 2 of 3

  • 1
  • 2
  • 3

Main Menu

  • Home
  • About Me
  • Projects
    • Random Projects
    • Atomic Clocks / NTP
    • FPGA Based POCSAG Decoder
    • FPGA Based Password Cracking
    • Adding TV support to an ICOM IC-7000
    • Hacking the Sectera Wireline Terminal
    • Geiger counter based RNG
    • Making a Naked Portafilter
  • Proximity Card Access Systems
    • Building a Proxmark 3
    • Cloning an HID card
  • Cars
    • Ferrari 599GTB Fiorano
      • Tips and Trick
      • Repainting a Ferrari 599 Key
    • Lamborghini Murcielago Roadster
    • Ferrari 308
      • Ferrari 308 Door Lock Issues
    • Ferrari Battery Charger Cable
      • Creating a CTEK to Ferrari adaptor cable
      • Making a CTEK to Ferrari battery tender adaptor cable.
    • Aston Martin V8 Vantage Roadster
    • Land Rover Series IIA
  • Blog
  • Networking
    • Tips and Tricks
    • Funny
  • System Administration
  • Programming
    • Python
  • Random
  • Pontification
  • Pictures