From 5bbe061e77e033bbfb67fa7bd86a04c8e137034b Mon Sep 17 00:00:00 2001 From: Shawn Davis Date: Sun, 16 Aug 2020 19:12:03 -0400 Subject: [PATCH] Updated docs. --- docs/source/_data/cloc.csv | 4 +- docs/source/_includes/overlays.rst | 169 +++++++++++++++++++++++++++++ docs/source/introduction.rst | 2 +- docs/source/topics-overlays.rst | 5 +- 4 files changed, 175 insertions(+), 5 deletions(-) diff --git a/docs/source/_data/cloc.csv b/docs/source/_data/cloc.csv index 62b6dfa..e26b5c0 100644 --- a/docs/source/_data/cloc.csv +++ b/docs/source/_data/cloc.csv @@ -1,3 +1,3 @@ files,language,blank,comment,code -18,Python,774,700,1285 -18,SUM,774,700,1285 +19,Python,876,759,1463 +19,SUM,876,759,1463 diff --git a/docs/source/_includes/overlays.rst b/docs/source/_includes/overlays.rst index 9ea0ab2..12f7751 100644 --- a/docs/source/_includes/overlays.rst +++ b/docs/source/_includes/overlays.rst @@ -839,6 +839,154 @@ Write to a file. write: path content: None +Cent OS +======= + +The Cent OS overlay incorporates commands specific to that platform as well as commands from common, Django, Postgres, and POSIX. + +apache +------ + +Execute an Apache-related command. + +- op (str): The operation to perform; reload, restart, start, stop, test. + + +.. code-block:: ini + + [run apache command] + apache: op + +install +------- + +Install a system-level package. + +- name (str): The name of the package to install. + + +.. code-block:: ini + + [run install command] + install: name + +reload +------ + +Reload a service. + +- name (str): The service name. + + +.. code-block:: ini + + [run reload command] + reload: name + +restart +------- + +Restart a service. + +- name (str): The service name. + + +.. code-block:: ini + + [run restart command] + restart: name + +start +----- + +Start a service. + +- name (str): The service name. + + +.. code-block:: ini + + [run start command] + start: name + +stop +---- + +Stop a service. + +- name (str): The service name. + + +.. code-block:: ini + + [run stop command] + stop: name + +system +------ + +Perform a system operation. + +- op (str): The operation to perform; reboot, update, upgrade. + + +.. code-block:: ini + + [run system command] + system: op + +template +-------- + +Create a file from a template. + +- source (str): The path to the template file. +- target (str): The path to where the new file should be created. +- backup (bool): Indicates whether a backup should be made if the target file already exists. +- parser (str): The parser to use ``jinja`` (the default) or ``simple``. + + +.. code-block:: ini + + [run template command] + template: source target + backup: True + parser: None + +uninstall +--------- + +Uninstall a system-level package. + +- name (str): The name of the package to uninstall. + + +.. code-block:: ini + + [run uninstall command] + uninstall: name + +user +---- + +Create or remove a user. + +- name (str): The user name. +- groups (str | list): A list of groups to which the user should belong. +- home (str): The path to the user's home directory. +- op (str); The operation to perform; ``add`` or ``remove``. +- password (str): The user's password. (NOT IMPLEMENTED) + + +.. code-block:: ini + + [run user command] + user: name + groups: None + home: None + op: add + password: None + Ubuntu ====== @@ -1017,3 +1165,24 @@ Uninstall a system-level package. [run uninstall command] uninstall: name +user +---- + +Create or remove a user. + +- name (str): The user name. +- groups (str | list): A list of groups to which the user should belong. +- home (str): The path to the user's home directory. +- op (str); The operation to perform; ``add`` or ``remove``. +- password (str): The user's password. (NOT IMPLEMENTED) + + +.. code-block:: ini + + [run user command] + user: name + groups: None + home: None + op: add + password: None + diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index 494779a..7dad2d0 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -26,7 +26,7 @@ Overlays An *overlay* is a set of command meta functions that define the capabilities of a specific operating system. .. note:: - At present, the only fully defined overlay is for Ubuntu. + At present, the only fully defined overlays are for Cent OS and Ubuntu. See :ref:`topics-overlays`. diff --git a/docs/source/topics-overlays.rst b/docs/source/topics-overlays.rst index 00b41ab..864aa4b 100644 --- a/docs/source/topics-overlays.rst +++ b/docs/source/topics-overlays.rst @@ -6,15 +6,16 @@ Overlay An overlay is a collection of functions that provide an interface to command creation. -There are currently three (3) general and re-usable overlays: +There are currently four (4) general and re-usable overlays: - common - django - pgsql +- posix And two (2) overlays that are specific to operating systems: -- posix +- centos - ubuntu The examples that follow instantiate command instances from an INI file. Each example is shown with the defaults. All commands support a number of :ref:`topics-configuration-common-parameters`.