From 246ae7051ed02699412932562b3db2d5bc4fa6d7 Mon Sep 17 00:00:00 2001 From: Bruno Tavares Date: Fri, 21 Feb 2014 19:29:57 -0300 Subject: [PATCH] Add remaining documentation for kickstart functions --- docs/kickstart/apt/add_key_from_keychain.md | 8 ++++++++ docs/kickstart/apt/add_key_from_url.md | 9 +++++++++ docs/kickstart/apt/ppa.md | 8 ++++++++ docs/kickstart/download/file.md | 8 ++++++++ docs/kickstart/download/stream.md | 8 ++++++++ docs/kickstart/file/link.md | 9 +++++++++ docs/kickstart/group/create.md | 8 ++++++++ docs/kickstart/package/install.md | 9 +++++++++ docs/kickstart/package/installed.md | 9 +++++++++ docs/kickstart/package/manager.md | 9 +++++++++ docs/kickstart/package/update.md | 9 +++++++++ docs/kickstart/package/upgrade.md | 8 ++++++++ docs/kickstart/profile/add_to_profile.md | 11 +++++++++++ docs/kickstart/profile/location/bash.md | 9 +++++++++ docs/kickstart/profile/location/profile_d.md | 9 +++++++++ docs/kickstart/profile/location/zsh.md | 9 +++++++++ .../kickstart/profile/source_on_configuration_file.md | 9 +++++++++ docs/kickstart/service/disable.md | 9 +++++++++ docs/kickstart/service/enable.md | 9 +++++++++ docs/kickstart/service/restart.md | 9 +++++++++ docs/kickstart/service/start.md | 9 +++++++++ docs/kickstart/service/stop.md | 9 +++++++++ docs/kickstart/user/add_group.md | 8 ++++++++ docs/kickstart/user/create.md | 9 +++++++++ 24 files changed, 211 insertions(+) create mode 100644 docs/kickstart/apt/add_key_from_keychain.md create mode 100644 docs/kickstart/apt/add_key_from_url.md create mode 100644 docs/kickstart/apt/ppa.md create mode 100644 docs/kickstart/download/file.md create mode 100644 docs/kickstart/download/stream.md create mode 100644 docs/kickstart/file/link.md create mode 100644 docs/kickstart/group/create.md create mode 100644 docs/kickstart/package/install.md create mode 100644 docs/kickstart/package/installed.md create mode 100644 docs/kickstart/package/manager.md create mode 100644 docs/kickstart/package/update.md create mode 100644 docs/kickstart/package/upgrade.md create mode 100644 docs/kickstart/profile/add_to_profile.md create mode 100644 docs/kickstart/profile/location/bash.md create mode 100644 docs/kickstart/profile/location/profile_d.md create mode 100644 docs/kickstart/profile/location/zsh.md create mode 100644 docs/kickstart/profile/source_on_configuration_file.md create mode 100644 docs/kickstart/service/disable.md create mode 100644 docs/kickstart/service/enable.md create mode 100644 docs/kickstart/service/restart.md create mode 100644 docs/kickstart/service/start.md create mode 100644 docs/kickstart/service/stop.md create mode 100644 docs/kickstart/user/add_group.md create mode 100644 docs/kickstart/user/create.md diff --git a/docs/kickstart/apt/add_key_from_keychain.md b/docs/kickstart/apt/add_key_from_keychain.md new file mode 100644 index 0000000..8b7b3d0 --- /dev/null +++ b/docs/kickstart/apt/add_key_from_keychain.md @@ -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 +``` diff --git a/docs/kickstart/apt/add_key_from_url.md b/docs/kickstart/apt/add_key_from_url.md new file mode 100644 index 0000000..07374f4 --- /dev/null +++ b/docs/kickstart/apt/add_key_from_url.md @@ -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 +``` diff --git a/docs/kickstart/apt/ppa.md b/docs/kickstart/apt/ppa.md new file mode 100644 index 0000000..5576ee6 --- /dev/null +++ b/docs/kickstart/apt/ppa.md @@ -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 +``` diff --git a/docs/kickstart/download/file.md b/docs/kickstart/download/file.md new file mode 100644 index 0000000..9b6a63f --- /dev/null +++ b/docs/kickstart/download/file.md @@ -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 +``` diff --git a/docs/kickstart/download/stream.md b/docs/kickstart/download/stream.md new file mode 100644 index 0000000..3e5f57d --- /dev/null +++ b/docs/kickstart/download/stream.md @@ -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 +``` diff --git a/docs/kickstart/file/link.md b/docs/kickstart/file/link.md new file mode 100644 index 0000000..d20d20f --- /dev/null +++ b/docs/kickstart/file/link.md @@ -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 +``` diff --git a/docs/kickstart/group/create.md b/docs/kickstart/group/create.md new file mode 100644 index 0000000..9598b1b --- /dev/null +++ b/docs/kickstart/group/create.md @@ -0,0 +1,8 @@ +# kickstart.group.create group +Creates `group` if it does not exist. + +### Example + +```bash +$ kickstart.group.create wheel +``` diff --git a/docs/kickstart/package/install.md b/docs/kickstart/package/install.md new file mode 100644 index 0000000..6cec722 --- /dev/null +++ b/docs/kickstart/package/install.md @@ -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 +``` diff --git a/docs/kickstart/package/installed.md b/docs/kickstart/package/installed.md new file mode 100644 index 0000000..a100bbf --- /dev/null +++ b/docs/kickstart/package/installed.md @@ -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" +``` diff --git a/docs/kickstart/package/manager.md b/docs/kickstart/package/manager.md new file mode 100644 index 0000000..c065564 --- /dev/null +++ b/docs/kickstart/package/manager.md @@ -0,0 +1,9 @@ +# kickstart.package.markdown +Print the current package manager name + +### Example + +```bash +$ kickstart.package.manager +apt-get +``` diff --git a/docs/kickstart/package/update.md b/docs/kickstart/package/update.md new file mode 100644 index 0000000..cfa01e4 --- /dev/null +++ b/docs/kickstart/package/update.md @@ -0,0 +1,9 @@ +# kickstart.package.update +Update the index of the current package manager + + +### Example + +```bash +$ kickstart.package.update +``` diff --git a/docs/kickstart/package/upgrade.md b/docs/kickstart/package/upgrade.md new file mode 100644 index 0000000..661799e --- /dev/null +++ b/docs/kickstart/package/upgrade.md @@ -0,0 +1,8 @@ +# kickstart.package.upgrade +Upgrade installed packages using the current package manager + +### Example + +```bash +$ kickstart.package.update +``` diff --git a/docs/kickstart/profile/add_to_profile.md b/docs/kickstart/profile/add_to_profile.md new file mode 100644 index 0000000..fff60ac --- /dev/null +++ b/docs/kickstart/profile/add_to_profile.md @@ -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 +``` diff --git a/docs/kickstart/profile/location/bash.md b/docs/kickstart/profile/location/bash.md new file mode 100644 index 0000000..aa924b1 --- /dev/null +++ b/docs/kickstart/profile/location/bash.md @@ -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 +``` diff --git a/docs/kickstart/profile/location/profile_d.md b/docs/kickstart/profile/location/profile_d.md new file mode 100644 index 0000000..097ded8 --- /dev/null +++ b/docs/kickstart/profile/location/profile_d.md @@ -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 +``` diff --git a/docs/kickstart/profile/location/zsh.md b/docs/kickstart/profile/location/zsh.md new file mode 100644 index 0000000..2dc1ebb --- /dev/null +++ b/docs/kickstart/profile/location/zsh.md @@ -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 +``` diff --git a/docs/kickstart/profile/source_on_configuration_file.md b/docs/kickstart/profile/source_on_configuration_file.md new file mode 100644 index 0000000..e9519e4 --- /dev/null +++ b/docs/kickstart/profile/source_on_configuration_file.md @@ -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 +``` diff --git a/docs/kickstart/service/disable.md b/docs/kickstart/service/disable.md new file mode 100644 index 0000000..c69cd29 --- /dev/null +++ b/docs/kickstart/service/disable.md @@ -0,0 +1,9 @@ +# kickdisable.service.disable service_name +Disables the `service_name` using the underlying init system + + +### Example + +```bash +$ kickdisable.service.disable redis +``` diff --git a/docs/kickstart/service/enable.md b/docs/kickstart/service/enable.md new file mode 100644 index 0000000..928be76 --- /dev/null +++ b/docs/kickstart/service/enable.md @@ -0,0 +1,9 @@ +# kickstart.service.enable service_name +Enables the `service_name` using the underlying init system + + +### Example + +```bash +$ kickstart.service.enable redis +``` diff --git a/docs/kickstart/service/restart.md b/docs/kickstart/service/restart.md new file mode 100644 index 0000000..0da1bd5 --- /dev/null +++ b/docs/kickstart/service/restart.md @@ -0,0 +1,9 @@ +# kickstart.service.restart service_name +Restarts the `service_name` using the underlying init system + + +### Example + +```bash +$ kickstart.service.restart redis +``` diff --git a/docs/kickstart/service/start.md b/docs/kickstart/service/start.md new file mode 100644 index 0000000..713e60a --- /dev/null +++ b/docs/kickstart/service/start.md @@ -0,0 +1,9 @@ +# kickstart.service.start service_name +Starts the `service_name` using the underlying init system + + +### Example + +```bash +$ kickstart.service.start redis +``` diff --git a/docs/kickstart/service/stop.md b/docs/kickstart/service/stop.md new file mode 100644 index 0000000..a443aa0 --- /dev/null +++ b/docs/kickstart/service/stop.md @@ -0,0 +1,9 @@ +# kickstart.service.stop service_name +Stops the `service_name` using the underlying init system + + +### Example + +```bash +$ kickstart.service.stop redis +``` diff --git a/docs/kickstart/user/add_group.md b/docs/kickstart/user/add_group.md new file mode 100644 index 0000000..5de032e --- /dev/null +++ b/docs/kickstart/user/add_group.md @@ -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 +``` diff --git a/docs/kickstart/user/create.md b/docs/kickstart/user/create.md new file mode 100644 index 0000000..9559728 --- /dev/null +++ b/docs/kickstart/user/create.md @@ -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 +```