Add remaining documentation for kickstart functions

This commit is contained in:
Bruno Tavares 2014-02-21 19:29:57 -03:00
parent 7ef54c4f5d
commit 246ae7051e
24 changed files with 211 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# kickstart.apt.add_key_from_keychain key_number
Adds a key from ubuntu's keyserver
### Example
```bash
$ kickstart.apt.add_key_from_keychain 7F0CEB10
```

View File

@ -0,0 +1,9 @@
# kickstart.apt.add_key_from_url key_url
Add signature key from a url
### Example
```bash
$ kickstart.apt.add_key_from_url http://binaries.erlang-solutions.com/debian/erlang_solutions.asc
$ kickstart.package.update
```

View File

@ -0,0 +1,8 @@
# kickstart.apt.ppa ppa_name
Adds the ppa repo and update the packages
### Example
```bash
$ kickstart.apt.ppa ppa:chris-lea/node.js
```

View File

@ -0,0 +1,8 @@
# kickstart.download.file url file
Download an url to a file with any of the possible download tools
### Example
```bash
$ kickstart.download.file http://google.com google.com
```

View File

@ -0,0 +1,8 @@
# kickstart.download.stream url
Stream the content from the url to stdout
### Example
```bash
$ kickstart.download.stream http://example.com/file.tar | tar x
```

View File

@ -0,0 +1,9 @@
# kickstart.file.link target link_location
Create a link on link_location pointing to target.
Makes sure that the link_location will point to target by removing anything that might exist on link_location
### Example
```bash
$ kickstart.file.link /opt/project_1.2.3/project /usr/local/bin/project
```

View File

@ -0,0 +1,8 @@
# kickstart.group.create group
Creates `group` if it does not exist.
### Example
```bash
$ kickstart.group.create wheel
```

View File

@ -0,0 +1,9 @@
# kickstart.package.install package
Checks if `package` is installed.
If not, install it using the current package manager
### Example
```bash
$ kickstart.package.install nodejs
```

View File

@ -0,0 +1,9 @@
# kickstart.package.installed package_name
Return 0 if `package_name` is installed by the current package manager or 1 if not
### Example
```bash
$ kickstart.package.installed nodejs || echo "Package not installed"
```

View File

@ -0,0 +1,9 @@
# kickstart.package.markdown
Print the current package manager name
### Example
```bash
$ kickstart.package.manager
apt-get
```

View File

@ -0,0 +1,9 @@
# kickstart.package.update
Update the index of the current package manager
### Example
```bash
$ kickstart.package.update
```

View File

@ -0,0 +1,8 @@
# kickstart.package.upgrade
Upgrade installed packages using the current package manager
### Example
```bash
$ kickstart.package.update
```

View File

@ -0,0 +1,11 @@
# kickstart.profile.add_to_profile file.sh
This module adds `file.sh` located on `files/` to bash and zsh profiles.
It allows you to append to PATH or define alias, for example.
It will add your file into the appropriate profile.d folder, depending of your OS and if you are root.
Then it will add to the proper shell configuration file to source your `file.sh`
### Example
```
$ kickstart.profile.add_to_profile cabal.sh
```

View File

@ -0,0 +1,9 @@
# kickstart.profile.location.bash
Prints the bash configuration file location depending on the user.
### Example
```bash
$ kickstart.profile.location.bash
~/.bashrc
```

View File

@ -0,0 +1,9 @@
# kickstart.profile.location.profile_d
Prints the `profile.d` location for putting files.
### Example
```bash
$ kickstart.profile.location.profile_d
/etc/profile.d
```

View File

@ -0,0 +1,9 @@
# kickstart.profile.location.zsh
Prints the zsh configuration file location depending on the user.
### Example
```bash
$ kickstart.profile.location.zsh
/etc/zshenv
```

View File

@ -0,0 +1,9 @@
# kickstart.profile.source_on_configuration_file target_file profile_d_path shell_configuration_file
Checks if `profile_d_path/shell_configuration_file` contains source for `target_file`, otherwise add it.
### Example
```bash
$ kickstart.profile.source_on_configuration_file go.sh /etc/profile.d ~/.zshrc
```

View File

@ -0,0 +1,9 @@
# kickdisable.service.disable service_name
Disables the `service_name` using the underlying init system
### Example
```bash
$ kickdisable.service.disable redis
```

View File

@ -0,0 +1,9 @@
# kickstart.service.enable service_name
Enables the `service_name` using the underlying init system
### Example
```bash
$ kickstart.service.enable redis
```

View File

@ -0,0 +1,9 @@
# kickstart.service.restart service_name
Restarts the `service_name` using the underlying init system
### Example
```bash
$ kickstart.service.restart redis
```

View File

@ -0,0 +1,9 @@
# kickstart.service.start service_name
Starts the `service_name` using the underlying init system
### Example
```bash
$ kickstart.service.start redis
```

View File

@ -0,0 +1,9 @@
# kickstart.service.stop service_name
Stops the `service_name` using the underlying init system
### Example
```bash
$ kickstart.service.stop redis
```

View File

@ -0,0 +1,8 @@
# kickstart.user.add_group user group
Check if `user` is part of `group` or add it to `group`
### Example
```bash
$ kickstart.user.add_group vagrant admin
```

View File

@ -0,0 +1,9 @@
# kickstart.user.create user initial_password
Checks if user already exists, otherwhise, create a `user` with an initial password of `initial_password`
### Example
```bash
$ kickstart.user.create vagrant vagrant
```