configuration

use github to manage your dotfile

My Distro

myDistro

8,779 downloads

7,208 latest version

3.1 quality score

Version information

  • 0.2.5 (latest)
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.0
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Apr 4th 2015
This version is compatible with:
  • Puppet 3.x
  • Debian
    ,
    Ubuntu

Start using this module

Documentation

myDistro/configuration — version 0.2.5 Apr 4th 2015

Configuration

This module allows you to save and share your configuration files by using github (or other git repository provider).

Warning

Using a remote server for your internal config files is not flawless. You have to be sure about the ssh fingerprint (or ssl certifcate) of the host!

Basic Usage

Your .dot file git repository structure for example :

configure-vim
├── bundle
│   └── vundle
├── README.md
└── vimrc

After you created your github repository like described you can set it up in puppet via

configuration { "my-vim":
    target => '/home/me/.vim',
    source => 'mrVanDalo/configure-vim',
    user   => 'me',
}

The problem of putting .dot files in you home or somewhere else, can be solved by the init or the links parameter. You can use both at the same time of course.

Parameter

init

You can put a init script in your repository to run right after cloning the repository.

Your .dot file git repository structure for example :

configure-vim
├── bundle
│   └── vundle
├── README.md
├── setup.sh
└── vimrc

After you created your github repository like described you can set it up in puppet via

configuration { "my-vim":
    target => '/home/me/.vim',
    source => 'mrVanDalo/configure-vim',
    user   => 'me',
    init   => 'setup.sh',
}

You should write your script in a way, that it can be called more than once.

links

Most of the time the setup scripts create links. But you can do that now within your puppet script.

Your .dot file git repository structure for example :

configure-i3
├── dmenu
│   ├── dmenu.list
│   └── dmenu_run
├── i3
│   ├── config
│   └── i3status.conf
├── README.md
├── Xdefaults
├── xmodmap
└── xsession

Now you can configure your links like that

configuration { 'my-i3':
  target => '/home/me/.configuration/i3',
  source => 'mrVanDalo/configure-i3',
  user   => 'me',
  links  => { 
    dmenu  => {source => 'dmenu',            target => '/home/me/.dmenu'        },
    i3     => {source => 'i3',               target => '/home/me/.i3'           },
    i3_bar => {source => 'i3/i3status.conf', target => '/home/me/.i3status.conf'},
    dx     => {source => 'Xdefaults',        target => '/home/me/.Xdefaults'    },
    xm     => {source => 'xmodmap',          target => '/home/me/.xmodmap'      },
    xs     => {source => 'xsession',         target => '/home/me/.xsession'     },
    },
}

vendor and source

The vendor parameter controlls the git server type. Unless you use host as vendor, source should be 'user/repository' (without .git at the end)

  • github : use ssh to github
  • github_https (default) : use https to github
  • bitbucket : use ssh bitbucket
  • host : use your own server. source must be the full path for 'git clone'

ensure

You have like in vcsrepo the possibility to set the ensure parameter to latest to ensure you always update your repositories when calling puppet.

Migrate 0.1.x to 0.2.x

Migration is quite simple, just add the init parameter to your configuration.

configuration { "my-vim":
    ....
    init   => 'setup.sh',
}

Support