From cf32b669ff0661f5f3a407614b93c05b86321a07 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Fri, 20 May 2016 08:50:56 +0200 Subject: [PATCH] Write sphinx rst docs. --- .gitignore | 3 + Makefile | 76 ++--- .../conf/type/__apt_key/{man.text => man.rst} | 39 +-- .../type/__apt_key_uri/{man.text => man.rst} | 27 +- .../__apt_norecommends/{man.text => man.rst} | 15 +- .../conf/type/__apt_ppa/{man.text => man.rst} | 27 +- .../type/__apt_source/{man.text => man.rst} | 43 ++- .../__apt_update_index/{man.text => man.rst} | 15 +- cdist/conf/type/__block/{man.text => man.rst} | 53 ++- .../__ccollect_source/{man.text => man.rst} | 37 +-- cdist/conf/type/__cdist/{man.text => man.rst} | 27 +- .../type/__cdistmarker/{man.text => man.rst} | 25 +- .../type/__config_file/{man.text => man.rst} | 37 +-- .../conf/type/__consul/{man.text => man.rst} | 27 +- .../type/__consul_agent/{man.text => man.rst} | 168 ++++++---- .../type/__consul_check/{man.text => man.rst} | 51 +-- .../__consul_reload/{man.text => man.rst} | 15 +- .../__consul_service/{man.text => man.rst} | 56 ++-- .../__consul_template/{man.text => man.rst} | 94 +++--- .../{man.text => man.rst} | 50 +-- .../{man.text => man.rst} | 47 +-- .../{man.text => man.rst} | 38 +-- .../__consul_watch_key/{man.text => man.rst} | 34 +- .../{man.text => man.rst} | 34 +- .../{man.text => man.rst} | 29 +- .../{man.text => man.rst} | 57 ++-- .../{man.text => man.rst} | 29 +- cdist/conf/type/__cron/{man.text => man.rst} | 55 ++- .../{man.text => man.rst} | 31 +- .../type/__directory/{man.text => man.rst} | 66 ++-- .../conf/type/__dog_vdi/{man.text => man.rst} | 33 +- cdist/conf/type/__file/man.rst | 109 ++++++ cdist/conf/type/__file/man.text | 109 ------ cdist/conf/type/__firewalld_rule/man.rst | 75 +++++ cdist/conf/type/__firewalld_rule/man.text | 78 ----- cdist/conf/type/__git/{man.text => man.rst} | 31 +- cdist/conf/type/__group/{man.text => man.rst} | 51 ++- .../type/__hostname/{man.text => man.rst} | 25 +- .../__iptables_apply/{man.text => man.rst} | 11 +- cdist/conf/type/__iptables_rule/man.rst | 60 ++++ cdist/conf/type/__iptables_rule/man.text | 64 ---- cdist/conf/type/__issue/{man.text => man.rst} | 21 +- cdist/conf/type/__jail/{man.text => man.rst} | 77 +++-- .../type/__key_value/{man.text => man.rst} | 55 ++- cdist/conf/type/__line/{man.text => man.rst} | 39 +-- cdist/conf/type/__link/{man.text => man.rst} | 39 +-- .../conf/type/__locale/{man.text => man.rst} | 27 +- cdist/conf/type/__motd/{man.text => man.rst} | 23 +- cdist/conf/type/__mount/{man.text => man.rst} | 49 ++- .../__mysql_database/{man.text => man.rst} | 21 +- .../conf/type/__package/{man.text => man.rst} | 38 +-- .../type/__package_apt/{man.text => man.rst} | 33 +- .../__package_emerge/{man.text => man.rst} | 35 +- .../{man.text => man.rst} | 26 +- .../__package_luarocks/{man.text => man.rst} | 27 +- .../type/__package_opkg/{man.text => man.rst} | 29 +- .../__package_pacman/{man.text => man.rst} | 31 +- .../type/__package_pip/{man.text => man.rst} | 35 +- .../{man.text => man.rst} | 41 ++- cdist/conf/type/__package_pkg_openbsd/man.rst | 63 ++++ .../conf/type/__package_pkg_openbsd/man.text | 66 ---- .../{man.text => man.rst} | 59 ++-- .../__package_rubygem/{man.text => man.rst} | 27 +- .../{man.text => man.rst} | 30 +- .../{man.text => man.rst} | 30 +- .../type/__package_yum/{man.text => man.rst} | 37 +-- .../__package_zypper/{man.text => man.rst} | 43 ++- .../type/__pacman_conf/{man.text => man.rst} | 36 +- .../{man.text => man.rst} | 22 +- cdist/conf/type/__pf_apply/man.rst | 53 +++ cdist/conf/type/__pf_apply/man.text | 52 --- .../type/__pf_ruleset/{man.text => man.rst} | 26 +- .../conf/type/__postfix/{man.text => man.rst} | 15 +- .../__postfix_master/{man.text => man.rst} | 59 ++-- .../__postfix_postconf/{man.text => man.rst} | 20 +- .../__postfix_postmap/{man.text => man.rst} | 15 +- .../__postfix_reload/{man.text => man.rst} | 15 +- .../__postgres_database/{man.text => man.rst} | 21 +- .../__postgres_role/{man.text => man.rst} | 37 +-- cdist/conf/type/__process/man.rst | 67 ++++ cdist/conf/type/__process/man.text | 70 ---- cdist/conf/type/__pyvenv/man.rst | 78 +++++ cdist/conf/type/__pyvenv/man.text | 80 ----- .../type/__qemu_img/{man.text => man.rst} | 25 +- cdist/conf/type/__rbenv/{man.text => man.rst} | 29 +- cdist/conf/type/__rsync/{man.text => man.rst} | 69 ++-- cdist/conf/type/__rvm/{man.text => man.rst} | 29 +- cdist/conf/type/__rvm_gem/man.rst | 54 +++ cdist/conf/type/__rvm_gem/man.text | 57 ---- cdist/conf/type/__rvm_gemset/man.rst | 52 +++ cdist/conf/type/__rvm_gemset/man.text | 55 --- cdist/conf/type/__rvm_ruby/man.rst | 53 +++ cdist/conf/type/__rvm_ruby/man.text | 54 --- .../{man.text => man.rst} | 43 ++- .../{man.text => man.rst} | 95 +++--- .../type/__ssh_dot_ssh/{man.text => man.rst} | 22 +- .../type/__staged_file/{man.text => man.rst} | 79 ++--- .../__start_on_boot/{man.text => man.rst} | 34 +- .../type/__timezone/{man.text => man.rst} | 21 +- .../{man.text => man.rst} | 21 +- cdist/conf/type/__user/{man.text => man.rst} | 67 ++-- .../type/__user_groups/{man.text => man.rst} | 27 +- cdist/conf/type/__yum_repo/man.rst | 121 +++++++ cdist/conf/type/__yum_repo/man.text | 91 ----- cdist/conf/type/__zypper_repo/man.rst | 70 ++++ cdist/conf/type/__zypper_repo/man.text | 73 ---- cdist/conf/type/__zypper_service/man.rst | 63 ++++ cdist/conf/type/__zypper_service/man.text | 67 ---- docs/man/Makefile | 230 +++++++++++++ ...ference.text.sh => cdist-reference.rst.sh} | 107 +++--- docs/man/conf.py | 305 +++++++++++++++++ docs/man/index.rst | 12 + docs/man/man1/{cdist.text => cdist.rst} | 116 ++++--- docs/man/man7/cdist-best-practice.rst | 238 +++++++++++++ docs/man/man7/cdist-best-practice.text | 247 -------------- ...ist-bootstrap.text => cdist-bootstrap.rst} | 101 +++--- ...cdist-explorer.text => cdist-explorer.rst} | 53 +-- .../{cdist-hacker.text => cdist-hacker.rst} | 104 +++--- ...cdist-manifest.text => cdist-manifest.rst} | 220 ++++++------ docs/man/man7/cdist-messaging.rst | 111 +++++++ docs/man/man7/cdist-messaging.text | 114 ------- ...t-quickstart.text => cdist-quickstart.rst} | 76 ++--- docs/man/man7/cdist-reference.rst | 313 ++++++++++++++++++ ...c-copy.text => cdist-remote-exec-copy.rst} | 17 +- .../{cdist-stages.text => cdist-stages.rst} | 11 +- ...hooting.text => cdist-troubleshooting.rst} | 52 ++- ...cdist-tutorial.text => cdist-tutorial.rst} | 33 +- .../man7/{cdist-type.text => cdist-type.rst} | 226 ++++++------- docs/man/man7/cdist-type__apt_key.rst | 1 + docs/man/man7/cdist-type__apt_key_uri.rst | 1 + .../man/man7/cdist-type__apt_norecommends.rst | 1 + docs/man/man7/cdist-type__apt_ppa.rst | 1 + docs/man/man7/cdist-type__apt_source.rst | 1 + .../man/man7/cdist-type__apt_update_index.rst | 1 + docs/man/man7/cdist-type__block.rst | 1 + docs/man/man7/cdist-type__ccollect_source.rst | 1 + docs/man/man7/cdist-type__cdist.rst | 1 + docs/man/man7/cdist-type__cdistmarker.rst | 1 + docs/man/man7/cdist-type__config_file.rst | 1 + docs/man/man7/cdist-type__consul.rst | 1 + docs/man/man7/cdist-type__consul_agent.rst | 1 + docs/man/man7/cdist-type__consul_check.rst | 1 + docs/man/man7/cdist-type__consul_reload.rst | 1 + docs/man/man7/cdist-type__consul_service.rst | 1 + docs/man/man7/cdist-type__consul_template.rst | 1 + .../cdist-type__consul_template_template.rst | 1 + .../man7/cdist-type__consul_watch_checks.rst | 1 + .../man7/cdist-type__consul_watch_event.rst | 1 + .../man/man7/cdist-type__consul_watch_key.rst | 1 + .../cdist-type__consul_watch_keyprefix.rst | 1 + .../man7/cdist-type__consul_watch_nodes.rst | 1 + .../man7/cdist-type__consul_watch_service.rst | 1 + .../cdist-type__consul_watch_services.rst | 1 + docs/man/man7/cdist-type__cron.rst | 1 + .../cdist-type__debconf_set_selections.rst | 1 + docs/man/man7/cdist-type__directory.rst | 1 + docs/man/man7/cdist-type__dog_vdi.rst | 1 + docs/man/man7/cdist-type__file.rst | 1 + docs/man/man7/cdist-type__firewalld_rule.rst | 1 + docs/man/man7/cdist-type__git.rst | 1 + docs/man/man7/cdist-type__group.rst | 1 + docs/man/man7/cdist-type__hostname.rst | 1 + docs/man/man7/cdist-type__iptables_apply.rst | 1 + docs/man/man7/cdist-type__iptables_rule.rst | 1 + docs/man/man7/cdist-type__issue.rst | 1 + docs/man/man7/cdist-type__jail.rst | 1 + docs/man/man7/cdist-type__key_value.rst | 1 + docs/man/man7/cdist-type__line.rst | 1 + docs/man/man7/cdist-type__link.rst | 1 + docs/man/man7/cdist-type__locale.rst | 1 + docs/man/man7/cdist-type__motd.rst | 1 + docs/man/man7/cdist-type__mount.rst | 1 + docs/man/man7/cdist-type__mysql_database.rst | 1 + docs/man/man7/cdist-type__package.rst | 1 + docs/man/man7/cdist-type__package_apt.rst | 1 + docs/man/man7/cdist-type__package_emerge.rst | 1 + ...dist-type__package_emerge_dependencies.rst | 1 + .../man/man7/cdist-type__package_luarocks.rst | 1 + docs/man/man7/cdist-type__package_opkg.rst | 1 + docs/man/man7/cdist-type__package_pacman.rst | 1 + docs/man/man7/cdist-type__package_pip.rst | 1 + .../man7/cdist-type__package_pkg_freebsd.rst | 1 + .../man7/cdist-type__package_pkg_openbsd.rst | 1 + .../cdist-type__package_pkgng_freebsd.rst | 1 + docs/man/man7/cdist-type__package_rubygem.rst | 1 + .../man7/cdist-type__package_update_index.rst | 1 + .../man7/cdist-type__package_upgrade_all.rst | 1 + docs/man/man7/cdist-type__package_yum.rst | 1 + docs/man/man7/cdist-type__package_zypper.rst | 1 + docs/man/man7/cdist-type__pacman_conf.rst | 1 + .../cdist-type__pacman_conf_integrate.rst | 1 + docs/man/man7/cdist-type__pf_apply.rst | 1 + docs/man/man7/cdist-type__pf_ruleset.rst | 1 + docs/man/man7/cdist-type__postfix.rst | 1 + docs/man/man7/cdist-type__postfix_master.rst | 1 + .../man/man7/cdist-type__postfix_postconf.rst | 1 + docs/man/man7/cdist-type__postfix_postmap.rst | 1 + docs/man/man7/cdist-type__postfix_reload.rst | 1 + .../man7/cdist-type__postgres_database.rst | 1 + docs/man/man7/cdist-type__postgres_role.rst | 1 + docs/man/man7/cdist-type__process.rst | 1 + docs/man/man7/cdist-type__pyvenv.rst | 1 + docs/man/man7/cdist-type__qemu_img.rst | 1 + docs/man/man7/cdist-type__rbenv.rst | 1 + docs/man/man7/cdist-type__rsync.rst | 1 + docs/man/man7/cdist-type__rvm.rst | 1 + docs/man/man7/cdist-type__rvm_gem.rst | 1 + docs/man/man7/cdist-type__rvm_gemset.rst | 1 + docs/man/man7/cdist-type__rvm_ruby.rst | 1 + .../man7/cdist-type__ssh_authorized_key.rst | 1 + .../man7/cdist-type__ssh_authorized_keys.rst | 1 + docs/man/man7/cdist-type__ssh_dot_ssh.rst | 1 + docs/man/man7/cdist-type__staged_file.rst | 1 + docs/man/man7/cdist-type__start_on_boot.rst | 1 + docs/man/man7/cdist-type__timezone.rst | 1 + .../man7/cdist-type__update_alternatives.rst | 1 + docs/man/man7/cdist-type__user.rst | 1 + docs/man/man7/cdist-type__user_groups.rst | 1 + docs/man/man7/cdist-type__yum_repo.rst | 1 + docs/man/man7/cdist-type__zypper_repo.rst | 1 + docs/man/man7/cdist-type__zypper_service.rst | 1 + .../__autofs/{man.text => man.rst} | 15 +- .../__autofs_map/{man.text => man.rst} | 43 ++- .../__autofs_reload/{man.text => man.rst} | 15 +- .../__init_script/{man.text => man.rst} | 28 +- .../__mysql_server/{man.text => man.rst} | 35 +- .../__nfs_client/{man.text => man.rst} | 15 +- .../__nfs_export/{man.text => man.rst} | 27 +- .../__nfs_server/{man.text => man.rst} | 15 +- .../__rsyncer/{man.text => man.rst} | 29 +- .../__run_command/man.rst | 66 ++++ .../__run_command/man.text | 70 ---- 232 files changed, 4430 insertions(+), 3696 deletions(-) rename cdist/conf/type/__apt_key/{man.text => man.rst} (52%) rename cdist/conf/type/__apt_key_uri/{man.text => man.rst} (61%) rename cdist/conf/type/__apt_norecommends/{man.text => man.rst} (63%) rename cdist/conf/type/__apt_ppa/{man.text => man.rst} (55%) rename cdist/conf/type/__apt_source/{man.text => man.rst} (60%) rename cdist/conf/type/__apt_update_index/{man.text => man.rst} (65%) rename cdist/conf/type/__block/{man.text => man.rst} (66%) rename cdist/conf/type/__ccollect_source/{man.text => man.rst} (65%) rename cdist/conf/type/__cdist/{man.text => man.rst} (67%) rename cdist/conf/type/__cdistmarker/{man.text => man.rst} (67%) rename cdist/conf/type/__config_file/{man.text => man.rst} (57%) rename cdist/conf/type/__consul/{man.text => man.rst} (71%) rename cdist/conf/type/__consul_agent/{man.text => man.rst} (61%) rename cdist/conf/type/__consul_check/{man.text => man.rst} (64%) rename cdist/conf/type/__consul_reload/{man.text => man.rst} (65%) rename cdist/conf/type/__consul_service/{man.text => man.rst} (66%) rename cdist/conf/type/__consul_template/{man.text => man.rst} (82%) rename cdist/conf/type/__consul_template_template/{man.text => man.rst} (59%) rename cdist/conf/type/__consul_watch_checks/{man.text => man.rst} (62%) rename cdist/conf/type/__consul_watch_event/{man.text => man.rst} (65%) rename cdist/conf/type/__consul_watch_key/{man.text => man.rst} (68%) rename cdist/conf/type/__consul_watch_keyprefix/{man.text => man.rst} (68%) rename cdist/conf/type/__consul_watch_nodes/{man.text => man.rst} (69%) rename cdist/conf/type/__consul_watch_service/{man.text => man.rst} (60%) rename cdist/conf/type/__consul_watch_services/{man.text => man.rst} (68%) rename cdist/conf/type/__cron/{man.text => man.rst} (62%) rename cdist/conf/type/__debconf_set_selections/{man.text => man.rst} (52%) rename cdist/conf/type/__directory/{man.text => man.rst} (57%) rename cdist/conf/type/__dog_vdi/{man.text => man.rst} (50%) create mode 100644 cdist/conf/type/__file/man.rst delete mode 100644 cdist/conf/type/__file/man.text create mode 100644 cdist/conf/type/__firewalld_rule/man.rst delete mode 100644 cdist/conf/type/__firewalld_rule/man.text rename cdist/conf/type/__git/{man.text => man.rst} (60%) rename cdist/conf/type/__group/{man.text => man.rst} (53%) rename cdist/conf/type/__hostname/{man.text => man.rst} (63%) rename cdist/conf/type/__iptables_apply/{man.text => man.rst} (83%) create mode 100644 cdist/conf/type/__iptables_rule/man.rst delete mode 100644 cdist/conf/type/__iptables_rule/man.text rename cdist/conf/type/__issue/{man.text => man.rst} (62%) rename cdist/conf/type/__jail/{man.text => man.rst} (64%) rename cdist/conf/type/__key_value/{man.text => man.rst} (64%) rename cdist/conf/type/__line/{man.text => man.rst} (59%) rename cdist/conf/type/__link/{man.text => man.rst} (51%) rename cdist/conf/type/__locale/{man.text => man.rst} (53%) rename cdist/conf/type/__motd/{man.text => man.rst} (63%) rename cdist/conf/type/__mount/{man.text => man.rst} (66%) rename cdist/conf/type/__mysql_database/{man.text => man.rst} (65%) rename cdist/conf/type/__package/{man.text => man.rst} (61%) rename cdist/conf/type/__package_apt/{man.text => man.rst} (58%) rename cdist/conf/type/__package_emerge/{man.text => man.rst} (58%) rename cdist/conf/type/__package_emerge_dependencies/{man.text => man.rst} (55%) rename cdist/conf/type/__package_luarocks/{man.text => man.rst} (59%) rename cdist/conf/type/__package_opkg/{man.text => man.rst} (57%) rename cdist/conf/type/__package_pacman/{man.text => man.rst} (54%) rename cdist/conf/type/__package_pip/{man.text => man.rst} (55%) rename cdist/conf/type/__package_pkg_freebsd/{man.text => man.rst} (53%) create mode 100644 cdist/conf/type/__package_pkg_openbsd/man.rst delete mode 100644 cdist/conf/type/__package_pkg_openbsd/man.text rename cdist/conf/type/__package_pkgng_freebsd/{man.text => man.rst} (60%) rename cdist/conf/type/__package_rubygem/{man.text => man.rst} (60%) rename cdist/conf/type/__package_update_index/{man.text => man.rst} (58%) rename cdist/conf/type/__package_upgrade_all/{man.text => man.rst} (58%) rename cdist/conf/type/__package_yum/{man.text => man.rst} (54%) rename cdist/conf/type/__package_zypper/{man.text => man.rst} (55%) rename cdist/conf/type/__pacman_conf/{man.text => man.rst} (59%) rename cdist/conf/type/__pacman_conf_integrate/{man.text => man.rst} (57%) create mode 100644 cdist/conf/type/__pf_apply/man.rst delete mode 100644 cdist/conf/type/__pf_apply/man.text rename cdist/conf/type/__pf_ruleset/{man.text => man.rst} (57%) rename cdist/conf/type/__postfix/{man.text => man.rst} (66%) rename cdist/conf/type/__postfix_master/{man.text => man.rst} (51%) rename cdist/conf/type/__postfix_postconf/{man.text => man.rst} (64%) rename cdist/conf/type/__postfix_postmap/{man.text => man.rst} (62%) rename cdist/conf/type/__postfix_reload/{man.text => man.rst} (63%) rename cdist/conf/type/__postgres_database/{man.text => man.rst} (60%) rename cdist/conf/type/__postgres_role/{man.text => man.rst} (59%) create mode 100644 cdist/conf/type/__process/man.rst delete mode 100644 cdist/conf/type/__process/man.text create mode 100755 cdist/conf/type/__pyvenv/man.rst delete mode 100755 cdist/conf/type/__pyvenv/man.text rename cdist/conf/type/__qemu_img/{man.text => man.rst} (59%) rename cdist/conf/type/__rbenv/{man.text => man.rst} (54%) rename cdist/conf/type/__rsync/{man.text => man.rst} (61%) rename cdist/conf/type/__rvm/{man.text => man.rst} (52%) create mode 100644 cdist/conf/type/__rvm_gem/man.rst delete mode 100644 cdist/conf/type/__rvm_gem/man.text create mode 100644 cdist/conf/type/__rvm_gemset/man.rst delete mode 100644 cdist/conf/type/__rvm_gemset/man.text create mode 100644 cdist/conf/type/__rvm_ruby/man.rst delete mode 100644 cdist/conf/type/__rvm_ruby/man.text rename cdist/conf/type/__ssh_authorized_key/{man.text => man.rst} (61%) rename cdist/conf/type/__ssh_authorized_keys/{man.text => man.rst} (51%) rename cdist/conf/type/__ssh_dot_ssh/{man.text => man.rst} (57%) rename cdist/conf/type/__staged_file/{man.text => man.rst} (69%) rename cdist/conf/type/__start_on_boot/{man.text => man.rst} (57%) rename cdist/conf/type/__timezone/{man.text => man.rst} (56%) rename cdist/conf/type/__update_alternatives/{man.text => man.rst} (61%) rename cdist/conf/type/__user/{man.text => man.rst} (56%) rename cdist/conf/type/__user_groups/{man.text => man.rst} (60%) create mode 100644 cdist/conf/type/__yum_repo/man.rst delete mode 100644 cdist/conf/type/__yum_repo/man.text create mode 100644 cdist/conf/type/__zypper_repo/man.rst delete mode 100644 cdist/conf/type/__zypper_repo/man.text create mode 100644 cdist/conf/type/__zypper_service/man.rst delete mode 100644 cdist/conf/type/__zypper_service/man.text create mode 100644 docs/man/Makefile rename docs/man/{cdist-reference.text.sh => cdist-reference.rst.sh} (85%) create mode 100644 docs/man/conf.py create mode 100644 docs/man/index.rst rename docs/man/man1/{cdist.text => cdist.rst} (60%) create mode 100644 docs/man/man7/cdist-best-practice.rst delete mode 100644 docs/man/man7/cdist-best-practice.text rename docs/man/man7/{cdist-bootstrap.text => cdist-bootstrap.rst} (59%) rename docs/man/man7/{cdist-explorer.text => cdist-explorer.rst} (59%) rename docs/man/man7/{cdist-hacker.text => cdist-hacker.rst} (60%) rename docs/man/man7/{cdist-manifest.text => cdist-manifest.rst} (52%) create mode 100644 docs/man/man7/cdist-messaging.rst delete mode 100644 docs/man/man7/cdist-messaging.text rename docs/man/man7/{cdist-quickstart.text => cdist-quickstart.rst} (50%) create mode 100644 docs/man/man7/cdist-reference.rst rename docs/man/man7/{cdist-remote-exec-copy.text => cdist-remote-exec-copy.rst} (84%) rename docs/man/man7/{cdist-stages.text => cdist-stages.rst} (95%) rename docs/man/man7/{cdist-troubleshooting.text => cdist-troubleshooting.rst} (52%) rename docs/man/man7/{cdist-tutorial.text => cdist-tutorial.rst} (78%) rename docs/man/man7/{cdist-type.text => cdist-type.rst} (54%) create mode 120000 docs/man/man7/cdist-type__apt_key.rst create mode 120000 docs/man/man7/cdist-type__apt_key_uri.rst create mode 120000 docs/man/man7/cdist-type__apt_norecommends.rst create mode 120000 docs/man/man7/cdist-type__apt_ppa.rst create mode 120000 docs/man/man7/cdist-type__apt_source.rst create mode 120000 docs/man/man7/cdist-type__apt_update_index.rst create mode 120000 docs/man/man7/cdist-type__block.rst create mode 120000 docs/man/man7/cdist-type__ccollect_source.rst create mode 120000 docs/man/man7/cdist-type__cdist.rst create mode 120000 docs/man/man7/cdist-type__cdistmarker.rst create mode 120000 docs/man/man7/cdist-type__config_file.rst create mode 120000 docs/man/man7/cdist-type__consul.rst create mode 120000 docs/man/man7/cdist-type__consul_agent.rst create mode 120000 docs/man/man7/cdist-type__consul_check.rst create mode 120000 docs/man/man7/cdist-type__consul_reload.rst create mode 120000 docs/man/man7/cdist-type__consul_service.rst create mode 120000 docs/man/man7/cdist-type__consul_template.rst create mode 120000 docs/man/man7/cdist-type__consul_template_template.rst create mode 120000 docs/man/man7/cdist-type__consul_watch_checks.rst create mode 120000 docs/man/man7/cdist-type__consul_watch_event.rst create mode 120000 docs/man/man7/cdist-type__consul_watch_key.rst create mode 120000 docs/man/man7/cdist-type__consul_watch_keyprefix.rst create mode 120000 docs/man/man7/cdist-type__consul_watch_nodes.rst create mode 120000 docs/man/man7/cdist-type__consul_watch_service.rst create mode 120000 docs/man/man7/cdist-type__consul_watch_services.rst create mode 120000 docs/man/man7/cdist-type__cron.rst create mode 120000 docs/man/man7/cdist-type__debconf_set_selections.rst create mode 120000 docs/man/man7/cdist-type__directory.rst create mode 120000 docs/man/man7/cdist-type__dog_vdi.rst create mode 120000 docs/man/man7/cdist-type__file.rst create mode 120000 docs/man/man7/cdist-type__firewalld_rule.rst create mode 120000 docs/man/man7/cdist-type__git.rst create mode 120000 docs/man/man7/cdist-type__group.rst create mode 120000 docs/man/man7/cdist-type__hostname.rst create mode 120000 docs/man/man7/cdist-type__iptables_apply.rst create mode 120000 docs/man/man7/cdist-type__iptables_rule.rst create mode 120000 docs/man/man7/cdist-type__issue.rst create mode 120000 docs/man/man7/cdist-type__jail.rst create mode 120000 docs/man/man7/cdist-type__key_value.rst create mode 120000 docs/man/man7/cdist-type__line.rst create mode 120000 docs/man/man7/cdist-type__link.rst create mode 120000 docs/man/man7/cdist-type__locale.rst create mode 120000 docs/man/man7/cdist-type__motd.rst create mode 120000 docs/man/man7/cdist-type__mount.rst create mode 120000 docs/man/man7/cdist-type__mysql_database.rst create mode 120000 docs/man/man7/cdist-type__package.rst create mode 120000 docs/man/man7/cdist-type__package_apt.rst create mode 120000 docs/man/man7/cdist-type__package_emerge.rst create mode 120000 docs/man/man7/cdist-type__package_emerge_dependencies.rst create mode 120000 docs/man/man7/cdist-type__package_luarocks.rst create mode 120000 docs/man/man7/cdist-type__package_opkg.rst create mode 120000 docs/man/man7/cdist-type__package_pacman.rst create mode 120000 docs/man/man7/cdist-type__package_pip.rst create mode 120000 docs/man/man7/cdist-type__package_pkg_freebsd.rst create mode 120000 docs/man/man7/cdist-type__package_pkg_openbsd.rst create mode 120000 docs/man/man7/cdist-type__package_pkgng_freebsd.rst create mode 120000 docs/man/man7/cdist-type__package_rubygem.rst create mode 120000 docs/man/man7/cdist-type__package_update_index.rst create mode 120000 docs/man/man7/cdist-type__package_upgrade_all.rst create mode 120000 docs/man/man7/cdist-type__package_yum.rst create mode 120000 docs/man/man7/cdist-type__package_zypper.rst create mode 120000 docs/man/man7/cdist-type__pacman_conf.rst create mode 120000 docs/man/man7/cdist-type__pacman_conf_integrate.rst create mode 120000 docs/man/man7/cdist-type__pf_apply.rst create mode 120000 docs/man/man7/cdist-type__pf_ruleset.rst create mode 120000 docs/man/man7/cdist-type__postfix.rst create mode 120000 docs/man/man7/cdist-type__postfix_master.rst create mode 120000 docs/man/man7/cdist-type__postfix_postconf.rst create mode 120000 docs/man/man7/cdist-type__postfix_postmap.rst create mode 120000 docs/man/man7/cdist-type__postfix_reload.rst create mode 120000 docs/man/man7/cdist-type__postgres_database.rst create mode 120000 docs/man/man7/cdist-type__postgres_role.rst create mode 120000 docs/man/man7/cdist-type__process.rst create mode 120000 docs/man/man7/cdist-type__pyvenv.rst create mode 120000 docs/man/man7/cdist-type__qemu_img.rst create mode 120000 docs/man/man7/cdist-type__rbenv.rst create mode 120000 docs/man/man7/cdist-type__rsync.rst create mode 120000 docs/man/man7/cdist-type__rvm.rst create mode 120000 docs/man/man7/cdist-type__rvm_gem.rst create mode 120000 docs/man/man7/cdist-type__rvm_gemset.rst create mode 120000 docs/man/man7/cdist-type__rvm_ruby.rst create mode 120000 docs/man/man7/cdist-type__ssh_authorized_key.rst create mode 120000 docs/man/man7/cdist-type__ssh_authorized_keys.rst create mode 120000 docs/man/man7/cdist-type__ssh_dot_ssh.rst create mode 120000 docs/man/man7/cdist-type__staged_file.rst create mode 120000 docs/man/man7/cdist-type__start_on_boot.rst create mode 120000 docs/man/man7/cdist-type__timezone.rst create mode 120000 docs/man/man7/cdist-type__update_alternatives.rst create mode 120000 docs/man/man7/cdist-type__user.rst create mode 120000 docs/man/man7/cdist-type__user_groups.rst create mode 120000 docs/man/man7/cdist-type__yum_repo.rst create mode 120000 docs/man/man7/cdist-type__zypper_repo.rst create mode 120000 docs/man/man7/cdist-type__zypper_service.rst rename other/archived_types/__autofs/{man.text => man.rst} (65%) rename other/archived_types/__autofs_map/{man.text => man.rst} (62%) rename other/archived_types/__autofs_reload/{man.text => man.rst} (63%) rename other/types_submitted_for_inclusion/__init_script/{man.text => man.rst} (63%) rename other/types_submitted_for_inclusion/__mysql_server/{man.text => man.rst} (58%) rename other/types_submitted_for_inclusion/__nfs_client/{man.text => man.rst} (67%) rename other/types_submitted_for_inclusion/__nfs_export/{man.text => man.rst} (67%) rename other/types_submitted_for_inclusion/__nfs_server/{man.text => man.rst} (67%) rename other/types_submitted_for_inclusion/__rsyncer/{man.text => man.rst} (72%) create mode 100644 other/types_submitted_for_inclusion/__run_command/man.rst delete mode 100644 other/types_submitted_for_inclusion/__run_command/man.text diff --git a/.gitignore b/.gitignore index baf9b6f2..9c3594f7 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,9 @@ MANIFEST dist/ cdist/version.py +#sphinx build dir +_build/ + # Packaging: Archlinux /PKGBUILD /cdist-*.pkg.tar.xz diff --git a/Makefile b/Makefile index d78eb1a1..e584fc63 100644 --- a/Makefile +++ b/Makefile @@ -18,15 +18,6 @@ # # -A2XM=a2x -f manpage --no-xmllint -a encoding=UTF-8 -A2XH=a2x -f xhtml --no-xmllint -a encoding=UTF-8 -# Create cross-links in html man pages -# We look for something like "cdist-type(7)" and make a href out of it -# The first matching group is the man page name and the second group -# is the man page section (1 or 7). The first three lines of the input -# (xml, DOCTYPE, head tags) are ignored, since the head tags contains -# the title of the page and should not contain a href. -CROSSLINK=sed -i '' '1,3!s/\([[:alnum:]_-]*\)(\([17]\))/&<\/a>/g' helper=./bin/build-helper MANDIR=docs/man @@ -45,6 +36,8 @@ CHANGELOG_FILE=docs/changelog PYTHON_VERSION=cdist/version.py +SPHINXM=make -C $(MANDIR) man +SPHINXH=make -C $(MANDIR) html ################################################################################ # Manpages # @@ -52,59 +45,42 @@ MAN1DSTDIR=$(MANDIR)/man1 MAN7DSTDIR=$(MANDIR)/man7 # Manpages #1: Types -# Use shell / ls to get complete list - $(TYPEDIR)/*/man.text does not work -MANTYPESRC=$(shell ls $(TYPEDIR)/*/man.text) - -# replace first path component +# Use shell / ls to get complete list - $(TYPEDIR)/*/man.rst does not work +MANTYPESRC=$(shell ls $(TYPEDIR)/*/man.rst) MANTYPEPREFIX=$(subst $(TYPEDIR)/,$(MAN7DSTDIR)/cdist-type,$(MANTYPESRC)) +MANTYPES=$(subst /man.rst,.rst,$(MANTYPEPREFIX)) -# replace man.text with .7 or .html -MANTYPEMAN=$(subst /man.text,.7,$(MANTYPEPREFIX)) -MANTYPEHTML=$(subst /man.text,.html,$(MANTYPEPREFIX)) -MANTYPEALL=$(MANTYPEMAN) $(MANTYPEHTML) - -# Link manpage so A2XH does not create man.html but correct named file -$(MAN7DSTDIR)/cdist-type%.text: $(TYPEDIR)/%/man.text +# Link manpage: do not create man.html but correct named file +$(MAN7DSTDIR)/cdist-type%.rst: $(TYPEDIR)/%/man.rst ln -sf "../../../$^" $@ # Manpages #2: reference -MANREF=$(MAN7DSTDIR)/cdist-reference.text -MANREFSH=$(MANDIR)/cdist-reference.text.sh -MANREFMAN=$(MANREF:.text=.7) -MANREFHTML=$(MANREF:.text=.html) -MANREFALL=$(MANREFMAN) $(MANREFHTML) +MANREF=$(MAN7DSTDIR)/cdist-reference.rst +MANREFSH=$(MANDIR)/cdist-reference.rst.sh $(MANREF): $(MANREFSH) $(MANREFSH) -# Manpages #3: static pages -MAN1STATIC=$(shell ls $(MAN1DSTDIR)/*.text) -MAN7STATIC=$(shell ls $(MAN7DSTDIR)/*.text) -MANSTATICMAN=$(MAN1STATIC:.text=.1) $(MAN7STATIC:.text=.7) -MANSTATICHTML=$(MAN1STATIC:.text=.html) $(MAN7STATIC:.text=.html) -MANSTATICALL=$(MANSTATICMAN) $(MANSTATICHTML) +# Manpages #3: generic part +mansphinxman: $(MANTYPES) $(MANREF) + $(SPHINXM) -# Manpages #4: generic part +mansphinxhtml: $(MANTYPES) $(MANREF) + $(SPHINXH) -# Creating the type manpage -%.1 %.7: %.text - $(A2XM) $^ - -# Creating the type html page -%.html: %.text - $(A2XH) $^ - $(CROSSLINK) $@ - -man: $(MANTYPEALL) $(MANREFALL) $(MANSTATICALL) +man: mansphinxman mansphinxhtml # Manpages #5: release part MANWEBDIR=$(WEBBASE)/man/$(CHANGELOG_VERSION) +MANBUILDDIR=$(MANDIR)/_build/html -man-dist: man check-date +man-dist: man rm -rf "${MANWEBDIR}" - mkdir -p "${MANWEBDIR}/man1" "${MANWEBDIR}/man7" - cp ${MAN1DSTDIR}/*.html ${MAN1DSTDIR}/*.css ${MANWEBDIR}/man1 - cp ${MAN7DSTDIR}/*.html ${MAN7DSTDIR}/*.css ${MANWEBDIR}/man7 + mkdir -p "${MANWEBDIR}" + # mkdir -p "${MANWEBDIR}/man1" "${MANWEBDIR}/man7" + # cp ${MAN1DSTDIR}/*.html ${MAN1DSTDIR}/*.css ${MANWEBDIR}/man1 + # cp ${MAN7DSTDIR}/*.html ${MAN7DSTDIR}/*.css ${MANWEBDIR}/man7 + cp -R ${MANBUILDDIR}/* ${MANWEBDIR} cd ${MANWEBDIR} && git add . && git commit -m "cdist manpages update: $(CHANGELOG_VERSION)" || true man-latest-link: web-pub @@ -216,15 +192,13 @@ release: # clean: - rm -f $(MAN7DSTDIR)/cdist-reference.text + rm -f $(MAN7DSTDIR)/cdist-reference.rst find "$(MANDIR)" -mindepth 2 -type l \ - -o -name "*.1" \ - -o -name "*.7" \ - -o -name "*.html" \ - -o -name "*.xml" \ | xargs rm -f + make -C $(MANDIR) clean + find * -name __pycache__ | xargs rm -rf # Archlinux diff --git a/cdist/conf/type/__apt_key/man.text b/cdist/conf/type/__apt_key/man.rst similarity index 52% rename from cdist/conf/type/__apt_key/man.text rename to cdist/conf/type/__apt_key/man.rst index 1a33e732..43dc89b1 100644 --- a/cdist/conf/type/__apt_key/man.text +++ b/cdist/conf/type/__apt_key/man.rst @@ -1,13 +1,10 @@ cdist-type__apt_key(7) ====================== +Manage the list of keys used by apt + Steven Armstrong -NAME ----- -cdist-type__apt_key - manage the list of keys used by apt - - DESCRIPTION ----------- Manages the list of keys used by apt to authenticate packages. @@ -20,13 +17,13 @@ None. OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent'. Defaults to 'present' -keyid:: +keyid the id of the key to add. Defaults to __object_id -keyserver:: +keyserver the keyserver from which to fetch the key. If omitted the default set in ./parameter/default/keyserver is used. @@ -34,25 +31,25 @@ keyserver:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Add Ubuntu Archive Automatic Signing Key -__apt_key 437D05B5 -# Same thing -__apt_key 437D05B5 --state present -# Get rid of it -__apt_key 437D05B5 --state absent +.. code-block:: sh -# same thing with human readable name and explicit keyid -__apt_key UbuntuArchiveKey --keyid 437D05B5 + # Add Ubuntu Archive Automatic Signing Key + __apt_key 437D05B5 + # Same thing + __apt_key 437D05B5 --state present + # Get rid of it + __apt_key 437D05B5 --state absent -# same thing with other keyserver -__apt_key UbuntuArchiveKey --keyid 437D05B5 --keyserver keyserver.ubuntu.com --------------------------------------------------------------------------------- + # same thing with human readable name and explicit keyid + __apt_key UbuntuArchiveKey --keyid 437D05B5 + + # same thing with other keyserver + __apt_key UbuntuArchiveKey --keyid 437D05B5 --keyserver keyserver.ubuntu.com SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__apt_key_uri/man.text b/cdist/conf/type/__apt_key_uri/man.rst similarity index 61% rename from cdist/conf/type/__apt_key_uri/man.text rename to cdist/conf/type/__apt_key_uri/man.rst index fe9c3a25..a235e13a 100644 --- a/cdist/conf/type/__apt_key_uri/man.text +++ b/cdist/conf/type/__apt_key_uri/man.rst @@ -1,13 +1,10 @@ cdist-type__apt_key_uri(7) ========================== +Add apt key from uri + Steven Armstrong -NAME ----- -cdist-type__apt_key_uri - add apt key from uri - - DESCRIPTION ----------- Download a key from an uri and add it to the apt keyring. @@ -15,16 +12,16 @@ Download a key from an uri and add it to the apt keyring. REQUIRED PARAMETERS ------------------- -uri:: +uri the uri from which to download the key OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to 'present' -name:: +name a name for this key, used when testing if it is already installed. Defaults to __object_id @@ -32,17 +29,17 @@ name:: EXAMPLES -------- --------------------------------------------------------------------------------- -__apt_key_uri rabbitmq \ - --name 'RabbitMQ Release Signing Key ' \ - --uri http://www.rabbitmq.com/rabbitmq-signing-key-public.asc \ - --state present --------------------------------------------------------------------------------- +.. code-block:: sh + + __apt_key_uri rabbitmq \ + --name 'RabbitMQ Release Signing Key ' \ + --uri http://www.rabbitmq.com/rabbitmq-signing-key-public.asc \ + --state present SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__apt_norecommends/man.text b/cdist/conf/type/__apt_norecommends/man.rst similarity index 63% rename from cdist/conf/type/__apt_norecommends/man.text rename to cdist/conf/type/__apt_norecommends/man.rst index 3b65e72f..232bb166 100644 --- a/cdist/conf/type/__apt_norecommends/man.text +++ b/cdist/conf/type/__apt_norecommends/man.rst @@ -1,13 +1,10 @@ cdist-type__apt_norecommends(7) =============================== +Configure apt to not install recommended packages + Steven Armstrong -NAME ----- -cdist-type__apt_norecommends - configure apt to not install recommended packages - - DESCRIPTION ----------- Configure apt to not install any recommended or suggested packages. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__apt_norecommends --------------------------------------------------------------------------------- +.. code-block:: sh + + __apt_norecommends SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__apt_ppa/man.text b/cdist/conf/type/__apt_ppa/man.rst similarity index 55% rename from cdist/conf/type/__apt_ppa/man.text rename to cdist/conf/type/__apt_ppa/man.rst index da18e9f0..e39bd6b2 100644 --- a/cdist/conf/type/__apt_ppa/man.text +++ b/cdist/conf/type/__apt_ppa/man.rst @@ -1,13 +1,10 @@ cdist-type__apt_ppa(7) ====================== +Manage ppa repositories + Steven Armstrong -NAME ----- -cdist-type__apt_ppa - Manage ppa repositories - - DESCRIPTION ----------- This cdist type allows manage ubuntu ppa repositories. @@ -15,7 +12,7 @@ This cdist type allows manage ubuntu ppa repositories. REQUIRED PARAMETERS ------------------- -state:: +state The state the ppa should be in, either 'present' or 'absent'. Defaults to 'present' @@ -28,20 +25,20 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -# Enable a ppa repository -__apt_ppa ppa:sans-intern/missing-bits -# same as -__apt_ppa ppa:sans-intern/missing-bits --state present +.. code-block:: sh -# Disable a ppa repository -__apt_ppa ppa:sans-intern/missing-bits --state absent --------------------------------------------------------------------------------- + # Enable a ppa repository + __apt_ppa ppa:sans-intern/missing-bits + # same as + __apt_ppa ppa:sans-intern/missing-bits --state present + + # Disable a ppa repository + __apt_ppa ppa:sans-intern/missing-bits --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__apt_source/man.text b/cdist/conf/type/__apt_source/man.rst similarity index 60% rename from cdist/conf/type/__apt_source/man.text rename to cdist/conf/type/__apt_source/man.rst index 03b2b311..70649c4b 100644 --- a/cdist/conf/type/__apt_source/man.text +++ b/cdist/conf/type/__apt_source/man.rst @@ -1,13 +1,10 @@ cdist-type__apt_source(7) ========================= +Manage apt sources + Steven Armstrong -NAME ----- -cdist-type__apt_source - manage apt sources - - DESCRIPTION ----------- This cdist type allows you to manage apt sources. @@ -15,52 +12,52 @@ This cdist type allows you to manage apt sources. REQUIRED PARAMETERS ------------------- -uri:: +uri the uri to the apt repository OPTIONAL PARAMETERS ------------------- -arch:: +arch set this if you need to force and specific arch (ubuntu specific) -state:: +state 'present' or 'absent', defaults to 'present' -distribution:: +distribution the distribution codename to use. Defaults to DISTRIB_CODENAME from the targets /etc/lsb-release -component:: +component space delimited list of components to enable. Defaults to an empty string. BOOLEAN PARAMETERS ------------------ -include-src:: +include-src include deb-src entries EXAMPLES -------- --------------------------------------------------------------------------------- -__apt_source rabbitmq \ - --uri http://www.rabbitmq.com/debian/ \ - --distribution testing \ - --component main \ - --include-src \ - --state present +.. code-block:: sh -__apt_source canonical_partner \ - --uri http://archive.canonical.com/ \ - --component partner --state present --------------------------------------------------------------------------------- + __apt_source rabbitmq \ + --uri http://www.rabbitmq.com/debian/ \ + --distribution testing \ + --component main \ + --include-src \ + --state present + + __apt_source canonical_partner \ + --uri http://archive.canonical.com/ \ + --component partner --state present SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__apt_update_index/man.text b/cdist/conf/type/__apt_update_index/man.rst similarity index 65% rename from cdist/conf/type/__apt_update_index/man.text rename to cdist/conf/type/__apt_update_index/man.rst index 628292dc..2fc66c65 100644 --- a/cdist/conf/type/__apt_update_index/man.text +++ b/cdist/conf/type/__apt_update_index/man.rst @@ -1,13 +1,10 @@ cdist-type__apt_update_index(7) =============================== +Update apt's package index + Steven Armstrong -NAME ----- -cdist-type__apt_update_index - Update apt's package index - - DESCRIPTION ----------- This cdist type runs apt-get update whenever any apt sources have changed. @@ -25,14 +22,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__apt_update_index --------------------------------------------------------------------------------- +.. code-block:: sh + + __apt_update_index SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__block/man.text b/cdist/conf/type/__block/man.rst similarity index 66% rename from cdist/conf/type/__block/man.text rename to cdist/conf/type/__block/man.rst index 97f538fa..4b7d61dc 100644 --- a/cdist/conf/type/__block/man.text +++ b/cdist/conf/type/__block/man.rst @@ -1,13 +1,10 @@ cdist-type__block(7) ==================== +Manage blocks of text in files + Steven Armstrong -NAME ----- -cdist-type__block - Manage blocks of text in files - - DESCRIPTION ----------- Manage a block of text in an existing file. @@ -18,62 +15,62 @@ of text. REQUIRED PARAMETERS ------------------- -text:: +text the text to manage. If text is '-' (dash), take what was written to stdin as the text. OPTIONAL PARAMETERS ------------------- -file:: +file the file in which to manage the text block. Defaults to object_id. -prefix:: +prefix the prefix to add before the text. Defaults to #cdist:__block/$__object_id -suffix:: +suffix the suffix to add after the text. Defaults to #/cdist:__block/$__object_id -state:: +state 'present' or 'absent', defaults to 'present' MESSAGES -------- -add:: +add block was added -update:: +update block was updated/changed -remove:: +remove block was removed EXAMPLES -------- --------------------------------------------------------------------------------- -# text from argument -__block /path/to/file \ - --prefix '#start' \ - --suffix '#end' \ - --text 'some\nblock of\ntext' +.. code-block:: sh -# text from stdin -__block some-id \ - --file /path/to/file \ - --text - << DONE -here some block -of text -DONE --------------------------------------------------------------------------------- + # text from argument + __block /path/to/file \ + --prefix '#start' \ + --suffix '#end' \ + --text 'some\nblock of\ntext' + + # text from stdin + __block some-id \ + --file /path/to/file \ + --text - << DONE + here some block + of text + DONE SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__ccollect_source/man.text b/cdist/conf/type/__ccollect_source/man.rst similarity index 65% rename from cdist/conf/type/__ccollect_source/man.text rename to cdist/conf/type/__ccollect_source/man.rst index 32a7467e..12fb8f42 100644 --- a/cdist/conf/type/__ccollect_source/man.text +++ b/cdist/conf/type/__ccollect_source/man.rst @@ -1,59 +1,58 @@ cdist-type__ccollect_source(7) ============================== +Manage ccollect sources + Nico Schottelius -NAME ----- -cdist-type__ccollect_source - Manage ccollect sources - - DESCRIPTION ----------- This cdist type allows you to create or delete ccollect sources. + REQUIRED PARAMETERS ------------------- -source:: +source The source from which to backup -destination:: +destination The destination directory OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to 'present' -ccollectconf:: +ccollectconf The CCOLLECT_CONF directory. Defaults to /etc/ccollect. OPTIONAL MULTIPLE PARAMETERS ---------------------------- -exclude:: +exclude Paths to exclude of backup + BOOLEAN PARAMETERS ------------------ -verbose:: +verbose Whether to report backup verbosely + EXAMPLES -------- --------------------------------------------------------------------------------- -__ccollect_source doc.ungleich.ch \ - --source doc.ungleich.ch:/ \ - --destination /backup/doc.ungleich.ch \ - --exclude '/proc/*' --exclude '/sys/*' \ - --verbose +.. code-block:: sh --------------------------------------------------------------------------------- + __ccollect_source doc.ungleich.ch \ + --source doc.ungleich.ch:/ \ + --destination /backup/doc.ungleich.ch \ + --exclude '/proc/*' --exclude '/sys/*' \ + --verbose SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - ccollect(1) - http://www.nico.schottelius.org/software/ccollect/ diff --git a/cdist/conf/type/__cdist/man.text b/cdist/conf/type/__cdist/man.rst similarity index 67% rename from cdist/conf/type/__cdist/man.text rename to cdist/conf/type/__cdist/man.rst index 0805598e..f15d3b73 100644 --- a/cdist/conf/type/__cdist/man.text +++ b/cdist/conf/type/__cdist/man.rst @@ -1,13 +1,10 @@ cdist-type__cdist(7) ==================== +Manage cdist installations + Nico Schottelius -NAME ----- -cdist-type__cdist - Manage cdist installations - - DESCRIPTION ----------- This cdist type allows you to easily setup cdist @@ -26,16 +23,16 @@ REQUIRED PARAMETERS OPTIONAL PARAMETERS ------------------- -username:: +username Select the user to create for the cdist installation. Defaults to "cdist". -source:: +source Select the source from which to clone cdist from. Defaults to "git://github.com/telmich/cdist.git". -branch:: +branch Select the branch to checkout from. Defaults to "master". @@ -43,18 +40,18 @@ branch:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Install cdist for user cdist in her home as subfolder cdist -__cdist /home/cdist/cdist +.. code-block:: sh -# Use alternative source -__cdist --source "git://git.schottelius.org/cdist" /home/cdist/cdist --------------------------------------------------------------------------------- + # Install cdist for user cdist in her home as subfolder cdist + __cdist /home/cdist/cdist + + # Use alternative source + __cdist --source "git://git.schottelius.org/cdist" /home/cdist/cdist SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__cdistmarker/man.text b/cdist/conf/type/__cdistmarker/man.rst similarity index 67% rename from cdist/conf/type/__cdistmarker/man.text rename to cdist/conf/type/__cdistmarker/man.rst index 3a59659b..22e711b6 100644 --- a/cdist/conf/type/__cdistmarker/man.text +++ b/cdist/conf/type/__cdistmarker/man.rst @@ -1,13 +1,10 @@ cdist-type__cdistmarker(7) ========================== +Add a timestamped cdist marker. + Daniel Maher -NAME ----- -cdist-type__cdistmarker - Add a timestamped cdist marker. - - DESCRIPTION ----------- This type is used to add a common marker file which indicates that a given @@ -23,11 +20,11 @@ None. OPTIONAL PARAMETERS ------------------- -destination:: +destination The path and filename of the marker. Default: /etc/cdist-configured -format:: +format The format of the timestamp. This is passed directly to system 'date'. Default: -u @@ -35,18 +32,18 @@ format:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Creates the marker as normal. -__cdistmarker +.. code-block:: sh -# Creates the marker differently. -__cdistmarker --destination /tmp/cdist_marker --format '+%s' --------------------------------------------------------------------------------- + # Creates the marker as normal. + __cdistmarker + + # Creates the marker differently. + __cdistmarker --destination /tmp/cdist_marker --format '+%s' SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__config_file/man.text b/cdist/conf/type/__config_file/man.rst similarity index 57% rename from cdist/conf/type/__config_file/man.text rename to cdist/conf/type/__config_file/man.rst index a4ec7363..49b63984 100644 --- a/cdist/conf/type/__config_file/man.text +++ b/cdist/conf/type/__config_file/man.rst @@ -1,13 +1,10 @@ cdist-type__config_file(7) ========================== +Manages config files + Steven Armstrong -NAME ----- -cdist-type__config_file - manages config files - - DESCRIPTION ----------- Deploy config files using the file type. @@ -21,37 +18,37 @@ None. OPTIONAL PARAMETERS ------------------- -group:: +group see cdist-type__file -mode:: +mode see cdist-type__file -onchange:: +onchange the code to run if the file changes -owner:: +owner see cdist-type__file -source:: +source Path to the config file. If source is '-' (dash), take what was written to stdin as the config file content. -state:: +state see cdist-type__file EXAMPLES -------- --------------------------------------------------------------------------------- -__config_file /etc/consul/conf.d/watch_foo.json \ - --owner root --group consul --mode 640 \ - --source "$__type/files/watch_foo.json" \ - --state present \ - --onchange 'service consul status >/dev/null && service consul reload || true' --------------------------------------------------------------------------------- +.. code-block:: sh + + __config_file /etc/consul/conf.d/watch_foo.json \ + --owner root --group consul --mode 640 \ + --source "$__type/files/watch_foo.json" \ + --state present \ + --onchange 'service consul status >/dev/null && service consul reload || true' SEE ALSO -------- -- cdist-type(7) -- cdist-type__file(7) +- `cdist-type(7) `_ +- `cdist-type__file(7) `_ COPYING diff --git a/cdist/conf/type/__consul/man.text b/cdist/conf/type/__consul/man.rst similarity index 71% rename from cdist/conf/type/__consul/man.text rename to cdist/conf/type/__consul/man.rst index 5ebaf1e8..77fae852 100644 --- a/cdist/conf/type/__consul/man.text +++ b/cdist/conf/type/__consul/man.rst @@ -1,13 +1,10 @@ cdist-type__consul(7) ===================== +Install consul + Steven Armstrong -NAME ----- -cdist-type__consul - install consul - - DESCRIPTION ----------- Downloads and installs the consul binary from https://dl.bintray.com/mitchellh/consul. @@ -22,10 +19,10 @@ None. OPTIONAL PARAMETERS ------------------- -state:: +state either 'present' or 'absent'. Defaults to 'present' -version:: +version which version of consul to install. See ./files/versions for a list of supported versions. Defaults to the latest known version. @@ -33,19 +30,19 @@ version:: EXAMPLES -------- --------------------------------------------------------------------------------- -# just install using defaults -__consul +.. code-block:: sh -# specific version -__consul \ - --version 0.4.1 --------------------------------------------------------------------------------- + # just install using defaults + __consul + + # specific version + __consul \ + --version 0.4.1 SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__consul_agent/man.text b/cdist/conf/type/__consul_agent/man.rst similarity index 61% rename from cdist/conf/type/__consul_agent/man.text rename to cdist/conf/type/__consul_agent/man.rst index 3491eb4c..8285cb25 100644 --- a/cdist/conf/type/__consul_agent/man.text +++ b/cdist/conf/type/__consul_agent/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_agent(7) =========================== +Manage the consul agent + Steven Armstrong -NAME ----- -cdist-type__consul_agent - manage the consul agent - - DESCRIPTION ----------- Configure and manage the consul agent. @@ -20,129 +17,154 @@ None. OPTIONAL PARAMETERS ------------------- -acl-datacenter:: +acl-datacenter only used by servers. This designates the datacenter which is authoritative for ACL information. -acl-default-policy:: + +acl-default-policy either "allow" or "deny"; defaults to "allow". The default policy controls the behavior of a token when there is no matching rule. -acl-down-policy:: + +acl-down-policy either "allow", "deny" or "extend-cache"; "extend-cache" is the default. -acl-master-token:: + +acl-master-token only used for servers in the acl_datacenter. This token will be created with management-level permissions if it does not exist. It allows operators to bootstrap the ACL system with a token ID that is well-known. -acl-token:: + +acl-token when provided, the agent will use this token when making requests to the Consul servers. -acl-ttl:: + +acl-ttl used to control Time-To-Live caching of ACLs. -bind-addr:: + +bind-addr sets the bind address for cluster communication -bootstrap-expect:: + +bootstrap-expect sets server to expect bootstrap mode -ca-file-source:: + +ca-file-source path to a PEM encoded certificate authority file which will be uploaded and configure using the ca_file config option. -cert-file-source:: + +cert-file-source path to a PEM encoded certificate file which will be uploaded and configure using the cert_file config option. -client-addr:: + +client-addr sets the address to bind for client access -datacenter:: + +datacenter datacenter of the agent -encrypt:: + +encrypt provides the gossip encryption key -group:: + +group the primary group for the agent -json-config:: + +json-config path to a partial json config file without leading { and trailing }. If json-config is '-' (dash), take what was written to stdin as the file content. -key-file-source:: + +key-file-source path to a PEM encoded private key file which will be uploaded and configure using the key_file config option. -node-name:: + +node-name name of this node. Must be unique in the cluster -retry-join:: + +retry-join address to attempt joining every retry_interval until at least one join works. Can be specified multiple times. -user:: + +user the user to run the agent as -state:: + +state if the agent is 'present' or 'absent'. Defaults to 'present'. Currently state=absent is not working due to some dependency issues. BOOLEAN PARAMETERS ------------------ -disable-remote-exec:: +disable-remote-exec disables support for remote execution. When set to true, the agent will ignore any incoming remote exec requests. -disable-update-check:: + +disable-update-check disables automatic checking for security bulletins and new version releases -leave-on-terminate:: + +leave-on-terminate gracefully leave cluster on SIGTERM -rejoin-after-leave:: + +rejoin-after-leave rejoin the cluster using the previous state after leaving -server:: + +server used to control if an agent is in server or client mode -syslog:: + +syslog enables logging to syslog -verify-incoming:: + +verify-incoming enforce the use of TLS and verify a client's authenticity on incomming connections -verify-outgoing:: + +verify-outgoing enforce the use of TLS and verify the peers authenticity on outgoing connections EXAMPLES -------- --------------------------------------------------------------------------------- -# configure as server, bootstrap and rejoin -hostname="$(cat "$__global/explorer/hostname")" -__consul_agent \ - --datacenter dc1 \ - --node-name "${hostname%%.*}" \ - --disable-update-check \ - --server \ - --rejoin-after-leave \ - --bootstrap-expect 3 \ - --retry-join consul-01 \ - --retry-join consul-02 \ - --retry-join consul-03 +.. code-block:: sh -# configure as server, bootstrap and rejoin with ssl support -hostname="$(cat "$__global/explorer/hostname")" -__consul_agent \ - --datacenter dc1 \ - --node-name "${hostname%%.*}" \ - --disable-update-check \ - --server \ - --rejoin-after-leave \ - --bootstrap-expect 3 \ - --retry-join consul-01 \ - --retry-join consul-02 \ - --retry-join consul-03 \ - --ca-file-source /path/to/ca.pem \ - --cert-file-source /path/to/cert.pem \ - --key-file-source /path/to/key.pem \ - --verify-incoming \ - --verify-outgoing + # configure as server, bootstrap and rejoin + hostname="$(cat "$__global/explorer/hostname")" + __consul_agent \ + --datacenter dc1 \ + --node-name "${hostname%%.*}" \ + --disable-update-check \ + --server \ + --rejoin-after-leave \ + --bootstrap-expect 3 \ + --retry-join consul-01 \ + --retry-join consul-02 \ + --retry-join consul-03 -# configure as client and try joining existing cluster -__consul_agent \ - --datacenter dc1 \ - --node-name "${hostname%%.*}" \ - --disable-update-check \ - --retry-join consul-01 \ - --retry-join consul-02 \ - --retry-join consul-03 + # configure as server, bootstrap and rejoin with ssl support + hostname="$(cat "$__global/explorer/hostname")" + __consul_agent \ + --datacenter dc1 \ + --node-name "${hostname%%.*}" \ + --disable-update-check \ + --server \ + --rejoin-after-leave \ + --bootstrap-expect 3 \ + --retry-join consul-01 \ + --retry-join consul-02 \ + --retry-join consul-03 \ + --ca-file-source /path/to/ca.pem \ + --cert-file-source /path/to/cert.pem \ + --key-file-source /path/to/key.pem \ + --verify-incoming \ + --verify-outgoing --------------------------------------------------------------------------------- + # configure as client and try joining existing cluster + __consul_agent \ + --datacenter dc1 \ + --node-name "${hostname%%.*}" \ + --disable-update-check \ + --retry-join consul-01 \ + --retry-join consul-02 \ + --retry-join consul-03 SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - http://www.consul.io/docs/agent/options.html diff --git a/cdist/conf/type/__consul_check/man.text b/cdist/conf/type/__consul_check/man.rst similarity index 64% rename from cdist/conf/type/__consul_check/man.text rename to cdist/conf/type/__consul_check/man.rst index 18eaf638..1de65358 100644 --- a/cdist/conf/type/__consul_check/man.text +++ b/cdist/conf/type/__consul_check/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_check(7) ============================= +Manages consul checks + Steven Armstrong -NAME ----- -cdist-type__consul_check - manages consul checks - - DESCRIPTION ----------- Generate and deploy check definitions for a consul agent. @@ -23,43 +20,49 @@ None. OPTIONAL PARAMETERS ------------------- -interval:: +interval the interval in which the script given with --script should be run -script:: + +script the shell command to run every --interval -ttl:: + +ttl how long a check is considered healthy without being updated through the HTTP interfave -id:: + +id Defaults to --name -name:: + +name The name of this check. Defaults to __object_id -notes:: + +notes human readable description -state:: + +state if this check is 'present' or 'absent'. Defaults to 'present'. EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_check redis \ - --script /usr/local/bin/check_redis.py \ - --interval 10s +.. code-block:: sh -__consul_check some-object-id \ - --id web-app \ - --name "Web App Status" \ - --notes "Web app does a curl internally every 10 seconds" \ - --ttl 30s --------------------------------------------------------------------------------- + __consul_check redis \ + --script /usr/local/bin/check_redis.py \ + --interval 10s + + __consul_check some-object-id \ + --id web-app \ + --name "Web App Status" \ + --notes "Web app does a curl internally every 10 seconds" \ + --ttl 30s SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ COPYING diff --git a/cdist/conf/type/__consul_reload/man.text b/cdist/conf/type/__consul_reload/man.rst similarity index 65% rename from cdist/conf/type/__consul_reload/man.text rename to cdist/conf/type/__consul_reload/man.rst index 8dd045cf..f66bb545 100644 --- a/cdist/conf/type/__consul_reload/man.text +++ b/cdist/conf/type/__consul_reload/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_reload(7) ============================ +Reload consul + Steven Armstrong -NAME ----- -cdist-type__consul_reload - reload consul - - DESCRIPTION ----------- Reload consul after configuration changes. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_reload --------------------------------------------------------------------------------- +.. code-block:: sh + + __consul_reload SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__consul_service/man.text b/cdist/conf/type/__consul_service/man.rst similarity index 66% rename from cdist/conf/type/__consul_service/man.text rename to cdist/conf/type/__consul_service/man.rst index 6bb024b1..9a8efaab 100644 --- a/cdist/conf/type/__consul_service/man.text +++ b/cdist/conf/type/__consul_service/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_service(7) ============================= +Manages consul services + Steven Armstrong -NAME ----- -cdist-type__consul_service - manages consul services - - DESCRIPTION ----------- Generate and deploy service definitions for a consul agent. @@ -23,46 +20,53 @@ None. OPTIONAL PARAMETERS ------------------- -check-interval:: +check-interval the interval in which the script given with --check-script should be run -check-script:: + +check-script the shell command to run every --check-interval -check-ttl:: + +check-ttl how long a service is considered healthy without being updated through the HTTP interfave -id:: + +id Defaults to --name -name:: + +name The name of this service. Defaults to __object_id -port:: + +port the port at which this service can be reached -state:: + +state if this service is 'present' or 'absent'. Defaults to 'present'. -tag:: + +tag a tag to add to this service. Can be specified multiple times. EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_service redis \ - --tag master \ - --tag production \ - --port 8000 \ - --check-script /usr/local/bin/check_redis.py \ - --check-interval 10s +.. code-block:: sh -__consul_service webapp \ - --port 80 \ - --check-ttl 10s --------------------------------------------------------------------------------- + __consul_service redis \ + --tag master \ + --tag production \ + --port 8000 \ + --check-script /usr/local/bin/check_redis.py \ + --check-interval 10s + + __consul_service webapp \ + --port 80 \ + --check-ttl 10s SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ COPYING diff --git a/cdist/conf/type/__consul_template/man.text b/cdist/conf/type/__consul_template/man.rst similarity index 82% rename from cdist/conf/type/__consul_template/man.text rename to cdist/conf/type/__consul_template/man.rst index 0d86aee8..bcdb94e3 100644 --- a/cdist/conf/type/__consul_template/man.text +++ b/cdist/conf/type/__consul_template/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_template(7) ============================== +Manage the consul-template service + Steven Armstrong -NAME ----- -cdist-type__consul_template - manage the consul-template service - - DESCRIPTION ----------- Downloads and installs the consul-template binary from @@ -24,52 +21,69 @@ None. OPTIONAL PARAMETERS ------------------- -auth-username:: +auth-username specify a username for basic authentication. -auth-password:: + +auth-password specify a password for basic authentication. -batch-size:: + +batch-size the size of the batch when polling multiple dependencies. -consul:: + +consul the location of the Consul instance to query (may be an IP address or FQDN) with port. Defaults to 'localhost:8500'. -log-level:: + +log-level The log level for output. This applies to the stdout/stderr logging as well as syslog logging (if enabled). Valid values are "debug", "info", "warn", and "err". The default value is "warn". -max-stale:: + +max-stale the maximum staleness of a query. If specified, Consul will distribute work among all servers instead of just the leader. -retry:: + +retry the amount of time to wait if Consul returns an error when communicating with the API. -state:: + +state either 'present' or 'absent'. Defaults to 'present' -ssl-cert:: + +ssl-cert Path to an SSL client certificate to use to authenticate to the consul server. Useful if the consul server "verify_incoming" option is set. -ssl-ca-cert:: + +ssl-ca-cert Path to a CA certificate file, containing one or more CA certificates to use to validate the certificate sent by the consul server to us. This is a handy alternative to setting --ssl-no-verify if you are using your own CA. -syslog-facility:: + +syslog-facility The facility to use when sending to syslog. This requires the use of --syslog. The default value is LOCAL0. -token:: + +token the Consul API token. -vault-address:: + +vault-address the location of the Vault instance to query (may be an IP address or FQDN) with port. -vault-token:: + +vault-token the Vault API token. -vault-ssl-cert:: + +vault-ssl-cert Path to an SSL client certificate to use to authenticate to the vault server. -vault-ssl-ca-cert:: + +vault-ssl-ca-cert Path to a CA certificate file, containing one or more CA certificates to use to validate the certificate sent by the vault server to us. -version:: + +version which version of consul-template to install. See ./files/versions for a list of supported versions. Defaults to the latest known version. -wait:: + +wait the minimum(:maximum) to wait before rendering a new template to disk and triggering a command, separated by a colon (:). If the optional maximum value is omitted, it is assumed to be 4x the required minimum value. @@ -77,36 +91,40 @@ wait:: BOOLEAN PARAMETERS ------------------ -ssl:: +ssl use HTTPS while talking to Consul. Requires the Consul server to be configured to serve secure connections. -ssl-no-verify:: + +ssl-no-verify ignore certificate warnings. Only used if ssl is enabled. -syslog:: + +syslog Send log output to syslog (in addition to stdout and stderr). -vault-ssl:: + +vault-ssl use HTTPS while talking to Vault. Requires the Vault server to be configured to serve secure connections. -vault-ssl-no-verify:: + +vault-ssl-no-verify ignore certificate warnings. Only used if vault is enabled. EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_template \ - --consul consul.service.consul:8500 \ - --retry 30s +.. code-block:: sh -# specific version -__consul_template \ - --version 0.6.5 \ - --retry 30s --------------------------------------------------------------------------------- + __consul_template \ + --consul consul.service.consul:8500 \ + --retry 30s + + # specific version + __consul_template \ + --version 0.6.5 \ + --retry 30s SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - https://github.com/hashicorp/consul-template diff --git a/cdist/conf/type/__consul_template_template/man.text b/cdist/conf/type/__consul_template_template/man.rst similarity index 59% rename from cdist/conf/type/__consul_template_template/man.text rename to cdist/conf/type/__consul_template_template/man.rst index 159a63fb..20d0a619 100644 --- a/cdist/conf/type/__consul_template_template/man.text +++ b/cdist/conf/type/__consul_template_template/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_template_template(7) ======================================= +Manage consul-template templates + Steven Armstrong -NAME ----- -cdist-type__consul_template_template - manage consul-template templates - - DESCRIPTION ----------- Generate and deploy template definitions for a consul-template. @@ -18,49 +15,52 @@ Either the --source or the --source-file parameter must be given. REQUIRED PARAMETERS ------------------- -destination:: +destination the destination where the generated file should go. OPTIONAL PARAMETERS ------------------- -command:: +command an optional command to run after rendering the template to its destination. -source:: + +source path to the template source. Conflicts --source-file. -source-file:: + +source-file path to a local file which is uploaded using the __file type and configured as the source. If source is '-' (dash), take what was written to stdin as the file content. Conflicts --source. -state:: + +state if this template is 'present' or 'absent'. Defaults to 'present'. EXAMPLES -------- --------------------------------------------------------------------------------- -# configure template on the target -__consul_template_template nginx \ - --source /etc/my-consul-templates/nginx.ctmpl \ - --destination /etc/nginx/nginx.conf \ - --command 'service nginx restart' +.. code-block:: sh + + # configure template on the target + __consul_template_template nginx \ + --source /etc/my-consul-templates/nginx.ctmpl \ + --destination /etc/nginx/nginx.conf \ + --command 'service nginx restart' -# upload a local file to the target and configure it -__consul_template_template nginx \ - --source-file "$__manifest/files/nginx.ctmpl" \ - --destination /etc/nginx/nginx.conf \ - --command 'service nginx restart' --------------------------------------------------------------------------------- + # upload a local file to the target and configure it + __consul_template_template nginx \ + --source-file "$__manifest/files/nginx.ctmpl" \ + --destination /etc/nginx/nginx.conf \ + --command 'service nginx restart' SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_template(7) -- cdist-type__consul_template_config(7) +- `cdist-type(7) `_ +- `cdist-type__consul_template(7) `_ +- `cdist-type__consul_template_config(7) `_ COPYING diff --git a/cdist/conf/type/__consul_watch_checks/man.text b/cdist/conf/type/__consul_watch_checks/man.rst similarity index 62% rename from cdist/conf/type/__consul_watch_checks/man.text rename to cdist/conf/type/__consul_watch_checks/man.rst index 75c42fc2..c1e8c0a7 100644 --- a/cdist/conf/type/__consul_watch_checks/man.text +++ b/cdist/conf/type/__consul_watch_checks/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_watch_checks(7) ================================== +Manages consul checks watches + Steven Armstrong -NAME ----- -cdist-type__consul_watch_checks - manages consul checks watches - - DESCRIPTION ----------- Generate and deploy watch definitions of type 'checks' for a consul agent. @@ -16,45 +13,49 @@ See http://www.consul.io/docs/agent/watches.html for parameter documentation. REQUIRED PARAMETERS ------------------- -handler:: +handler the handler to invoke when the data view updates OPTIONAL PARAMETERS ------------------- -datacenter:: +datacenter can be provided to override the agent's default datacenter -filter-service:: + +filter-service filter to a specific service. Conflicts with --filter-state. -filter-state:: + +filter-state filter to a specific state. Conflicts with --filter-service. -state:: + +state if this watch is 'present' or 'absent'. Defaults to 'present'. -token:: + +token can be provided to override the agent's default ACL token EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_watch_checks some-id \ - --handler /usr/bin/my-handler.sh +.. code-block:: sh -__consul_watch_checks some-id \ - --filter-service consul \ - --handler /usr/bin/my-handler.sh + __consul_watch_checks some-id \ + --handler /usr/bin/my-handler.sh -__consul_watch_checks some-id \ - --filter-state passing \ - --handler /usr/bin/my-handler.sh --------------------------------------------------------------------------------- + __consul_watch_checks some-id \ + --filter-service consul \ + --handler /usr/bin/my-handler.sh + + __consul_watch_checks some-id \ + --filter-state passing \ + --handler /usr/bin/my-handler.sh SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ - http://www.consul.io/docs/agent/watches.html diff --git a/cdist/conf/type/__consul_watch_event/man.text b/cdist/conf/type/__consul_watch_event/man.rst similarity index 65% rename from cdist/conf/type/__consul_watch_event/man.text rename to cdist/conf/type/__consul_watch_event/man.rst index 3b393241..ea9bc61a 100644 --- a/cdist/conf/type/__consul_watch_event/man.text +++ b/cdist/conf/type/__consul_watch_event/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_watch_event(7) ================================= +Manages consul event watches + Steven Armstrong -NAME ----- -cdist-type__consul_watch_event - manages consul event watches - - DESCRIPTION ----------- Generate and deploy watch definitions of type 'event' for a consul agent. @@ -16,39 +13,42 @@ See http://www.consul.io/docs/agent/watches.html for parameter documentation. REQUIRED PARAMETERS ------------------- -handler:: +handler the handler to invoke when the data view updates OPTIONAL PARAMETERS ------------------- -datacenter:: +datacenter can be provided to override the agent's default datacenter -name:: + +name restrict the watch to only events with the given name -state:: + +state if this watch is 'present' or 'absent'. Defaults to 'present'. -token:: + +token can be provided to override the agent's default ACL token EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_watch_event some-id \ - --handler /usr/bin/my-handler.sh +.. code-block:: sh -__consul_watch_event some-id \ - --name web-deploy \ - --handler /usr/bin/my-handler.sh --------------------------------------------------------------------------------- + __consul_watch_event some-id \ + --handler /usr/bin/my-handler.sh + + __consul_watch_event some-id \ + --name web-deploy \ + --handler /usr/bin/my-handler.sh SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ - http://www.consul.io/docs/agent/watches.html diff --git a/cdist/conf/type/__consul_watch_key/man.text b/cdist/conf/type/__consul_watch_key/man.rst similarity index 68% rename from cdist/conf/type/__consul_watch_key/man.text rename to cdist/conf/type/__consul_watch_key/man.rst index 5d8381cb..90e952b8 100644 --- a/cdist/conf/type/__consul_watch_key/man.text +++ b/cdist/conf/type/__consul_watch_key/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_watch_key(7) =============================== +Manages consul key watches + Steven Armstrong -NAME ----- -cdist-type__consul_watch_key - manages consul key watches - - DESCRIPTION ----------- Generate and deploy watch definitions of type 'key' for a consul agent. @@ -16,36 +13,39 @@ See http://www.consul.io/docs/agent/watches.html for parameter documentation. REQUIRED PARAMETERS ------------------- -handler:: +handler the handler to invoke when the data view updates -key:: + +key the key to watch for changes OPTIONAL PARAMETERS ------------------- -datacenter:: +datacenter can be provided to override the agent's default datacenter -state:: + +state if this watch is 'present' or 'absent'. Defaults to 'present'. -token:: + +token can be provided to override the agent's default ACL token EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_watch_key some-id \ - --key foo/bar/baz \ - --handler /usr/bin/my-key-handler.sh --------------------------------------------------------------------------------- +.. code-block:: sh + + __consul_watch_key some-id \ + --key foo/bar/baz \ + --handler /usr/bin/my-key-handler.sh SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ - http://www.consul.io/docs/agent/watches.html diff --git a/cdist/conf/type/__consul_watch_keyprefix/man.text b/cdist/conf/type/__consul_watch_keyprefix/man.rst similarity index 68% rename from cdist/conf/type/__consul_watch_keyprefix/man.text rename to cdist/conf/type/__consul_watch_keyprefix/man.rst index e2f05de2..8ee5822d 100644 --- a/cdist/conf/type/__consul_watch_keyprefix/man.text +++ b/cdist/conf/type/__consul_watch_keyprefix/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_watch_keyprefix(7) ===================================== +Manages consul keyprefix watches + Steven Armstrong -NAME ----- -cdist-type__consul_watch_keyprefix - manages consul keyprefix watches - - DESCRIPTION ----------- Generate and deploy watch definitions of type 'keyprefix' for a consul agent. @@ -16,36 +13,39 @@ See http://www.consul.io/docs/agent/watches.html for parameter documentation. REQUIRED PARAMETERS ------------------- -handler:: +handler the handler to invoke when the data view updates -prefix:: + +prefix the prefix of keys to watch for changes OPTIONAL PARAMETERS ------------------- -datacenter:: +datacenter can be provided to override the agent's default datacenter -state:: + +state if this watch is 'present' or 'absent'. Defaults to 'present'. -token:: + +token can be provided to override the agent's default ACL token EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_watch_keyprefix some-id \ - --prefix foo/ \ - --handler /usr/bin/my-prefix-handler.sh --------------------------------------------------------------------------------- +.. code-block:: sh + + __consul_watch_keyprefix some-id \ + --prefix foo/ \ + --handler /usr/bin/my-prefix-handler.sh SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ - http://www.consul.io/docs/agent/watches.html diff --git a/cdist/conf/type/__consul_watch_nodes/man.text b/cdist/conf/type/__consul_watch_nodes/man.rst similarity index 69% rename from cdist/conf/type/__consul_watch_nodes/man.text rename to cdist/conf/type/__consul_watch_nodes/man.rst index 70b83e92..b5f0a5ce 100644 --- a/cdist/conf/type/__consul_watch_nodes/man.text +++ b/cdist/conf/type/__consul_watch_nodes/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_watch_nodes(7) ================================= +Manages consul nodes watches + Steven Armstrong -NAME ----- -cdist-type__consul_watch_nodes - manages consul nodes watches - - DESCRIPTION ----------- Generate and deploy watch definitions of type 'nodes' for a consul agent. @@ -16,33 +13,35 @@ See http://www.consul.io/docs/agent/watches.html for parameter documentation. REQUIRED PARAMETERS ------------------- -handler:: +handler the handler to invoke when the data view updates OPTIONAL PARAMETERS ------------------- -datacenter:: +datacenter can be provided to override the agent's default datacenter -state:: + +state if this watch is 'present' or 'absent'. Defaults to 'present'. -token:: + +token can be provided to override the agent's default ACL token EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_watch_nodes some-id \ - --handler /usr/bin/my-key-handler.sh --------------------------------------------------------------------------------- +.. code-block:: sh + + __consul_watch_nodes some-id \ + --handler /usr/bin/my-key-handler.sh SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ - http://www.consul.io/docs/agent/watches.html diff --git a/cdist/conf/type/__consul_watch_service/man.text b/cdist/conf/type/__consul_watch_service/man.rst similarity index 60% rename from cdist/conf/type/__consul_watch_service/man.text rename to cdist/conf/type/__consul_watch_service/man.rst index c7731a97..1cc2c00d 100644 --- a/cdist/conf/type/__consul_watch_service/man.text +++ b/cdist/conf/type/__consul_watch_service/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_watch_service(7) =================================== +Manages consul service watches + Steven Armstrong -NAME ----- -cdist-type__consul_watch_service - manages consul service watches - - DESCRIPTION ----------- Generate and deploy watch definitions of type 'service' for a consul agent. @@ -16,55 +13,59 @@ See http://www.consul.io/docs/agent/watches.html for parameter documentation. REQUIRED PARAMETERS ------------------- -handler:: +handler the handler to invoke when the data view updates -service:: + +service the service to watch for changes OPTIONAL PARAMETERS ------------------- -datacenter:: +datacenter can be provided to override the agent's default datacenter -state:: + +state if this watch is 'present' or 'absent'. Defaults to 'present'. -token:: + +token can be provided to override the agent's default ACL token -tag:: + +tag filter by tag BOOLEAN PARAMETERS ------------------ -passingonly:: +passingonly specifies if only hosts passing all checks are displayed EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_watch_service some-id \ - --service consul \ - --handler /usr/bin/my-handler.sh +.. code-block:: sh -__consul_watch_service some-id \ - --service redis \ - --tag production \ - --handler /usr/bin/my-handler.sh + __consul_watch_service some-id \ + --service consul \ + --handler /usr/bin/my-handler.sh -__consul_watch_service some-id \ - --service redis \ - --tag production \ - --passingonly \ - --handler /usr/bin/my-handler.sh --------------------------------------------------------------------------------- + __consul_watch_service some-id \ + --service redis \ + --tag production \ + --handler /usr/bin/my-handler.sh + + __consul_watch_service some-id \ + --service redis \ + --tag production \ + --passingonly \ + --handler /usr/bin/my-handler.sh SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ - http://www.consul.io/docs/agent/watches.html diff --git a/cdist/conf/type/__consul_watch_services/man.text b/cdist/conf/type/__consul_watch_services/man.rst similarity index 68% rename from cdist/conf/type/__consul_watch_services/man.text rename to cdist/conf/type/__consul_watch_services/man.rst index bc489493..bf766222 100644 --- a/cdist/conf/type/__consul_watch_services/man.text +++ b/cdist/conf/type/__consul_watch_services/man.rst @@ -1,13 +1,10 @@ cdist-type__consul_watch_services(7) ==================================== +Manages consul services watches + Steven Armstrong -NAME ----- -cdist-type__consul_watch_services - manages consul services watches - - DESCRIPTION ----------- Generate and deploy watch definitions of type 'services' for a consul agent. @@ -16,33 +13,35 @@ See http://www.consul.io/docs/agent/watches.html for parameter documentation. REQUIRED PARAMETERS ------------------- -handler:: +handler the handler to invoke when the data view updates OPTIONAL PARAMETERS ------------------- -datacenter:: +datacenter can be provided to override the agent's default datacenter -state:: + +state if this watch is 'present' or 'absent'. Defaults to 'present'. -token:: + +token can be provided to override the agent's default ACL token EXAMPLES -------- --------------------------------------------------------------------------------- -__consul_watch_services some-id \ - --handler /usr/bin/my-key-handler.sh --------------------------------------------------------------------------------- +.. code-block:: sh + + __consul_watch_services some-id \ + --handler /usr/bin/my-key-handler.sh SEE ALSO -------- -- cdist-type(7) -- cdist-type__consul_agent(7) +- `cdist-type(7) `_ +- `cdist-type__consul_agent(7) `_ - http://www.consul.io/docs/agent/watches.html diff --git a/cdist/conf/type/__cron/man.text b/cdist/conf/type/__cron/man.rst similarity index 62% rename from cdist/conf/type/__cron/man.text rename to cdist/conf/type/__cron/man.rst index ee30c83f..353f6bae 100644 --- a/cdist/conf/type/__cron/man.text +++ b/cdist/conf/type/__cron/man.rst @@ -1,13 +1,10 @@ cdist-type__cron(7) =================== +Installs and manages cron jobs + Steven Armstrong -NAME ----- -cdist-type__cron - installs and manages cron jobs - - DESCRIPTION ----------- This cdist type allows you to manage entries in a users crontab. @@ -15,33 +12,33 @@ This cdist type allows you to manage entries in a users crontab. REQUIRED PARAMETERS ------------------- -user:: +user The user who's crontab is edited -command:: +command The command to run. OPTIONAL PARAMETERS ------------------- -state:: +state Either present or absent. Defaults to present. -minute:: +minute See crontab(5). Defaults to * -hour:: +hour See crontab(5). Defaults to * -day_of_month:: +day_of_month See crontab(5). Defaults to * -month:: +month See crontab(5). Defaults to * -day_of_week:: +day_of_week See crontab(5). Defaults to * -raw:: +raw Take whatever the user has given instead of time and date fields. If given, all other time and date fields are ignored. Can for example be used to specify cron EXTENSIONS like reboot, yearly etc. See crontab(5) for the extensions if any that your cron implementation implements. -raw_command:: +raw_command Take whatever the user has given in the command and ignore everything else. If given, the command will be added to crontab. Can for example be used to define variables like SHELL or MAILTO. @@ -50,27 +47,27 @@ raw_command:: EXAMPLES -------- --------------------------------------------------------------------------------- -# run Monday to Saturday at 23:15 -__cron some-id --user root --command "/path/to/script" \ - --hour 23 --minute 15 --day_of_week 1-6 +.. code-block:: sh -# run on reboot -__cron some-id --user root --command "/path/to/script" \ - --raw @reboot + # run Monday to Saturday at 23:15 + __cron some-id --user root --command "/path/to/script" \ + --hour 23 --minute 15 --day_of_week 1-6 -# remove cronjob -__cron some-id --user root --command "/path/to/script" --state absent + # run on reboot + __cron some-id --user root --command "/path/to/script" \ + --raw @reboot -# define default shell -__cron some-id --user root --raw_command --command "SHELL=/bin/bash" \ - --state present --------------------------------------------------------------------------------- + # remove cronjob + __cron some-id --user root --command "/path/to/script" --state absent + + # define default shell + __cron some-id --user root --raw_command --command "SHELL=/bin/bash" \ + --state present SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - crontab(5) diff --git a/cdist/conf/type/__debconf_set_selections/man.text b/cdist/conf/type/__debconf_set_selections/man.rst similarity index 52% rename from cdist/conf/type/__debconf_set_selections/man.text rename to cdist/conf/type/__debconf_set_selections/man.rst index e36ebaa3..37aa65b9 100644 --- a/cdist/conf/type/__debconf_set_selections/man.text +++ b/cdist/conf/type/__debconf_set_selections/man.rst @@ -1,13 +1,10 @@ cdist-type__debconf_set_selections(7) ===================================== +Setup debconf selections + Nico Schottelius -NAME ----- -cdist-type__debconf_set_selections - Setup debconf selections - - DESCRIPTION ----------- On Debian and alike systems debconf-set-selections(1) can be used @@ -16,7 +13,7 @@ to setup configuration parameters. REQUIRED PARAMETERS ------------------- -file:: +file Use the given filename as input for debconf-set-selections(1) If filename is "-", read from stdin. @@ -24,23 +21,23 @@ file:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Setup configuration for nslcd -__debconf_set_selections nslcd --file /path/to/file +.. code-block:: sh -# Setup configuration for nslcd from another type -__debconf_set_selections nslcd --file "$__type/files/preseed/nslcd" + # Setup configuration for nslcd + __debconf_set_selections nslcd --file /path/to/file -__debconf_set_selections nslcd --file - << eof -gitolite gitolite/gituser string git -eof --------------------------------------------------------------------------------- + # Setup configuration for nslcd from another type + __debconf_set_selections nslcd --file "$__type/files/preseed/nslcd" + + __debconf_set_selections nslcd --file - << eof + gitolite gitolite/gituser string git + eof SEE ALSO -------- -- cdist-type(7) -- cdist-type__update_alternatives(7) +- `cdist-type(7) `_ +- `cdist-type__update_alternatives(7) `_ - debconf-set-selections(1) diff --git a/cdist/conf/type/__directory/man.text b/cdist/conf/type/__directory/man.rst similarity index 57% rename from cdist/conf/type/__directory/man.text rename to cdist/conf/type/__directory/man.rst index 77d5da34..279763a1 100644 --- a/cdist/conf/type/__directory/man.text +++ b/cdist/conf/type/__directory/man.rst @@ -1,13 +1,10 @@ cdist-type__directory(7) ======================== +Manage a directory + Nico Schottelius -NAME ----- -cdist-type__directory - Manage a directory - - DESCRIPTION ----------- This cdist type allows you to create or remove directories on the target. @@ -20,80 +17,79 @@ None. OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to 'present' -group:: +group Group to chgrp to. -mode:: +mode Unix permissions, suitable for chmod. -owner:: +owner User to chown to. BOOLEAN PARAMETERS ------------------ -parents:: +parents Whether to create parents as well (mkdir -p behaviour). Warning: all intermediate directory permissions default to whatever mkdir -p does. Usually this means root:root, 0700. -recursive:: +recursive If supplied the chgrp and chown call will run recursively. This does *not* influence the behaviour of chmod. MESSAGES -------- -chgrp :: +chgrp Changed group membership -chown :: +chown Changed owner -chmod :: +chmod Changed mode -create:: +create Empty directory was created -remove:: +remove Directory exists, but state is absent, directory will be removed by generated code. -remove non directory:: +remove non directory Something other than a directory with the same name exists and was removed prior to create. EXAMPLES -------- --------------------------------------------------------------------------------- -# A silly example -__directory /tmp/foobar +.. code-block:: sh -# Remove a directory -__directory /tmp/foobar --state absent + # A silly example + __directory /tmp/foobar -# Ensure /etc exists correctly -__directory /etc --owner root --group root --mode 0755 + # Remove a directory + __directory /tmp/foobar --state absent -# Create nfs service directory, including parents -__directory /home/services/nfs --parents + # Ensure /etc exists correctly + __directory /etc --owner root --group root --mode 0755 -# Change permissions recursively -__directory /home/services --recursive --owner root --group root + # Create nfs service directory, including parents + __directory /home/services/nfs --parents -# Setup a temp directory -__directory /local --mode 1777 + # Change permissions recursively + __directory /home/services --recursive --owner root --group root -# Take it all -__directory /home/services/kvm --recursive --parents \ - --owner root --group root --mode 0755 --state present + # Setup a temp directory + __directory /local --mode 1777 --------------------------------------------------------------------------------- + # Take it all + __directory /home/services/kvm --recursive --parents \ + --owner root --group root --mode 0755 --state present SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__dog_vdi/man.text b/cdist/conf/type/__dog_vdi/man.rst similarity index 50% rename from cdist/conf/type/__dog_vdi/man.text rename to cdist/conf/type/__dog_vdi/man.rst index e3453ba7..3e6155a6 100644 --- a/cdist/conf/type/__dog_vdi/man.text +++ b/cdist/conf/type/__dog_vdi/man.rst @@ -1,13 +1,10 @@ cdist-type__dog_vdi(7) ====================== +Manage Sheepdog VM images + Nico Schottelius -NAME ----- -cdist-type__dog_vdi - Manage Sheepdog VM images - - DESCRIPTION ----------- The dog program is used to create images for sheepdog @@ -16,9 +13,9 @@ to be used in qemu. OPTIONAL PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present" -size:: +size Size of the image in "dog vdi" compatible units. Required if state is "present". @@ -28,24 +25,24 @@ size:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Create a 50G size image -__dog_vdi nico-privat.sky.ungleich.ch --size 50G +.. code-block:: sh -# Create a 50G size image (more explicit) -__dog_vdi nico-privat.sky.ungleich.ch --size 50G --state present + # Create a 50G size image + __dog_vdi nico-privat.sky.ungleich.ch --size 50G -# Remove image -__dog_vdi nico-privat.sky.ungleich.ch --state absent + # Create a 50G size image (more explicit) + __dog_vdi nico-privat.sky.ungleich.ch --size 50G --state present -# Remove image - keeping --size is ok -__dog_vdi nico-privat.sky.ungleich.ch --size 50G --state absent --------------------------------------------------------------------------------- + # Remove image + __dog_vdi nico-privat.sky.ungleich.ch --state absent + + # Remove image - keeping --size is ok + __dog_vdi nico-privat.sky.ungleich.ch --size 50G --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - dog(8) - qemu(1) diff --git a/cdist/conf/type/__file/man.rst b/cdist/conf/type/__file/man.rst new file mode 100644 index 00000000..73336581 --- /dev/null +++ b/cdist/conf/type/__file/man.rst @@ -0,0 +1,109 @@ +cdist-type__file(7) +=================== +Manage files. + +Nico Schottelius + + +DESCRIPTION +----------- +This cdist type allows you to create files, remove files and set file +attributes on the target. + +If the file already exists on the target, then if it is a: + +regular file, and state is: + present + replace it with the source file if they are not equal + exists + do nothing +symlink + replace it with the source file +directory + replace it with the source file + +In any case, make sure that the file attributes are as specified. + + +REQUIRED PARAMETERS +------------------- +None. + +OPTIONAL PARAMETERS +------------------- +state + 'present', 'absent' or 'exists', defaults to 'present' where: + + present + the file is exactly the one from source + absent + the file does not exist + exists + the file from source but only if it doesn't already exist + +group + Group to chgrp to. + +mode + Unix permissions, suitable for chmod. + +owner + User to chown to. + +source + If supplied, copy this file from the host running cdist to the target. + If not supplied, an empty file or directory will be created. + If source is '-' (dash), take what was written to stdin as the file content. + +MESSAGES +-------- +chgrp + Changed group membership +chown + Changed owner +chmod + Changed mode +create + Empty file was created (no --source specified) +remove + File exists, but state is absent, file will be removed by generated code. +upload + File was uploaded + + +EXAMPLES +-------- + +.. code-block:: sh + + # Create /etc/cdist-configured as an empty file + __file /etc/cdist-configured + # The same thing + __file /etc/cdist-configured --state present + # Use __file from another type + __file /etc/issue --source "$__type/files/archlinux" --state present + # Delete existing file + __file /etc/cdist-configured --state absent + # Supply some more settings + __file /etc/shadow --source "$__type/files/shadow" \ + --owner root --group shadow --mode 0640 \ + --state present + # Provide a default file, but let the user change it + __file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \ + --state exists \ + --owner frodo --mode 0600 + # Take file content from stdin + __file /tmp/whatever --owner root --group root --mode 644 --source - << DONE + Here goes the content for /tmp/whatever + DONE + + +SEE ALSO +-------- +* `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__file/man.text b/cdist/conf/type/__file/man.text deleted file mode 100644 index a582b27b..00000000 --- a/cdist/conf/type/__file/man.text +++ /dev/null @@ -1,109 +0,0 @@ -cdist-type__file(7) -=================== -Nico Schottelius - - -NAME ----- -cdist-type__file - Manage files - - -DESCRIPTION ------------ -This cdist type allows you to create files, remove files and set file -attributes on the target. - -If the file already exists on the target, then if it is a: -- regular file, and state is: - present: replace it with the source file if they are not equal - exists: do nothing -- symlink: replace it with the source file -- directory: replace it with the source file - -In any case, make sure that the file attributes are as specified. - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -state:: - 'present', 'absent' or 'exists', defaults to 'present' - where: - present: the file is exactly the one from source - absent: the file does not exist - exists: the file from source but only if it doesn't already exist - -group:: - Group to chgrp to. - -mode:: - Unix permissions, suitable for chmod. - -owner:: - User to chown to. - -source:: - If supplied, copy this file from the host running cdist to the target. - If not supplied, an empty file or directory will be created. - If source is '-' (dash), take what was written to stdin as the file content. - -MESSAGES --------- -chgrp :: - Changed group membership -chown :: - Changed owner -chmod :: - Changed mode -create:: - Empty file was created (no --source specified) -remove:: - File exists, but state is absent, file will be removed by generated code. -upload:: - File was uploaded - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Create /etc/cdist-configured as an empty file -__file /etc/cdist-configured -# The same thing -__file /etc/cdist-configured --state present -# Delete existing file -__file /etc/cdist-configured --state absent - -# Use __file from another type -__file /etc/issue --source "$__type/files/archlinux" --state present - -# Supply some more settings -__file /etc/shadow --source "$__type/files/shadow" \ - --owner root --group shadow --mode 0640 \ - --state present - -# Provide a default file, but let the user change it -__file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \ - --state exists \ - --owner frodo --mode 0600 - -# Take file content from stdin -__file /tmp/whatever --owner root --group root --mode 644 --source - << DONE -Here goes the content for /tmp/whatever -DONE - --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -COPYING -------- -Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__firewalld_rule/man.rst b/cdist/conf/type/__firewalld_rule/man.rst new file mode 100644 index 00000000..d953b3d2 --- /dev/null +++ b/cdist/conf/type/__firewalld_rule/man.rst @@ -0,0 +1,75 @@ +cdist-type__firewalld_rule(7) +============================= +Configure firewalld rules + +Nico Schottelius + + +DESCRIPTION +----------- +This cdist type allows you to manage rules in firewalld +using the *direct* way (i.e. no zone support). + + +REQUIRED PARAMETERS +------------------- +rule + The rule to apply. Essentially an firewalld command + line without firewalld in front of it. +protocol + Either ipv4, ipv4 or eb. See firewall-cmd(1) +table + The table to use (like filter or nat). See firewall-cmd(1). +chain + The chain to use (like INPUT_direct or FORWARD_direct). See firewall-cmd(1). +priority + The priority to use (0 is topmost). See firewall-cmd(1). + + +OPTIONAL PARAMETERS +------------------- +state + 'present' or 'absent', defaults to 'present' + + +EXAMPLES +-------- + +.. code-block:: sh + + # Allow acces from entrance.place4.ungleich.ch + __firewalld_rule entrance \ + --protocol ipv4 \ + --table filter \ + --chain INPUT_direct \ + --priority 0 \ + --rule '-s entrance.place4.ungleich.ch -j ACCEPT' + + # Allow forwarding of traffic from br0 + __firewalld_rule vm-forward --protocol ipv4 \ + --table filter \ + --chain FORWARD_direct \ + --priority 0 \ + --rule '-i br0 -j ACCEPT' + + # Ensure old rule is absent - warning, the rule part must stay the same! + __firewalld_rule vm-forward + --protocol ipv4 \ + --table filter \ + --chain FORWARD_direct \ + --priority 0 \ + --rule '-i br0 -j ACCEPT' \ + --state absent + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__iptables_rule(7) `_ +- firewalld(8) + + +COPYING +------- +Copyright \(C) 2015 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__firewalld_rule/man.text b/cdist/conf/type/__firewalld_rule/man.text deleted file mode 100644 index 17296a25..00000000 --- a/cdist/conf/type/__firewalld_rule/man.text +++ /dev/null @@ -1,78 +0,0 @@ -cdist-type__firewalld_rule(7) -============================= -Nico Schottelius - - -NAME ----- -cdist-type__firewalld_rule - Configure firewalld rules - - -DESCRIPTION ------------ -This cdist type allows you to manage rules in firewalld -using the *direct* way (i.e. no zone support). - - -REQUIRED PARAMETERS -------------------- -rule:: - The rule to apply. Essentially an firewalld command - line without firewalld in front of it. -protocol:: - Either ipv4, ipv4 or eb. See firewall-cmd(1) -table:: - The table to use (like filter or nat). See firewall-cmd(1). -chain:: - The chain to use (like INPUT_direct or FORWARD_direct). See firewall-cmd(1). -priority:: - The priority to use (0 is topmost). See firewall-cmd(1). - - -OPTIONAL PARAMETERS -------------------- -state:: - 'present' or 'absent', defaults to 'present' - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Allow acces from entrance.place4.ungleich.ch -__firewalld_rule entrance \ - --protocol ipv4 \ - --table filter \ - --chain INPUT_direct \ - --priority 0 \ - --rule '-s entrance.place4.ungleich.ch -j ACCEPT' - -# Allow forwarding of traffic from br0 -__firewalld_rule vm-forward --protocol ipv4 \ - --table filter \ - --chain FORWARD_direct \ - --priority 0 \ - --rule '-i br0 -j ACCEPT' - -# Ensure old rule is absent - warning, the rule part must stay the same! -__firewalld_rule vm-forward - --protocol ipv4 \ - --table filter \ - --chain FORWARD_direct \ - --priority 0 \ - --rule '-i br0 -j ACCEPT' \ - --state absent --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__iptables_rule(7) -- firewalld(8) - - -COPYING -------- -Copyright \(C) 2015 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__git/man.text b/cdist/conf/type/__git/man.rst similarity index 60% rename from cdist/conf/type/__git/man.text rename to cdist/conf/type/__git/man.rst index 5f74108b..75f6e48b 100644 --- a/cdist/conf/type/__git/man.text +++ b/cdist/conf/type/__git/man.rst @@ -1,13 +1,10 @@ cdist-type__git(7) ================== +Get and or keep git repositories up-to-date + Nico Schottelius -NAME ----- -cdist-type__git - Get and or keep git repositories up-to-date - - DESCRIPTION ----------- This cdist type allows you to clone git repositories @@ -15,43 +12,43 @@ This cdist type allows you to clone git repositories REQUIRED PARAMETERS ------------------- -source:: +source Specifies the git remote to clone from OPTIONAL PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present" -branch:: +branch Create this branch by checking out the remote branch of this name Default branch is "master" -group:: +group Group to chgrp to. -mode:: +mode Unix permissions, suitable for chmod. -owner:: +owner User to chown to. EXAMPLES -------- --------------------------------------------------------------------------------- -__git /home/services/dokuwiki --source git://github.com/splitbrain/dokuwiki.git +.. code-block:: sh -# Checkout cdist, stay on branch 2.1 -__git /home/nico/cdist --source git://github.com/telmich/cdist.git --branch 2.1 --------------------------------------------------------------------------------- + __git /home/services/dokuwiki --source git://github.com/splitbrain/dokuwiki.git + + # Checkout cdist, stay on branch 2.1 + __git /home/nico/cdist --source git://github.com/telmich/cdist.git --branch 2.1 SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__group/man.text b/cdist/conf/type/__group/man.rst similarity index 53% rename from cdist/conf/type/__group/man.text rename to cdist/conf/type/__group/man.rst index 8a441923..912dd226 100644 --- a/cdist/conf/type/__group/man.text +++ b/cdist/conf/type/__group/man.rst @@ -1,13 +1,10 @@ cdist-type__group(7) ==================== +Manage groups + Steven Armstrong -NAME ----- -cdist-type__group - Manage groups - - DESCRIPTION ----------- This cdist type allows you to create or modify groups on the target. @@ -20,58 +17,58 @@ None. OPTIONAL PARAMETERS ------------------- -state:: +state absent or present, defaults to present -gid:: +gid see groupmod(8) -password:: +password see above BOOLEAN PARAMETERS ------------------ -system:: +system see groupadd(8), apply only on group creation MESSAGES -------- -mod:: +mod group is modified -add:: +add New group added -remove:: +remove group is removed -change :: +change Changed group property from current_value to new_value -set :: +set set property to new value, property was not set before EXAMPLES -------- --------------------------------------------------------------------------------- -# Create a group 'foobar' with operating system default settings -__group foobar +.. code-block:: sh -# Remove the 'foobar' group -__group foobar --state absent + # Create a group 'foobar' with operating system default settings + __group foobar -# Create a system group 'myservice' with operating system default settings -__group myservice --system + # Remove the 'foobar' group + __group foobar --state absent -# Same but with a specific gid -__group foobar --gid 1234 + # Create a system group 'myservice' with operating system default settings + __group myservice --system -# Same but with a gid and password -__group foobar --gid 1234 --password 'crypted-password-string' --------------------------------------------------------------------------------- + # Same but with a specific gid + __group foobar --gid 1234 + + # Same but with a gid and password + __group foobar --gid 1234 --password 'crypted-password-string' SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__hostname/man.text b/cdist/conf/type/__hostname/man.rst similarity index 63% rename from cdist/conf/type/__hostname/man.text rename to cdist/conf/type/__hostname/man.rst index ac44d426..32d452f7 100644 --- a/cdist/conf/type/__hostname/man.text +++ b/cdist/conf/type/__hostname/man.rst @@ -1,13 +1,10 @@ cdist-type__hostname(7) ======================= +Set the hostname + Steven Armstrong -NAME ----- -cdist-type__hostname - set the hostname - - DESCRIPTION ----------- Set's the hostname on various operating systems. @@ -19,31 +16,31 @@ None. OPTIONAL PARAMETERS ------------------- -name:: +name The hostname to set. Defaults to the first segment of __target_host (${__target_host%%.*}) MESSAGES -------- -changed:: +changed Changed the hostname EXAMPLES -------- --------------------------------------------------------------------------------- -# take hostname from __target_host -__hostname +.. code-block:: sh -# set hostname explicitly -__hostname --name some-static-hostname --------------------------------------------------------------------------------- + # take hostname from __target_host + __hostname + + # set hostname explicitly + __hostname --name some-static-hostname SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__iptables_apply/man.text b/cdist/conf/type/__iptables_apply/man.rst similarity index 83% rename from cdist/conf/type/__iptables_apply/man.text rename to cdist/conf/type/__iptables_apply/man.rst index 87f4b4ee..40605351 100644 --- a/cdist/conf/type/__iptables_apply/man.text +++ b/cdist/conf/type/__iptables_apply/man.rst @@ -1,13 +1,10 @@ cdist-type__iptables_apply(7) ============================= +Apply the rules + Nico Schottelius -NAME ----- -cdist-type__iptables_apply - Apply the rules - - DESCRIPTION ----------- This cdist type deploys an init script that triggers @@ -31,8 +28,8 @@ None (__iptables_apply is used by __iptables_rule) SEE ALSO -------- -- cdist-type(7) -- cdist-type__iptables_rule(7) +- `cdist-type(7) `_ +- `cdist-type__iptables_rule(7) `_ - iptables(8) diff --git a/cdist/conf/type/__iptables_rule/man.rst b/cdist/conf/type/__iptables_rule/man.rst new file mode 100644 index 00000000..5ee02f9c --- /dev/null +++ b/cdist/conf/type/__iptables_rule/man.rst @@ -0,0 +1,60 @@ +cdist-type__iptables_rule(7) +============================ +Deploy iptable rulesets + +Nico Schottelius + + +DESCRIPTION +----------- +This cdist type allows you to manage iptable rules +in a distribution independent manner. + + +REQUIRED PARAMETERS +------------------- +rule + The rule to apply. Essentially an iptables command + line without iptables in front of it. + + +OPTIONAL PARAMETERS +------------------- +state + 'present' or 'absent', defaults to 'present' + + +EXAMPLES +-------- + +.. code-block:: sh + + # Deploy some policies + __iptables_rule policy-in --rule "-P INPUT DROP" + __iptables_rule policy-out --rule "-P OUTPUT ACCEPT" + __iptables_rule policy-fwd --rule "-P FORWARD DROP" + + # The usual established rule + __iptables_rule established --rule "-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT" + + # Some service rules + __iptables_rule http --rule "-A INPUT -p tcp --dport 80 -j ACCEPT" + __iptables_rule ssh --rule "-A INPUT -p tcp --dport 22 -j ACCEPT" + __iptables_rule https --rule "-A INPUT -p tcp --dport 443 -j ACCEPT" + + # Ensure some rules are not present anymore + __iptables_rule munin --rule "-A INPUT -p tcp --dport 4949 -j ACCEPT" \ + --state absent + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__iptables_apply(7) `_ +- iptables(8) + + +COPYING +------- +Copyright \(C) 2013 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__iptables_rule/man.text b/cdist/conf/type/__iptables_rule/man.text deleted file mode 100644 index 2f5b9785..00000000 --- a/cdist/conf/type/__iptables_rule/man.text +++ /dev/null @@ -1,64 +0,0 @@ -cdist-type__iptables_rule(7) -============================ -Nico Schottelius - - -NAME ----- -cdist-type__iptables_rule - Deploy iptable rulesets - - -DESCRIPTION ------------ -This cdist type allows you to manage iptable rules -in a distribution independent manner. - - -REQUIRED PARAMETERS -------------------- -rule:: - The rule to apply. Essentially an iptables command - line without iptables in front of it. - - -OPTIONAL PARAMETERS -------------------- -state:: - 'present' or 'absent', defaults to 'present' - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Deploy some policies -__iptables_rule policy-in --rule "-P INPUT DROP" -__iptables_rule policy-out --rule "-P OUTPUT ACCEPT" -__iptables_rule policy-fwd --rule "-P FORWARD DROP" - -# The usual established rule -__iptables_rule established --rule "-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT" - -# Some service rules -__iptables_rule http --rule "-A INPUT -p tcp --dport 80 -j ACCEPT" -__iptables_rule ssh --rule "-A INPUT -p tcp --dport 22 -j ACCEPT" -__iptables_rule https --rule "-A INPUT -p tcp --dport 443 -j ACCEPT" - -# Ensure some rules are not present anymore -__iptables_rule munin --rule "-A INPUT -p tcp --dport 4949 -j ACCEPT" \ - --state absent - --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__iptables_apply(7) -- iptables(8) - - -COPYING -------- -Copyright \(C) 2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__issue/man.text b/cdist/conf/type/__issue/man.rst similarity index 62% rename from cdist/conf/type/__issue/man.text rename to cdist/conf/type/__issue/man.rst index 40ed920e..4a6c1f8d 100644 --- a/cdist/conf/type/__issue/man.text +++ b/cdist/conf/type/__issue/man.rst @@ -1,13 +1,10 @@ cdist-type__issue(7) ==================== +Manage issue + Nico Schottelius -NAME ----- -cdist-type__issue - Manage issue - - DESCRIPTION ----------- This cdist type allows you to easily setup /etc/issue. @@ -20,7 +17,7 @@ None. OPTIONAL PARAMETERS ------------------- -source:: +source If supplied, use this file as /etc/issue instead of default. @@ -28,17 +25,17 @@ source:: EXAMPLES -------- --------------------------------------------------------------------------------- -__issue +.. code-block:: sh -# When called from another type -__issue --source "$__type/files/myfancyissue" --------------------------------------------------------------------------------- + __issue + + # When called from another type + __issue --source "$__type/files/myfancyissue" SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__jail/man.text b/cdist/conf/type/__jail/man.rst similarity index 64% rename from cdist/conf/type/__jail/man.text rename to cdist/conf/type/__jail/man.rst index be27e909..38ec4f96 100644 --- a/cdist/conf/type/__jail/man.text +++ b/cdist/conf/type/__jail/man.rst @@ -1,13 +1,10 @@ cdist-type__jail(7) =================== +Manage FreeBSD jails + Jake Guffey -NAME ----- -cdist-type__jail - Manage FreeBSD jails - - DESCRIPTION ----------- This type is used on FreeBSD to manage jails. @@ -15,47 +12,47 @@ This type is used on FreeBSD to manage jails. REQUIRED PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present". -jailbase:: +jailbase The location of the .tgz archive containing the base fs for your jails. OPTIONAL PARAMETERS ------------------- -name:: +name The name of the jail. Default is to use the object_id as the jail name. -ip:: +ip The ifconfig style IP/netmask combination to use for the jail guest. If the state parameter is "present," this parameter is required. -hostname:: +hostname The FQDN to use for the jail guest. Defaults to the name parameter. -interface:: +interface The name of the physical interface on the jail server to bind the jail to. Defaults to the first interface found in the output of ifconfig -l. -devfs-ruleset:: +devfs-ruleset The name of the devfs ruleset to associate with the jail. Defaults to "jailrules." This ruleset must be copied to the server via another type. To use this option, devfs-enable must be "true." -jaildir:: +jaildir The location on the remote server to use for hosting jail filesystems. Defaults to /usr/jail. BOOLEAN PARAMETERS ------------------ -stopped:: +stopped Do not start the jail -devfs-disable:: +devfs-disable Whether to disallow devfs mounting within the jail -onboot:: +onboot Whether to add the jail to rc.conf's jail_list variable. @@ -69,48 +66,48 @@ means. MESSAGES -------- -start:: +start The jail was started -stop:: +stop The jail was stopped create: The jail was created -delete:: +delete The jail was deleted -onboot:: +onboot The jail was configured to start on boot EXAMPLES -------- --------------------------------------------------------------------------------- -# Create a jail called www -__jail www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz +.. code-block:: sh -# Remove the jail called www -__jail www --state absent --jailbase /my/jail/base.tgz + # Create a jail called www + __jail www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz -# The jail www should not be started -__jail www --state present --stopped \ - --ip "192.168.1.2 netmask 255.255.255.0" \ - --jailbase /my/jail/base.tgz + # Remove the jail called www + __jail www --state absent --jailbase /my/jail/base.tgz -# Use the name variable explicitly -__jail thisjail --state present --name www \ - --ip "192.168.1.2" \ - --jailbase /my/jail/base.tgz + # The jail www should not be started + __jail www --state present --stopped \ + --ip "192.168.1.2 netmask 255.255.255.0" \ + --jailbase /my/jail/base.tgz -# Go nuts -__jail lotsofoptions --state present --name testjail \ - --ip "192.168.1.100 netmask 255.255.255.0" \ - --hostname "testjail.example.com" --interface "em0" \ - --onboot --jailbase /my/jail/base.tgz --jaildir /jails --------------------------------------------------------------------------------- + # Use the name variable explicitly + __jail thisjail --state present --name www \ + --ip "192.168.1.2" \ + --jailbase /my/jail/base.tgz + + # Go nuts + __jail lotsofoptions --state present --name testjail \ + --ip "192.168.1.100 netmask 255.255.255.0" \ + --hostname "testjail.example.com" --interface "em0" \ + --onboot --jailbase /my/jail/base.tgz --jaildir /jails SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__key_value/man.text b/cdist/conf/type/__key_value/man.rst similarity index 64% rename from cdist/conf/type/__key_value/man.text rename to cdist/conf/type/__key_value/man.rst index c27931e5..4b259c75 100644 --- a/cdist/conf/type/__key_value/man.text +++ b/cdist/conf/type/__key_value/man.rst @@ -1,13 +1,10 @@ cdist-type__key_value(7) ======================== +Change property values in files + Steven Armstrong -NAME ----- -cdist-type__key_value - Change property values in files - - DESCRIPTION ----------- This cdist type allows you to change values in a key value based config @@ -16,22 +13,22 @@ file. REQUIRED PARAMETERS ------------------- -file:: +file The file to operate on. -delimiter:: +delimiter The delimiter which separates the key from the value. OPTIONAL PARAMETERS ------------------- -state:: +state present or absent, defaults to present. If present, sets the key to value, if absent, removes the key from the file. -key:: +key The key to change. Defaults to object_id. -value:: +value The value for the key. Optional if state=absent, required otherwise. -comment:: +comment If supplied, the value will be inserted before the line with the key, but only if the key or value must be changed. You need to ensure yourself that the line is prefixed with the correct @@ -40,41 +37,41 @@ comment:: BOOLEAN PARAMETERS ------------------ -exact_delimiter:: +exact_delimiter If supplied, treat additional whitespaces between key, delimiter and value as wrong value. MESSAGES -------- -remove:: +remove Removed existing key and value -insert:: +insert Added key and value -change:: +change Changed value of existing key -create:: +create A new line was inserted in a new file EXAMPLES -------- --------------------------------------------------------------------------------- -# Set the maximum system user id -__key_value SYS_UID_MAX --file /etc/login.defs --value 666 --delimiter ' ' +.. code-block:: sh -# Same with fancy id -__key_value my-fancy-id --file /etc/login.defs --key SYS_UID_MAX --value 666 \ - --delimiter ' ' + # Set the maximum system user id + __key_value SYS_UID_MAX --file /etc/login.defs --value 666 --delimiter ' ' -# Enable packet forwarding -__key_value net.ipv4.ip_forward --file /etc/sysctl.conf --value 1 \ - --delimiter ' = ' --comment '# my linux kernel should act as a router' + # Same with fancy id + __key_value my-fancy-id --file /etc/login.defs --key SYS_UID_MAX --value 666 \ + --delimiter ' ' -# Remove existing key/value -__key_value LEGACY_KEY --file /etc/somefile --state absent --delimiter '=' --------------------------------------------------------------------------------- + # Enable packet forwarding + __key_value net.ipv4.ip_forward --file /etc/sysctl.conf --value 1 \ + --delimiter ' = ' --comment '# my linux kernel should act as a router' + + # Remove existing key/value + __key_value LEGACY_KEY --file /etc/somefile --state absent --delimiter '=' MORE INFORMATION @@ -85,7 +82,7 @@ So you need to exactly specify the key and delimiter. Delimiter can be of any le SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__line/man.text b/cdist/conf/type/__line/man.rst similarity index 59% rename from cdist/conf/type/__line/man.text rename to cdist/conf/type/__line/man.rst index f39ee929..f6d71a5a 100644 --- a/cdist/conf/type/__line/man.text +++ b/cdist/conf/type/__line/man.rst @@ -1,13 +1,10 @@ cdist-type__line(7) =================== +Manage lines in files + Nico Schottelius -NAME ----- -cdist-type__line - Manage lines in files - - DESCRIPTION ----------- This cdist type allows you to add lines and remove lines from files. @@ -18,16 +15,16 @@ REQUIRED PARAMETERS OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to 'present' -line:: +line Specifies the line which should be absent or present Must be present, if state is present. Must not be combined with regex, if state is absent. -regex:: +regex If state is present, search for this pattern and add given line, if the given regular expression does not match. @@ -38,7 +35,7 @@ regex:: Must not be combined with line, if state is absent. -file:: +file If supplied, use this as the destination file. Otherwise the object_id is used. @@ -46,24 +43,24 @@ file:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Manage the DAEMONS line in rc.conf -__line daemons --file /etc/rc.conf --line 'DAEMONS=(hwclock !network sshd crond postfix)' +.. code-block:: sh -# Ensure the home mount is present in /etc/fstab - explicitly make it present -__line home-fstab \ - --file /etc/fstab \ - --line 'filer.fs:/vol/home /home nfs defaults 0 0' \ - --state present + # Manage the DAEMONS line in rc.conf + __line daemons --file /etc/rc.conf --line 'DAEMONS=(hwclock !network sshd crond postfix)' -# Removes the line specifiend in "include_www" from the file "lighttpd.conf" -__line legacy_timezone --file /etc/rc.conf --regex 'TIMEZONE=.*' --state absent --------------------------------------------------------------------------------- + # Ensure the home mount is present in /etc/fstab - explicitly make it present + __line home-fstab \ + --file /etc/fstab \ + --line 'filer.fs:/vol/home /home nfs defaults 0 0' \ + --state present + + # Removes the line specifiend in "include_www" from the file "lighttpd.conf" + __line legacy_timezone --file /etc/rc.conf --regex 'TIMEZONE=.*' --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - grep(1) diff --git a/cdist/conf/type/__link/man.text b/cdist/conf/type/__link/man.rst similarity index 51% rename from cdist/conf/type/__link/man.text rename to cdist/conf/type/__link/man.rst index 663087db..654b097b 100644 --- a/cdist/conf/type/__link/man.text +++ b/cdist/conf/type/__link/man.rst @@ -1,13 +1,10 @@ cdist-type__link(7) =================== +Manage links (hard and symbolic) + Nico Schottelius -NAME ----- -cdist-type__link - Manage links (hard and symbolic) - - DESCRIPTION ----------- This cdist type allows you to manage hard and symbolic links. @@ -16,42 +13,42 @@ The given object id is the destination for the link. REQUIRED PARAMETERS ------------------- -source:: +source Specifies the link source. -type:: +type Specifies the link type: Either hard or symoblic. OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to 'present' EXAMPLES -------- --------------------------------------------------------------------------------- -# Create hard link of /etc/shadow -__link /root/shadow --source /etc/shadow --type hard +.. code-block:: sh -# Relative symbolic link -__link /etc/apache2/sites-enabled/www.test.ch \ - --source ../sites-available/www.test.ch \ - --type symbolic + # Create hard link of /etc/shadow + __link /root/shadow --source /etc/shadow --type hard -# Absolute symbolic link -__link /opt/plone --source /home/services/plone --type symbolic + # Relative symbolic link + __link /etc/apache2/sites-enabled/www.test.ch \ + --source ../sites-available/www.test.ch \ + --type symbolic -# Remove link -__link /opt/plone --state absent --------------------------------------------------------------------------------- + # Absolute symbolic link + __link /opt/plone --source /home/services/plone --type symbolic + + # Remove link + __link /opt/plone --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__locale/man.text b/cdist/conf/type/__locale/man.rst similarity index 53% rename from cdist/conf/type/__locale/man.text rename to cdist/conf/type/__locale/man.rst index 5ccd3eab..df337739 100644 --- a/cdist/conf/type/__locale/man.text +++ b/cdist/conf/type/__locale/man.rst @@ -1,13 +1,10 @@ cdist-type__locale(7) ===================== +Configure locales + Nico Schottelius -NAME ----- -cdist-type__locale - Configure locales - - DESCRIPTION ----------- This cdist type allows you to setup locales. @@ -15,30 +12,30 @@ This cdist type allows you to setup locales. OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to present EXAMPLES -------- --------------------------------------------------------------------------------- -# Add locale de_CH.UTF-8 -__locale de_CH.UTF-8 +.. code-block:: sh -# Same as above, but more explicit -__locale de_CH.UTF-8 --state present + # Add locale de_CH.UTF-8 + __locale de_CH.UTF-8 -# Remove colourful British English -__locale en_GB.UTF-8 --state absent --------------------------------------------------------------------------------- + # Same as above, but more explicit + __locale de_CH.UTF-8 --state present + + # Remove colourful British English + __locale en_GB.UTF-8 --state absent SEE ALSO -------- - locale(1) - localedef(1) -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__motd/man.text b/cdist/conf/type/__motd/man.rst similarity index 63% rename from cdist/conf/type/__motd/man.text rename to cdist/conf/type/__motd/man.rst index a4ca80b5..988e2d02 100644 --- a/cdist/conf/type/__motd/man.text +++ b/cdist/conf/type/__motd/man.rst @@ -1,13 +1,10 @@ cdist-type__motd(7) =================== +Manage message of the day + Nico Schottelius -NAME ----- -cdist-type__motd - Manage message of the day - - DESCRIPTION ----------- This cdist type allows you to easily setup /etc/motd. @@ -20,7 +17,7 @@ None. OPTIONAL PARAMETERS ------------------- -source:: +source If supplied, copy this file from the host running cdist to the target. If not supplied, a default message will be placed onto the target. @@ -28,18 +25,18 @@ source:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Use cdist defaults -__motd +.. code-block:: sh -# Supply source file from a different type -__motd --source "$__type/files/my-motd" --------------------------------------------------------------------------------- + # Use cdist defaults + __motd + + # Supply source file from a different type + __motd --source "$__type/files/my-motd" SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__mount/man.text b/cdist/conf/type/__mount/man.rst similarity index 66% rename from cdist/conf/type/__mount/man.text rename to cdist/conf/type/__mount/man.rst index 7299bdf3..696dfbd4 100644 --- a/cdist/conf/type/__mount/man.text +++ b/cdist/conf/type/__mount/man.rst @@ -1,13 +1,10 @@ cdist-type__mount(7) ==================== +Manage filesystem mounts + Steven Armstrong -NAME ----- -cdist-type__mount - manage filesystem mounts - - DESCRIPTION ----------- Manage filesystem mounts either via /etc/fstab or manually. @@ -20,62 +17,62 @@ None. OPTIONAL PARAMETERS ------------------- -device:: +device device to mount at path, defaults to 'none'. see mount(8) -dump:: +dump value for the dump field in fstab. see fstab(5) defaults to 0. This parameter is ignored, if the nofstab parameter is given. -options:: +options comma separated string of options, see mount(8) -pass:: +pass value for the pass field in fstab. see fstab(5) defaults to 0. This parameter is ignored, if the nofstab parameter is given. -path:: +path mount point where to mount the device, see mount(8). Defaults to __object_id -state:: +state either present or absent. Defaults to present. -type:: +type vfstype, see mount(8) BOOLEAN PARAMETERS ------------------ -nofstab:: +nofstab do not manage an entry in /etc/fstab EXAMPLES -------- --------------------------------------------------------------------------------- -__mount /some/dir \ - --device /dev/sdc3 \ - --type xfs \ - --options "defaults,ro" - --dump 0 \ - --pass 1 +.. code-block:: sh -__mount /var/lib/one \ - --device mfsmount \ - --type fuse \ - --options "mfsmaster=mfsmaster.domain.tld,mfssubfolder=/one,nonempty,_netdev" --------------------------------------------------------------------------------- + __mount /some/dir \ + --device /dev/sdc3 \ + --type xfs \ + --options "defaults,ro" + --dump 0 \ + --pass 1 + + __mount /var/lib/one \ + --device mfsmount \ + --type fuse \ + --options "mfsmaster=mfsmaster.domain.tld,mfssubfolder=/one,nonempty,_netdev" SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__mysql_database/man.text b/cdist/conf/type/__mysql_database/man.rst similarity index 65% rename from cdist/conf/type/__mysql_database/man.text rename to cdist/conf/type/__mysql_database/man.rst index f184a30e..88f1eecd 100644 --- a/cdist/conf/type/__mysql_database/man.text +++ b/cdist/conf/type/__mysql_database/man.rst @@ -1,13 +1,10 @@ cdist-type__mysql_database(7) ============================= +Manage a MySQL database + Benedikt Koeppel -NAME ----- -cdist-type__mysql_database - Manage a MySQL database - - DESCRIPTION ----------- This cdist type allows you to install a MySQL database. @@ -19,28 +16,28 @@ None. OPTIONAL PARAMETERS ------------------- -name:: +name The name of the database to install defaults to the object id -user:: +user A user that should have access to the database -password:: +password The password for the user who manages the database EXAMPLES -------- --------------------------------------------------------------------------------- -__mysql_database "cdist" --name "cdist" --user "myuser" --password "mypwd" --------------------------------------------------------------------------------- +.. code-block:: sh + + __mysql_database "cdist" --name "cdist" --user "myuser" --password "mypwd" SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__package/man.text b/cdist/conf/type/__package/man.rst similarity index 61% rename from cdist/conf/type/__package/man.text rename to cdist/conf/type/__package/man.rst index 90d71e02..1ada06a7 100644 --- a/cdist/conf/type/__package/man.text +++ b/cdist/conf/type/__package/man.rst @@ -1,13 +1,10 @@ cdist-type__package(7) ====================== +Manage packages + Steven Armstrong -NAME ----- -cdist-type__package - Manage packages - - DESCRIPTION ----------- This cdist type allows you to install or uninstall packages on the target. @@ -21,40 +18,41 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name The name of the package to install. Default is to use the object_id as the package name. -version:: +version The version of the package to install. Default is to install the version chosen by the local package manager. -type:: +type The package type to use. Default is determined based on the $os explorer variable. - e.g. __package_apt for Debian - __package_emerge for Gentoo + e.g. + * __package_apt for Debian + * __package_emerge for Gentoo -state:: +state Either "present" or "absent", defaults to "present" EXAMPLES -------- --------------------------------------------------------------------------------- -# Install the package vim on the target -__package vim --state present +.. code-block:: sh -# Same but install specific version -__package vim --state present --version 7.3.50 + # Install the package vim on the target + __package vim --state present -# Force use of a specific package type -__package vim --state present --type __package_apt --------------------------------------------------------------------------------- + # Same but install specific version + __package vim --state present --version 7.3.50 + + # Force use of a specific package type + __package vim --state present --type __package_apt SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__package_apt/man.text b/cdist/conf/type/__package_apt/man.rst similarity index 58% rename from cdist/conf/type/__package_apt/man.text rename to cdist/conf/type/__package_apt/man.rst index c1f8ee1f..ec28c0cc 100644 --- a/cdist/conf/type/__package_apt/man.text +++ b/cdist/conf/type/__package_apt/man.rst @@ -1,13 +1,10 @@ cdist-type__package_apt(7) ========================== +Manage packages with apt-get + Nico Schottelius -NAME ----- -cdist-type__package_apt - Manage packages with apt-get - - DESCRIPTION ----------- apt-get is usually used on Debian and variants (like Ubuntu) to @@ -21,35 +18,35 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present" -target-release:: +target-release Passed on to apt-get install, see apt-get(8). Essentially allows you to retrieve packages from a different release EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure zsh in installed -__package_apt zsh --state present +.. code-block:: sh -# In case you only want *a* webserver, but don't care which one -__package_apt webserver --state present --name nginx + # Ensure zsh in installed + __package_apt zsh --state present -# Remove obsolete package -__package_apt puppet --state absent --------------------------------------------------------------------------------- + # In case you only want *a* webserver, but don't care which one + __package_apt webserver --state present --name nginx + + # Remove obsolete package + __package_apt puppet --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_emerge/man.text b/cdist/conf/type/__package_emerge/man.rst similarity index 58% rename from cdist/conf/type/__package_emerge/man.text rename to cdist/conf/type/__package_emerge/man.rst index 983b49a8..fe06031e 100644 --- a/cdist/conf/type/__package_emerge/man.text +++ b/cdist/conf/type/__package_emerge/man.rst @@ -1,13 +1,10 @@ cdist-type__package_emerge(7) ============================= +Manage packages with portage + Thomas Oettli -NAME ----- -cdist-type__package_emerge - Manage packages with portage - - DESCRIPTION ----------- Portage is usually used on the gentoo distribution to manage packages. @@ -23,35 +20,35 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present". -version:: +version If supplied, use to install or uninstall a specific version of the package named. EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure sys-devel/gcc is installed -__package_emerge sys-devel/gcc --state present +.. code-block:: sh -# If you want a specific version of a package -__package_emerge app-portage/gentoolkit --state present --version 0.3.0.8-r2 + # Ensure sys-devel/gcc is installed + __package_emerge sys-devel/gcc --state present -# Remove package -__package_emerge sys-devel/gcc --state absent --------------------------------------------------------------------------------- + # If you want a specific version of a package + __package_emerge app-portage/gentoolkit --state present --version 0.3.0.8-r2 + + # Remove package + __package_emerge sys-devel/gcc --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) -- cdist-type__package_emerge_dependencies(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ +- `cdist-type__package_emerge_dependencies(7) `_ COPYING diff --git a/cdist/conf/type/__package_emerge_dependencies/man.text b/cdist/conf/type/__package_emerge_dependencies/man.rst similarity index 55% rename from cdist/conf/type/__package_emerge_dependencies/man.text rename to cdist/conf/type/__package_emerge_dependencies/man.rst index 0862256b..21af86e3 100644 --- a/cdist/conf/type/__package_emerge_dependencies/man.text +++ b/cdist/conf/type/__package_emerge_dependencies/man.rst @@ -1,19 +1,17 @@ cdist-type__package_emerge_dependencies(7) ========================================== +Install dependencies for __package_emerge + Thomas Oettli -NAME ----- -cdist-type__package_emerge_dependencies - Install dependencies for __package_emerge - - DESCRIPTION ----------- Portage is usually used on the gentoo distribution to manage packages. This type installs the following tools which are required by __package_emerge to work: -app-portage/flaggie -app-portage/gentoolkit + +* app-portage/flaggie +* app-portage/gentoolkit REQUIRED PARAMETERS @@ -29,17 +27,17 @@ None EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure app-portage/flaggie and app-portage/gentoolkit are installed -__package_emerge_dependencies --------------------------------------------------------------------------------- +.. code-block:: sh + + # Ensure app-portage/flaggie and app-portage/gentoolkit are installed + __package_emerge_dependencies SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) -- cdist-type__package_emerge(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ +- `cdist-type__package_emerge(7) `_ COPYING diff --git a/cdist/conf/type/__package_luarocks/man.text b/cdist/conf/type/__package_luarocks/man.rst similarity index 59% rename from cdist/conf/type/__package_luarocks/man.text rename to cdist/conf/type/__package_luarocks/man.rst index 657f68e5..ff7fea83 100644 --- a/cdist/conf/type/__package_luarocks/man.text +++ b/cdist/conf/type/__package_luarocks/man.rst @@ -1,13 +1,10 @@ cdist-type__package_luarocks(7) =============================== +Manage luarocks packages + Christian G. Warden -NAME ----- -cdist-type__package_luarocks - Manage luarocks packages - - DESCRIPTION ----------- LuaRocks is a deployment and management system for Lua modules. @@ -20,29 +17,29 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present" EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure luasocket is installed -__package_luarocks luasocket --state present +.. code-block:: sh -# Remove package -__package_luarocks luasocket --state absent --------------------------------------------------------------------------------- + # Ensure luasocket is installed + __package_luarocks luasocket --state present + + # Remove package + __package_luarocks luasocket --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_opkg/man.text b/cdist/conf/type/__package_opkg/man.rst similarity index 57% rename from cdist/conf/type/__package_opkg/man.text rename to cdist/conf/type/__package_opkg/man.rst index aeb0a1c5..9af17988 100644 --- a/cdist/conf/type/__package_opkg/man.text +++ b/cdist/conf/type/__package_opkg/man.rst @@ -1,13 +1,10 @@ cdist-type__package_opkg(7) -========================== +=========================== +Manage packages with opkg + Giel van Schijndel -NAME ----- -cdist-type__package_opkg - Manage packages with opkg - - DESCRIPTION ----------- opkg is usually used on OpenWRT to manage packages. @@ -20,29 +17,29 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present" EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure lsof is installed -__package_opkg lsof --state present +.. code-block:: sh -# Remove obsolete package -__package_opkg dnsmasq --state absent --------------------------------------------------------------------------------- + # Ensure lsof is installed + __package_opkg lsof --state present + + # Remove obsolete package + __package_opkg dnsmasq --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_pacman/man.text b/cdist/conf/type/__package_pacman/man.rst similarity index 54% rename from cdist/conf/type/__package_pacman/man.text rename to cdist/conf/type/__package_pacman/man.rst index 2e24ecd9..3d8845a5 100644 --- a/cdist/conf/type/__package_pacman/man.text +++ b/cdist/conf/type/__package_pacman/man.rst @@ -1,13 +1,10 @@ cdist-type__package_pacman(7) ============================= +Manage packages with pacman + Nico Schottelius -NAME ----- -cdist-type__package_pacman - Manage packages with pacman - - DESCRIPTION ----------- Pacman is usually used on the Archlinux distribution to manage packages. @@ -20,32 +17,32 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present" EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure zsh in installed -__package_pacman zsh --state present +.. code-block:: sh -# If you don't want to follow pythonX packages, but always use python -__package_pacman python --state present --name python2 + # Ensure zsh in installed + __package_pacman zsh --state present -# Remove obsolete package -__package_pacman puppet --state absent --------------------------------------------------------------------------------- + # If you don't want to follow pythonX packages, but always use python + __package_pacman python --state present --name python2 + + # Remove obsolete package + __package_pacman puppet --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_pip/man.text b/cdist/conf/type/__package_pip/man.rst similarity index 55% rename from cdist/conf/type/__package_pip/man.text rename to cdist/conf/type/__package_pip/man.rst index 5b67e62f..b312fff5 100644 --- a/cdist/conf/type/__package_pip/man.text +++ b/cdist/conf/type/__package_pip/man.rst @@ -1,13 +1,10 @@ cdist-type__package_pip(7) ========================== +Manage packages with pip + Nico Schottelius -NAME ----- -cdist-type__package_pip - Manage packages with pip - - DESCRIPTION ----------- Pip is used in Python environments to install packages. @@ -21,38 +18,38 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -pip:: +pip Instead of using pip from PATH, use the specific pip path. -state:: +state Either "present" or "absent", defaults to "present" -runas:: +runas Run pip as specified user. By default it runs as root. EXAMPLES -------- --------------------------------------------------------------------------------- -# Install a package -__package_pip pyro --state present +.. code-block:: sh -# Use pip in a virtualenv located at /root/shinken_virtualenv -__package_pip pyro --state present --pip /root/shinken_virtualenv/bin/pip + # Install a package + __package_pip pyro --state present -# Use pip in a virtualenv located at /foo/shinken_virtualenv as user foo -__package_pip pyro --state present --pip /foo/shinken_virtualenv/bin/pip --runas foo --------------------------------------------------------------------------------- + # Use pip in a virtualenv located at /root/shinken_virtualenv + __package_pip pyro --state present --pip /root/shinken_virtualenv/bin/pip + + # Use pip in a virtualenv located at /foo/shinken_virtualenv as user foo + __package_pip pyro --state present --pip /foo/shinken_virtualenv/bin/pip --runas foo SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_pkg_freebsd/man.text b/cdist/conf/type/__package_pkg_freebsd/man.rst similarity index 53% rename from cdist/conf/type/__package_pkg_freebsd/man.text rename to cdist/conf/type/__package_pkg_freebsd/man.rst index 71387148..c728cc9a 100644 --- a/cdist/conf/type/__package_pkg_freebsd/man.text +++ b/cdist/conf/type/__package_pkg_freebsd/man.rst @@ -1,13 +1,10 @@ cdist-type__package_pkg_freebsd(7) ================================== +Manage FreeBSD packages + Jake Guffey -NAME ----- -cdist-type__package_pkg_freebsd - Manage FreeBSD packages - - DESCRIPTION ----------- This type is usually used on FreeBSD to manage packages. @@ -20,44 +17,44 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -flavor:: +flavor If supplied, use to avoid ambiguity. -version:: +version If supplied, use to install a specific version of the package named. -pkgsite:: +pkgsite If supplied, use to install from a specific package repository. -state:: +state Either "present" or "absent", defaults to "present" EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure zsh is installed -__package_pkg_freebsd zsh --state present +.. code-block:: sh -# Ensure vim is installed, use flavor no_x11 -__package_pkg_freebsd vim --state present --flavor no_x11 + # Ensure zsh is installed + __package_pkg_freebsd zsh --state present -# If you don't want to follow pythonX packages, but always use python -__package_pkg_freebsd python --state present --name python2 + # Ensure vim is installed, use flavor no_x11 + __package_pkg_freebsd vim --state present --flavor no_x11 -# Remove obsolete package -__package_pkg_freebsd puppet --state absent --------------------------------------------------------------------------------- + # If you don't want to follow pythonX packages, but always use python + __package_pkg_freebsd python --state present --name python2 + + # Remove obsolete package + __package_pkg_freebsd puppet --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_pkg_openbsd/man.rst b/cdist/conf/type/__package_pkg_openbsd/man.rst new file mode 100644 index 00000000..f9a746b9 --- /dev/null +++ b/cdist/conf/type/__package_pkg_openbsd/man.rst @@ -0,0 +1,63 @@ +cdist-type__package_pkg(7) +========================== +Manage OpenBSD packages + +Andi Brönnimann + + +DESCRIPTION +----------- +This type is usually used on OpenBSD to manage packages. + + +REQUIRED PARAMETERS +------------------- +None + + +OPTIONAL PARAMETERS +------------------- +name + If supplied, use the name and not the object id as the package name. + +flavor + If supplied, use to avoid ambiguity. + +state + Either "present" or "absent", defaults to "present" + +pkg_path + Manually specify a PKG_PATH to add packages from. + +EXAMPLES +-------- + +.. code-block:: sh + + # Ensure zsh is installed + __package_pkg_openbsd zsh --state present + + # Ensure vim is installed, use flavor no_x11 + __package_pkg_openbsd vim --state present --flavor no_x11 + + # If you don't want to follow pythonX packages, but always use python + __package_pkg_openbsd python --state present --name python2 + + # Remove obsolete package + __package_pkg_openbsd puppet --state absent + + # Add a package using a particular mirror + __package_pkg_openbsd bash \ + --pkg_path http://openbsd.mirrorcatalogs.com/snapshots/packages/amd64 + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ + + +COPYING +------- +Copyright \(C) 2011 Andi Brönnimann. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__package_pkg_openbsd/man.text b/cdist/conf/type/__package_pkg_openbsd/man.text deleted file mode 100644 index c7de2652..00000000 --- a/cdist/conf/type/__package_pkg_openbsd/man.text +++ /dev/null @@ -1,66 +0,0 @@ -cdist-type__package_pkg(7) -========================== -Andi Brönnimann - - -NAME ----- -cdist-type__package_pkg_openbsd - Manage OpenBSD packages - - -DESCRIPTION ------------ -This type is usually used on OpenBSD to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name:: - If supplied, use the name and not the object id as the package name. - -flavor:: - If supplied, use to avoid ambiguity. - -state:: - Either "present" or "absent", defaults to "present" - -pkg_path:: - Manually specify a PKG_PATH to add packages from. - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Ensure zsh is installed -__package_pkg_openbsd zsh --state present - -# Ensure vim is installed, use flavor no_x11 -__package_pkg_openbsd vim --state present --flavor no_x11 - -# If you don't want to follow pythonX packages, but always use python -__package_pkg_openbsd python --state present --name python2 - -# Remove obsolete package -__package_pkg_openbsd puppet --state absent - -# Add a package using a particular mirror -__package_pkg_openbsd bash \ - --pkg_path http://openbsd.mirrorcatalogs.com/snapshots/packages/amd64 --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__package(7) - - -COPYING -------- -Copyright \(C) 2011 Andi Brönnimann. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__package_pkgng_freebsd/man.text b/cdist/conf/type/__package_pkgng_freebsd/man.rst similarity index 60% rename from cdist/conf/type/__package_pkgng_freebsd/man.text rename to cdist/conf/type/__package_pkgng_freebsd/man.rst index da44da83..36f1a7d8 100644 --- a/cdist/conf/type/__package_pkgng_freebsd/man.text +++ b/cdist/conf/type/__package_pkgng_freebsd/man.rst @@ -1,13 +1,10 @@ cdist-type__package_pkgng_freebsd(7) -================================== +==================================== +Manage FreeBSD packages with pkg-ng + Jake Guffey -NAME ----- -cdist-type__package_pkgng_freebsd - Manage FreeBSD packages with pkg-ng - - DESCRIPTION ----------- This type is usually used on FreeBSD to manage packages. @@ -20,31 +17,31 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -flavor:: +flavor If supplied, use to avoid ambiguity. -version:: +version If supplied, use to install a specific version of the package named. -repo:: +repo If supplied, use to install the package named from a particular repo. -state:: +state Either "present" or "absent", defaults to "present" BOOLEAN PARAMETERS ------------------ -upgrade:: +upgrade If supplied, allow upgrading to the latest version of a package. CAVEATS ------- -This type requires that repository definitions already exist in /etc/pkg/*.conf. +This type requires that repository definitions already exist in /etc/pkg/\*.conf. Ensure that they exist prior to use of this type with __file. pkg-ng can't upgrade a package to a specific version. If this type needs to @@ -54,41 +51,41 @@ upgrade a package, it can only ugprade to the latest available version. If the MESSAGES -------- -install:: +install The package was installed -remove:: +remove The package was removed -upgrade:: +upgrade The package was upgraded -exist:: +exist The package was already present and thus not installed EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure zsh is installed -__package_pkgng_freebsd zsh --state present +.. code-block:: sh -# Ensure vim is installed, use flavor no_x11 -__package_pkgng_freebsd vim --state present --flavor no_x11 + # Ensure zsh is installed + __package_pkgng_freebsd zsh --state present -# If you don't want to follow pythonX packages, but always use python -__package_pkgng_freebsd python --state present --name python2 + # Ensure vim is installed, use flavor no_x11 + __package_pkgng_freebsd vim --state present --flavor no_x11 -# Install a package from a particular repository when multiples exist -__package_pkgng_freebsd bash --state present --repo myrepo + # If you don't want to follow pythonX packages, but always use python + __package_pkgng_freebsd python --state present --name python2 -# Remove obsolete package -__package_pkgng_freebsd puppet --state absent --------------------------------------------------------------------------------- + # Install a package from a particular repository when multiples exist + __package_pkgng_freebsd bash --state present --repo myrepo + + # Remove obsolete package + __package_pkgng_freebsd puppet --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_rubygem/man.text b/cdist/conf/type/__package_rubygem/man.rst similarity index 60% rename from cdist/conf/type/__package_rubygem/man.text rename to cdist/conf/type/__package_rubygem/man.rst index a808c2aa..4cb9af04 100644 --- a/cdist/conf/type/__package_rubygem/man.text +++ b/cdist/conf/type/__package_rubygem/man.rst @@ -1,13 +1,10 @@ cdist-type__package_rubygem(7) ============================== +Manage rubygem packages + Chase Allen James -NAME ----- -cdist-type__package_rubygem - Manage rubygem packages - - DESCRIPTION ----------- Rubygems is the default package management system for the Ruby programming language. @@ -20,29 +17,29 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present" EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure sinatra is installed -__package_rubygem sinatra --state present +.. code-block:: sh -# Remove package -__package_rubygem rails --state absent --------------------------------------------------------------------------------- + # Ensure sinatra is installed + __package_rubygem sinatra --state present + + # Remove package + __package_rubygem rails --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_update_index/man.text b/cdist/conf/type/__package_update_index/man.rst similarity index 58% rename from cdist/conf/type/__package_update_index/man.text rename to cdist/conf/type/__package_update_index/man.rst index 6435e51d..a16d29ce 100644 --- a/cdist/conf/type/__package_update_index/man.text +++ b/cdist/conf/type/__package_update_index/man.rst @@ -1,13 +1,10 @@ cdist-type__package_update_index(7) =================================== +Update the package index + Ricardo Catalinas Jiménez -NAME ----- -cdist-type__package_update_index - Update the package index - - DESCRIPTION ----------- This cdist type allows you to update the package index on the target. @@ -21,29 +18,30 @@ None OPTIONAL PARAMETERS ------------------- -type:: +type The package manager to use. Default is determined based on the $os explorer variable. - e.g. apt for Debian - yum for Red Hat - pacman for Arch Linux + e.g. + * apt for Debian + * yum for Red Hat + * pacman for Arch Linux EXAMPLES -------- --------------------------------------------------------------------------------- -# Update the package index on the target -__package_update_index +.. code-block:: sh -# Force use of a specific package manager -__package_update_index --type apt --------------------------------------------------------------------------------- + # Update the package index on the target + __package_update_index + + # Force use of a specific package manager + __package_update_index --type apt SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__package_upgrade_all/man.text b/cdist/conf/type/__package_upgrade_all/man.rst similarity index 58% rename from cdist/conf/type/__package_upgrade_all/man.text rename to cdist/conf/type/__package_upgrade_all/man.rst index 6d3e1338..146a8259 100644 --- a/cdist/conf/type/__package_upgrade_all/man.text +++ b/cdist/conf/type/__package_upgrade_all/man.rst @@ -1,13 +1,10 @@ cdist-type__package_upgrade_all(7) ================================== +Upgrade all the installed packages + Ricardo Catalinas Jiménez -NAME ----- -cdist-type__package_upgrade_all - Upgrade all the installed packages - - DESCRIPTION ----------- This cdist type allows you to upgrade all the installed packages on the @@ -21,29 +18,30 @@ None OPTIONAL PARAMETERS ------------------- -type:: +type The package manager to use. Default is determined based on the $os explorer variable. - e.g. apt for Debian - yum for Red Hat - pacman for Arch Linux + e.g. + * apt for Debian + * yum for Red Hat + * pacman for Arch Linux EXAMPLES -------- --------------------------------------------------------------------------------- -# Upgrade all the installed packages on the target -__package_upgrade_all +.. code-block:: sh -# Force use of a specific package manager -__package_upgrade_all --type apt --------------------------------------------------------------------------------- + # Upgrade all the installed packages on the target + __package_upgrade_all + + # Force use of a specific package manager + __package_upgrade_all --type apt SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__package_yum/man.text b/cdist/conf/type/__package_yum/man.rst similarity index 54% rename from cdist/conf/type/__package_yum/man.text rename to cdist/conf/type/__package_yum/man.rst index 65e1be67..65e56c7a 100644 --- a/cdist/conf/type/__package_yum/man.text +++ b/cdist/conf/type/__package_yum/man.rst @@ -1,13 +1,10 @@ cdist-type__package_yum(7) ========================== +Manage packages with yum + Nico Schottelius -NAME ----- -cdist-type__package_yum - Manage packages with yum - - DESCRIPTION ----------- Yum is usually used on the Fedora distribution to manage packages. @@ -22,37 +19,37 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present" -url:: +url URL to use for the package EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure zsh in installed -__package_yum zsh --state present +.. code-block:: sh -# If you don't want to follow pythonX packages, but always use python -__package_yum python --state present --name python2 + # Ensure zsh in installed + __package_yum zsh --state present -# Remove obsolete package -__package_yum puppet --state absent + # If you don't want to follow pythonX packages, but always use python + __package_yum python --state present --name python2 -__package epel-release-6-8 \ - --url http://mirror.switch.ch/ftp/mirror/epel/6/i386/epel-release-6-8.noarch.rpm --------------------------------------------------------------------------------- + # Remove obsolete package + __package_yum puppet --state absent + + __package epel-release-6-8 \ + --url http://mirror.switch.ch/ftp/mirror/epel/6/i386/epel-release-6-8.noarch.rpm SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__package_zypper/man.text b/cdist/conf/type/__package_zypper/man.rst similarity index 55% rename from cdist/conf/type/__package_zypper/man.text rename to cdist/conf/type/__package_zypper/man.rst index 94786bd9..2df22e72 100644 --- a/cdist/conf/type/__package_zypper/man.text +++ b/cdist/conf/type/__package_zypper/man.rst @@ -1,13 +1,10 @@ cdist-type__package_zypper(7) ============================= +Manage packages with zypper + Daniel Heule -NAME ----- -cdist-type__package_zypper - Manage packages with zypper - - DESCRIPTION ----------- Zypper is usually used on the SuSE distribution to manage packages. @@ -20,46 +17,46 @@ None OPTIONAL PARAMETERS ------------------- -name:: +name If supplied, use the name and not the object id as the package name. -state:: +state Either "present" or "absent", defaults to "present" -version:: +version The version of the package to install. Default is to install the version chosen by the local package manager. For a list of available versions, have a look at the output of "zypper se -s packagename" -ptype:: +ptype Either "package", "patch", "pattern", "product" or "srcpackage", defaults to "package". For a description see man zypper. EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure zsh is installed -__package_zypper zsh --state present +.. code-block:: sh -# If you don't want to follow pythonX packages, but always use python -__package_zypper python --state present --name python2 + # Ensure zsh is installed + __package_zypper zsh --state present -# Ensure binutils is installed and the version is forced to be 2.23.1-0.19.2 -__package_zypper binutils --state present --version 2.23.1-0.19.2 + # If you don't want to follow pythonX packages, but always use python + __package_zypper python --state present --name python2 -# Remove package -__package_zypper cfengine --state absent + # Ensure binutils is installed and the version is forced to be 2.23.1-0.19.2 + __package_zypper binutils --state present --version 2.23.1-0.19.2 -# install all packages which belongs to pattern x11 -__package_zypper x11 --ptype pattern --state present --------------------------------------------------------------------------------- + # Remove package + __package_zypper cfengine --state absent + + # install all packages which belongs to pattern x11 + __package_zypper x11 --ptype pattern --state present SEE ALSO -------- -- cdist-type(7) -- cdist-type__package(7) +- `cdist-type(7) `_ +- `cdist-type__package(7) `_ COPYING diff --git a/cdist/conf/type/__pacman_conf/man.text b/cdist/conf/type/__pacman_conf/man.rst similarity index 59% rename from cdist/conf/type/__pacman_conf/man.text rename to cdist/conf/type/__pacman_conf/man.rst index 9762837f..930035fa 100644 --- a/cdist/conf/type/__pacman_conf/man.text +++ b/cdist/conf/type/__pacman_conf/man.rst @@ -1,13 +1,10 @@ cdist-type__pacman_conf(7) ========================== +Manage pacman configuration + Dominique Roux -NAME ----- -cdist-type__pacman_conf - Manage pacman configuration - - DESCRIPTION ----------- The type allows you to configure options section, add or delete repositories and manage mirrorlists @@ -15,27 +12,27 @@ The type allows you to configure options section, add or delete repositories and REQUIRED PARAMETERS ------------------- -section:: +section 'options' for configure options section Otherwise it specifies a repository or a plain file -key:: +key Specifies the key which will be set If section = 'options' or file is not set the key will be checked against available keys from pacman.conf -value:: +value Specifies the value which will be set against the key OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to 'present' -file:: +file Specifies the filename. The managed file will be named like 'plain_file_filename' @@ -46,23 +43,22 @@ file:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Manage options section in pacman.conf -__pacman_conf options_Architecture --section options --key Architecture --value auto +.. code-block:: sh -# Add new repository -__pacman_conf localrepo_Server --section localrepo --key Server --value "file:///var/cache/pacman/pkg" + # Manage options section in pacman.conf + __pacman_conf options_Architecture --section options --key Architecture --value auto -# Add mirror to a mirrorlist -__pacman_conf customlist_Server --file customlist --section customlist --key Server\ - --value "file:///var/cache/pacman/pkg" + # Add new repository + __pacman_conf localrepo_Server --section localrepo --key Server --value "file:///var/cache/pacman/pkg" --------------------------------------------------------------------------------- + # Add mirror to a mirrorlist + __pacman_conf customlist_Server --file customlist --section customlist --key Server\ + --value "file:///var/cache/pacman/pkg" SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - grep(1) diff --git a/cdist/conf/type/__pacman_conf_integrate/man.text b/cdist/conf/type/__pacman_conf_integrate/man.rst similarity index 57% rename from cdist/conf/type/__pacman_conf_integrate/man.text rename to cdist/conf/type/__pacman_conf_integrate/man.rst index 8eb01d5f..6a856efe 100644 --- a/cdist/conf/type/__pacman_conf_integrate/man.text +++ b/cdist/conf/type/__pacman_conf_integrate/man.rst @@ -1,13 +1,10 @@ cdist-type__pacman_conf_integrate(7) ==================================== +Integrate default pacman.conf to cdist conform and vice versa + Dominique Roux -NAME ----- -cdist-type__pacman_conf_integrate - Integrate default pacman.conf to cdist conform and vice versa - - DESCRIPTION ----------- The type allows you to convert the default pacman.conf to a cdist conform one and vice versa @@ -19,26 +16,25 @@ None. OPTIONAL PARAMETERS ------------------- -state:: +state 'present' or 'absent', defaults to 'present' EXAMPLES -------- --------------------------------------------------------------------------------- -# Convert normal to cdist conform -__pacman_conf_integrate convert +.. code-block:: sh -# Convert cdist conform to normal -__pacman_conf_integrate convert --state absent + # Convert normal to cdist conform + __pacman_conf_integrate convert --------------------------------------------------------------------------------- + # Convert cdist conform to normal + __pacman_conf_integrate convert --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - grep(1) diff --git a/cdist/conf/type/__pf_apply/man.rst b/cdist/conf/type/__pf_apply/man.rst new file mode 100644 index 00000000..0b440e2d --- /dev/null +++ b/cdist/conf/type/__pf_apply/man.rst @@ -0,0 +1,53 @@ +cdist-type__pf_apply(7) +======================= +Apply pf(4) ruleset on \*BSD + +Jake Guffey + + +NAME +---- + + +DESCRIPTION +----------- +This type is used on \*BSD systems to manage the pf firewall's active ruleset. + + +REQUIRED PARAMETERS +------------------- +NONE + + +OPTIONAL PARAMETERS +------------------- +NONE + + +EXAMPLES +-------- + +.. code-block:: sh + + # Modify the ruleset on $__target_host: + __pf_ruleset --state present --source /my/pf/ruleset.conf + require="__pf_ruleset" \ + __pf_apply + + # Remove the ruleset on $__target_host (implies disabling pf(4): + __pf_ruleset --state absent + require="__pf_ruleset" \ + __pf_apply + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__pf_ruleset(7) `_ +- pf(4) + + +COPYING +------- +Copyright \(C) 2012 Jake Guffey. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__pf_apply/man.text b/cdist/conf/type/__pf_apply/man.text deleted file mode 100644 index 2e0d7802..00000000 --- a/cdist/conf/type/__pf_apply/man.text +++ /dev/null @@ -1,52 +0,0 @@ -cdist-type__pf_apply(7) -======================= -Jake Guffey - - -NAME ----- -cdist-type__pf_apply - Apply pf(4) ruleset on *BSD - - -DESCRIPTION ------------ -This type is used on *BSD systems to manage the pf firewall's active ruleset. - - -REQUIRED PARAMETERS -------------------- -NONE - - -OPTIONAL PARAMETERS -------------------- -NONE - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Modify the ruleset on $__target_host: -__pf_ruleset --state present --source /my/pf/ruleset.conf -require="__pf_ruleset" \ - __pf_apply - -# Remove the ruleset on $__target_host (implies disabling pf(4): -__pf_ruleset --state absent -require="__pf_ruleset" \ - __pf_apply --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__pf_ruleset(7) -- pf(4) - - -COPYING -------- -Copyright \(C) 2012 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__pf_ruleset/man.text b/cdist/conf/type/__pf_ruleset/man.rst similarity index 57% rename from cdist/conf/type/__pf_ruleset/man.text rename to cdist/conf/type/__pf_ruleset/man.rst index 29efe065..b3e9b073 100644 --- a/cdist/conf/type/__pf_ruleset/man.text +++ b/cdist/conf/type/__pf_ruleset/man.rst @@ -1,27 +1,24 @@ cdist-type__pf_ruleset(7) ========================= +Copy a pf(4) ruleset to $__target_host + Jake Guffey -NAME ----- -cdist-type__pf_ruleset - Copy a pf(4) ruleset to $__target_host - - DESCRIPTION ----------- -This type is used on *BSD systems to manage the pf firewall's ruleset. +This type is used on \*BSD systems to manage the pf firewall's ruleset. REQUIRED PARAMETERS ------------------- -state:: +state Either "absent" (no ruleset at all) or "present", defaults to "present". OPTIONAL PARAMETERS ------------------- -source:: +source If supplied, use to define the ruleset to load onto the $__target_host for pf(4). Note that this type is almost useless without a ruleset defined, but it's technically not needed, e.g. for the case of disabling the firewall temporarily. @@ -30,19 +27,18 @@ source:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Remove the current ruleset in place -__pf_ruleset --state absent +.. code-block:: sh -# Enable the firewall with the ruleset defined in $__manifest/files/pf.conf -__pf_ruleset --state present --source $__manifest/files/pf.conf + # Remove the current ruleset in place + __pf_ruleset --state absent --------------------------------------------------------------------------------- + # Enable the firewall with the ruleset defined in $__manifest/files/pf.conf + __pf_ruleset --state present --source $__manifest/files/pf.conf SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - pf(4) diff --git a/cdist/conf/type/__postfix/man.text b/cdist/conf/type/__postfix/man.rst similarity index 66% rename from cdist/conf/type/__postfix/man.text rename to cdist/conf/type/__postfix/man.rst index 1a91723a..d10a9960 100644 --- a/cdist/conf/type/__postfix/man.text +++ b/cdist/conf/type/__postfix/man.rst @@ -1,13 +1,10 @@ cdist-type__postfix(7) ====================== +Install postfix + Steven Armstrong -NAME ----- -cdist-type__postfix - install postfix - - DESCRIPTION ----------- This space intentionally left blank. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__postfix --------------------------------------------------------------------------------- +.. code-block:: sh + + __postfix SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__postfix_master/man.text b/cdist/conf/type/__postfix_master/man.rst similarity index 51% rename from cdist/conf/type/__postfix_master/man.text rename to cdist/conf/type/__postfix_master/man.rst index 0ec78752..4853e687 100644 --- a/cdist/conf/type/__postfix_master/man.text +++ b/cdist/conf/type/__postfix_master/man.rst @@ -1,13 +1,10 @@ cdist-type__postfix_master(7) ============================= +Configure postfix master.cf + Steven Armstrong -NAME ----- -cdist-type__postfix_master - configure postfix master.cf - - DESCRIPTION ----------- See master(5) for more information. @@ -15,54 +12,62 @@ See master(5) for more information. REQUIRED PARAMETERS ------------------- -type:: +type See master(5) -command:: +command See master(5) BOOLEAN PARAMETERS ------------------ -noreload:: +noreload don't reload postfix after changes OPTIONAL PARAMETERS ------------------- -state:: +state present or absent, defaults to present -service:: -private:: -unpriv:: -chroot:: -wakeup:: -maxproc:: -option:: + +service + +private + +unpriv + +chroot + +wakeup + +maxproc + +option Pass an option to a service. Same as using -o in master.cf. Can be specified multiple times. -comment:: + +comment a textual comment to add with the master.cf entry EXAMPLES -------- --------------------------------------------------------------------------------- -__postfix_master smtp --type inet --command smtpd +.. code-block:: sh -__postfix_master smtp --type inet --chroot y --command smtpd \ - --option smtpd_enforce_tls=yes \ - --option smtpd_sasl_auth_enable=yes \ - --option smtpd_client_restrictions=permit_sasl_authenticated,reject + __postfix_master smtp --type inet --command smtpd -__postfix_master submission --type inet --command smtpd \ - --comment "Run alternative smtp on submission port" --------------------------------------------------------------------------------- + __postfix_master smtp --type inet --chroot y --command smtpd \ + --option smtpd_enforce_tls=yes \ + --option smtpd_sasl_auth_enable=yes \ + --option smtpd_client_restrictions=permit_sasl_authenticated,reject + + __postfix_master submission --type inet --command smtpd \ + --comment "Run alternative smtp on submission port" SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - master(5) diff --git a/cdist/conf/type/__postfix_postconf/man.text b/cdist/conf/type/__postfix_postconf/man.rst similarity index 64% rename from cdist/conf/type/__postfix_postconf/man.text rename to cdist/conf/type/__postfix_postconf/man.rst index 727637b1..e07e136f 100644 --- a/cdist/conf/type/__postfix_postconf/man.text +++ b/cdist/conf/type/__postfix_postconf/man.rst @@ -1,13 +1,10 @@ cdist-type__postfix_postconf(7) =============================== +Configure postfix main.cf + Steven Armstrong -NAME ----- -cdist-type__postfix_postconf - configure postfix main.cf - - DESCRIPTION ----------- See postconf(5) for possible keys and values. @@ -18,30 +15,29 @@ It does not make changes to /etc/postfix/main.cf itself. REQUIRED PARAMETERS ------------------- -value:: +value the value for the postfix parameter OPTIONAL PARAMETERS ------------------- -key:: +key the name of the parameter. Defaults to __object_id EXAMPLES -------- --------------------------------------------------------------------------------- -__postfix_postconf mydomain --value somedomain.com +.. code-block:: sh -__postfix_postconf bind-to-special-ip --key smtp_bind_address --value 127.0.0.5 + __postfix_postconf mydomain --value somedomain.com --------------------------------------------------------------------------------- + __postfix_postconf bind-to-special-ip --key smtp_bind_address --value 127.0.0.5 SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - postconf(5) diff --git a/cdist/conf/type/__postfix_postmap/man.text b/cdist/conf/type/__postfix_postmap/man.rst similarity index 62% rename from cdist/conf/type/__postfix_postmap/man.text rename to cdist/conf/type/__postfix_postmap/man.rst index 37060d04..ecee6722 100644 --- a/cdist/conf/type/__postfix_postmap/man.text +++ b/cdist/conf/type/__postfix_postmap/man.rst @@ -1,13 +1,10 @@ cdist-type__postfix_postmap(7) ============================== +Run postmap on the given file + Steven Armstrong -NAME ----- -cdist-type__postfix_postmap - run postmap on the given file - - DESCRIPTION ----------- This space intentionally left blank. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__postfix_postmap /etc/postfix/generic --------------------------------------------------------------------------------- +.. code-block:: sh + + __postfix_postmap /etc/postfix/generic SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__postfix_reload/man.text b/cdist/conf/type/__postfix_reload/man.rst similarity index 63% rename from cdist/conf/type/__postfix_reload/man.text rename to cdist/conf/type/__postfix_reload/man.rst index c63356b5..c5101953 100644 --- a/cdist/conf/type/__postfix_reload/man.text +++ b/cdist/conf/type/__postfix_reload/man.rst @@ -1,13 +1,10 @@ cdist-type__postfix_reload(7) ============================= +Tell postfix to reload its configuration + Steven Armstrong -NAME ----- -cdist-type__postfix_reload - tell postfix to reload its configuration - - DESCRIPTION ----------- This space intentionally left blank. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__postfix_reload --------------------------------------------------------------------------------- +.. code-block:: sh + + __postfix_reload SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__postgres_database/man.text b/cdist/conf/type/__postgres_database/man.rst similarity index 60% rename from cdist/conf/type/__postgres_database/man.text rename to cdist/conf/type/__postgres_database/man.rst index c7c0d3cd..152ee910 100644 --- a/cdist/conf/type/__postgres_database/man.text +++ b/cdist/conf/type/__postgres_database/man.rst @@ -1,13 +1,10 @@ cdist-type__postgres_database(7) ================================ +Create/drop postgres databases + Steven Armstrong -NAME ----- -cdist-type__postgres_database - create/drop postgres databases - - DESCRIPTION ----------- This cdist type allows you to create or drop postgres databases. @@ -15,25 +12,25 @@ This cdist type allows you to create or drop postgres databases. OPTIONAL PARAMETERS ------------------- -state:: +state either 'present' or 'absent', defaults to 'present'. -owner:: +owner the role owning this database EXAMPLES -------- --------------------------------------------------------------------------------- -__postgres_database mydbname --owner mydbusername --------------------------------------------------------------------------------- +.. code-block:: sh + + __postgres_database mydbname --owner mydbusername SEE ALSO -------- -- cdist-type(7) -- cdist-type__postgres_role(7) +- `cdist-type(7) `_ +- `cdist-type__postgres_role(7) `_ COPYING diff --git a/cdist/conf/type/__postgres_role/man.text b/cdist/conf/type/__postgres_role/man.rst similarity index 59% rename from cdist/conf/type/__postgres_role/man.text rename to cdist/conf/type/__postgres_role/man.rst index ac87754b..6384568f 100644 --- a/cdist/conf/type/__postgres_role/man.text +++ b/cdist/conf/type/__postgres_role/man.rst @@ -1,13 +1,10 @@ cdist-type__postgres_role(7) ============================ +Manage postgres roles + Steven Armstrong -NAME ----- -cdist-type__postgres_role - manage postgres roles - - DESCRIPTION ----------- This cdist type allows you to create or drop postgres roles. @@ -15,43 +12,43 @@ This cdist type allows you to create or drop postgres roles. OPTIONAL PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present" All other parameters map directly to the corresponding postgres createrole parameters. -password:: +password BOOLEAN PARAMETERS ------------------ All parameter map directly to the corresponding postgres createrole parameters. -login:: -createdb:: -createrole:: -superuser:: -inherit:: +login +createdb +createrole +superuser +inherit EXAMPLES -------- --------------------------------------------------------------------------------- -__postgres_role myrole +.. code-block:: sh -__postgres_role myrole --password 'secret' + __postgres_role myrole -__postgres_role admin --password 'very-secret' --superuser + __postgres_role myrole --password 'secret' -__postgres_role dbcustomer --password 'bla' --createdb --------------------------------------------------------------------------------- + __postgres_role admin --password 'very-secret' --superuser + + __postgres_role dbcustomer --password 'bla' --createdb SEE ALSO -------- -- cdist-type(7) -- cdist-type__postgres_database(7) +- `cdist-type(7) `_ +- `cdist-type__postgres_database(7) `_ - http://www.postgresql.org/docs/current/static/sql-createrole.html diff --git a/cdist/conf/type/__process/man.rst b/cdist/conf/type/__process/man.rst new file mode 100644 index 00000000..09032a1a --- /dev/null +++ b/cdist/conf/type/__process/man.rst @@ -0,0 +1,67 @@ +cdist-type__process(7) +====================== +Start or stop process + +Nico Schottelius + + +DESCRIPTION +----------- +This cdist type allows you to define the state of a process. + + +OPTIONAL PARAMETERS +------------------- +state + Either "present" or "absent", defaults to "present" + +name + Process name to match on when using pgrep -f -x. + + This is useful, if the name starts with a "/", + because the leading slash is stripped away from + the object id by cdist. + +stop + Executable to use for stopping the process. + +start + Executable to use for starting the process. + + +EXAMPLES +-------- + +.. code-block:: sh + + # Start if not running + __process /usr/sbin/syslog-ng --state present + + # Start if not running with a different binary + __process /usr/sbin/nginx --state present --start "/etc/rc.d/nginx start" + + # Stop the process using kill (the type default) - DO NOT USE THIS + __process /usr/sbin/sshd --state absent + + # Stop the process using /etc/rc.d/sshd stop - THIS ONE NOT AS WELL + __process /usr/sbin/sshd --state absent --stop "/etc/rc.d/sshd stop" + + # Ensure cups is running, which runs with -C ...: + __process cups --start "/etc/rc.d/cups start" --state present \ + --name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf" + + # Ensure rpc.statd is running (which usually runs with -L) using a regexp + __process rpcstatd --state present --start "/etc/init.d/statd start" \ + --name "rpc.statd.*" + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__start_on_boot(7) `_ + + +COPYING +------- +Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__process/man.text b/cdist/conf/type/__process/man.text deleted file mode 100644 index 2fdd27aa..00000000 --- a/cdist/conf/type/__process/man.text +++ /dev/null @@ -1,70 +0,0 @@ -cdist-type__process(7) -====================== -Nico Schottelius - - -NAME ----- -cdist-type__process - Start or stop process - - -DESCRIPTION ------------ -This cdist type allows you to define the state of a process. - - -OPTIONAL PARAMETERS -------------------- -state:: - Either "present" or "absent", defaults to "present" - -name:: - Process name to match on when using pgrep -f -x. - - This is useful, if the name starts with a "/", - because the leading slash is stripped away from - the object id by cdist. - -stop:: - Executable to use for stopping the process. - -start:: - Executable to use for starting the process. - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Start if not running -__process /usr/sbin/syslog-ng --state present - -# Start if not running with a different binary -__process /usr/sbin/nginx --state present --start "/etc/rc.d/nginx start" - -# Stop the process using kill (the type default) - DO NOT USE THIS -__process /usr/sbin/sshd --state absent - -# Stop the process using /etc/rc.d/sshd stop - THIS ONE NOT AS WELL -__process /usr/sbin/sshd --state absent --stop "/etc/rc.d/sshd stop" - -# Ensure cups is running, which runs with -C ...: -__process cups --start "/etc/rc.d/cups start" --state present \ - --name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf" - -# Ensure rpc.statd is running (which usually runs with -L) using a regexp -__process rpcstatd --state present --start "/etc/init.d/statd start" \ - --name "rpc.statd.*" --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__start_on_boot(7) - - -COPYING -------- -Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__pyvenv/man.rst b/cdist/conf/type/__pyvenv/man.rst new file mode 100755 index 00000000..bdc1166c --- /dev/null +++ b/cdist/conf/type/__pyvenv/man.rst @@ -0,0 +1,78 @@ +cdist-type__pyvenv(7) +===================== +Create or remove python virtual environment + +Darko Poljak + + +DESCRIPTION +----------- +This cdist type allows you to create or remove python virtual +environment using pyvenv. +It assumes pyvenv is already installed. Concrete package depends +on concrete OS and/or OS version/distribution. +Ensure this for e.g. in your init manifest as in the following example: + +.. code-block sh + + case "$__target_host" in + localhost) + __package python3-venv --state present + require="__package/python3-venv" __pyvenv /home/darko/testenv --pyvenv "pyvenv-3.4" --owner darko --group darko --mode 740 --state present + require="__pyvenv/home/darko/testenv" __package_pip docopt --pip /home/darko/testenv/bin/pip --runas darko --state present + ;; + esac + + +REQUIRED PARAMETERS +------------------- +None + +OPTIONAL PARAMETERS +------------------- +state + Either "present" or "absent", defaults to "present" + +group + Group to chgrp to + +mode + Unix permissions, suitable for chmod + +owner + User to chown to + +pyvenv + Use this specific pyvenv + +venvparams + Specific parameters to pass to pyvenv invocation + + +EXAMPLES +-------- + +.. code-block:: sh + + __pyvenv /home/services/djangoenv + + # Use specific pyvenv + __pyvenv /home/foo/fooenv --pyvenv /usr/local/bin/pyvenv-3.4 + + # Create python virtualenv for user foo. + __pyvenv /home/foo/fooenv --group foo --user foo + + # Create python virtualenv with specific parameters. + __pyvenv /home/services/djangoenv --venvparams "--copies --system-site-packages" + + +SEE ALSO +-------- +- `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2016 Darko Poljak. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). + diff --git a/cdist/conf/type/__pyvenv/man.text b/cdist/conf/type/__pyvenv/man.text deleted file mode 100755 index 71d30ed5..00000000 --- a/cdist/conf/type/__pyvenv/man.text +++ /dev/null @@ -1,80 +0,0 @@ -cdist-type__pyvenv(7) -===================== -Darko Poljak - - -NAME ----- -cdist-type__pyvenv - Create or remove python virtual environment - - -DESCRIPTION ------------ -This cdist type allows you to create or remove python virtual -environment using pyvenv. -It assumes pyvenv is already installed. Concrete package depends -on concrete OS and/or OS version/distribution. -Ensure this for e.g. in your init manifest as in the following example: --------------------------------------------------------------------------------- -case "$__target_host" in - localhost) - __package python3-venv --state present - require="__package/python3-venv" __pyvenv /home/darko/testenv --pyvenv "pyvenv-3.4" --owner darko --group darko --mode 740 --state present - require="__pyvenv/home/darko/testenv" __package_pip docopt --pip /home/darko/testenv/bin/pip --runas darko --state present - ;; -esac --------------------------------------------------------------------------------- - - -REQUIRED PARAMETERS -------------------- -None - -OPTIONAL PARAMETERS -------------------- -state:: - Either "present" or "absent", defaults to "present" - -group:: - Group to chgrp to - -mode:: - Unix permissions, suitable for chmod - -owner:: - User to chown to - -pyvenv:: - Use this specific pyvenv - -venvparams:: - Specific parameters to pass to pyvenv invocation - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -__pyvenv /home/services/djangoenv - -# Use specific pyvenv -__pyvenv /home/foo/fooenv --pyvenv /usr/local/bin/pyvenv-3.4 - -# Create python virtualenv for user foo. -__pyvenv /home/foo/fooenv --group foo --user foo - -# Create python virtualenv with specific parameters. -__pyvenv /home/services/djangoenv --venvparams "--copies --system-site-packages" --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -COPYING -------- -Copyright \(C) 2016 Darko Poljak. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). - diff --git a/cdist/conf/type/__qemu_img/man.text b/cdist/conf/type/__qemu_img/man.rst similarity index 59% rename from cdist/conf/type/__qemu_img/man.text rename to cdist/conf/type/__qemu_img/man.rst index dda54e0d..598e06ab 100644 --- a/cdist/conf/type/__qemu_img/man.text +++ b/cdist/conf/type/__qemu_img/man.rst @@ -1,13 +1,10 @@ cdist-type__qemu_img(7) ======================= +Manage VM disk images + Nico Schottelius -NAME ----- -cdist-type__qemu_img - Manage VM disk images - - DESCRIPTION ----------- The qemu-img program is used to create qemu images for @@ -17,9 +14,9 @@ qemu and (qemu-)kvm. OPTIONAL PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present" -size:: +size Size of the image in qemu-img compatible units. Required if state is "present". @@ -28,18 +25,18 @@ size:: EXAMPLES -------- --------------------------------------------------------------------------------- -# Create a 50G size image -__qemu_img /home/services/kvm/vm/myvmname/system-disk --size 50G +.. code-block:: sh -# Remove image -__qemu_img /home/services/kvm/vm/myoldvm/system-disk --state absent --------------------------------------------------------------------------------- + # Create a 50G size image + __qemu_img /home/services/kvm/vm/myvmname/system-disk --size 50G + + # Remove image + __qemu_img /home/services/kvm/vm/myoldvm/system-disk --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - qemu-img(1) diff --git a/cdist/conf/type/__rbenv/man.text b/cdist/conf/type/__rbenv/man.rst similarity index 54% rename from cdist/conf/type/__rbenv/man.text rename to cdist/conf/type/__rbenv/man.rst index c6ed5de2..314507fe 100644 --- a/cdist/conf/type/__rbenv/man.text +++ b/cdist/conf/type/__rbenv/man.rst @@ -1,13 +1,10 @@ cdist-type__rbenv(7) ==================== +Manage rbenv installation + Nico Schottelius -NAME ----- -cdist-type__rbenv - Manage rbenv installation - - DESCRIPTION ----------- This cdist type allows you to manage rbenv installations. @@ -16,31 +13,31 @@ It also installs ruby-build. OPTIONAL PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present" -owner:: +owner Which user should own the rbenv installation, defaults to root EXAMPLES -------- --------------------------------------------------------------------------------- -# Install rbenv including ruby-build for nico -__rbenv /home/nico +.. code-block:: sh -# Install rbenv including ruby-build for nico -__rbenv /home/nico --owner nico + # Install rbenv including ruby-build for nico + __rbenv /home/nico -# Bastian does not need rbenv anymore, he began to code C99 -__rbenv /home/bastian --state absent --------------------------------------------------------------------------------- + # Install rbenv including ruby-build for nico + __rbenv /home/nico --owner nico + + # Bastian does not need rbenv anymore, he began to code C99 + __rbenv /home/bastian --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__rsync/man.text b/cdist/conf/type/__rsync/man.rst similarity index 61% rename from cdist/conf/type/__rsync/man.text rename to cdist/conf/type/__rsync/man.rst index af39b9c5..bc7b1bca 100644 --- a/cdist/conf/type/__rsync/man.text +++ b/cdist/conf/type/__rsync/man.rst @@ -1,13 +1,10 @@ cdist-type__rsync(7) ==================== +Mirror directories using rsync + Nico Schottelius -NAME ----- -cdist-type__rsync - Mirror directories using rsync - - DESCRIPTION ----------- WARNING: This type is of BETA quality: @@ -27,30 +24,31 @@ target host. A slash will be appended to the source directory so that only the contents of the directory are taken and not the directory name itself. + REQUIRED PARAMETERS ------------------- -source:: +source Where to take files from OPTIONAL PARAMETERS ------------------- -group:: +group Group to chgrp to. -owner:: +owner User to chown to. -destination:: +destination Use this as the base destination instead of the object id -remote-user:: +remote-user Use this user instead of the default "root" for rsync operations. OPTIONAL MULTIPLE PARAMETERS ---------------------------- -rsync-opts:: +rsync-opts Use this option to give rsync options with. See rsync(1) for available options. Only "--" options are supported. @@ -66,41 +64,40 @@ NONE EXAMPLES -------- --------------------------------------------------------------------------------- -# You can use any source directory -__rsync /tmp/testdir \ - --source /etc +.. code-block:: sh -# Use source from type -__rsync /etc \ - --source "$__type/files/package" + # You can use any source directory + __rsync /tmp/testdir \ + --source /etc -# Allow multiple __rsync objects to write to the same dir -__rsync mystuff \ - --destination /usr/local/bin \ - --source "$__type/files/package" + # Use source from type + __rsync /etc \ + --source "$__type/files/package" -__rsync otherstuff \ - --destination /usr/local/bin \ - --source "$__type/files/package2" + # Allow multiple __rsync objects to write to the same dir + __rsync mystuff \ + --destination /usr/local/bin \ + --source "$__type/files/package" -# Use rsync option --exclude -__rsync /tmp/testdir \ - --source /etc \ - --rsync-opts exclude=sshd_conf + __rsync otherstuff \ + --destination /usr/local/bin \ + --source "$__type/files/package2" -# Use rsync with multiple options --exclude --dry-run -__rsync /tmp/testing \ - --source /home/tester \ - --rsync-opts exclude=id_rsa \ - --rsync-opts dry-run + # Use rsync option --exclude + __rsync /tmp/testdir \ + --source /etc \ + --rsync-opts exclude=sshd_conf + # Use rsync with multiple options --exclude --dry-run + __rsync /tmp/testing \ + --source /home/tester \ + --rsync-opts exclude=id_rsa \ + --rsync-opts dry-run --------------------------------------------------------------------------------- SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - rsync(1) diff --git a/cdist/conf/type/__rvm/man.text b/cdist/conf/type/__rvm/man.rst similarity index 52% rename from cdist/conf/type/__rvm/man.text rename to cdist/conf/type/__rvm/man.rst index 0408d125..8a3f72f5 100644 --- a/cdist/conf/type/__rvm/man.text +++ b/cdist/conf/type/__rvm/man.rst @@ -1,13 +1,10 @@ cdist-type__rvm(7) ================== +Install rvm for a given user + Evax Software -NAME ----- -cdist-type__rvm - Install rvm for a given user - - DESCRIPTION ----------- RVM is the Ruby enVironment Manager for the Ruby programming language. @@ -15,28 +12,28 @@ RVM is the Ruby enVironment Manager for the Ruby programming language. REQUIRED PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present". EXAMPLES -------- --------------------------------------------------------------------------------- -# Install rvm for user billie -__rvm billie --state present +.. code-block:: sh -# Remove rvm -__rvm billie --state absent --------------------------------------------------------------------------------- + # Install rvm for user billie + __rvm billie --state present + + # Remove rvm + __rvm billie --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__rvm_ruby(7) -- cdist-type__rvm_gemset(7) -- cdist-type__rvm_gem(7) +- `cdist-type(7) `_ +- `cdist-type__rvm_ruby(7) `_ +- `cdist-type__rvm_gemset(7) `_ +- `cdist-type__rvm_gem(7) `_ COPYING diff --git a/cdist/conf/type/__rvm_gem/man.rst b/cdist/conf/type/__rvm_gem/man.rst new file mode 100644 index 00000000..39d93065 --- /dev/null +++ b/cdist/conf/type/__rvm_gem/man.rst @@ -0,0 +1,54 @@ +cdist-type__rvm_gemset(7) +========================== +Manage Ruby gems through rvm + +Evax Software + + +DESCRIPTION +----------- +RVM is the Ruby enVironment Manager for the Ruby programming language. + + +REQUIRED PARAMETERS +------------------- +user + The remote user account to use +gemset + The gemset to use +state + Either "present" or "absent", defaults to "present". + +OPTIONAL PARAMETERS +------------------- +default + Make the selected gemset the default + +EXAMPLES +-------- + +.. code-block:: sh + + # Install the rails gem in gemset ruby-1.9.3-p0@myset for user bill + __rvm_gemset rails --gemset ruby-1.9.3-p0@myset --user bill --state present + + # Do the same and also make ruby-1.9.3-p0@myset the default gemset + __rvm_gemset rails --gemset ruby-1.9.3-p0@myset --user bill \ + --state present --default + + # Remove it + __rvm_ruby rails --gemset ruby-1.9.3-p0@myset --user bill --state absent + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__rvm(7) `_ +- `cdist-type__rvm_ruby(7) `_ +- `cdist-type__rvm_gemset(7) `_ + + +COPYING +------- +Copyright \(C) 2012 Evax Software. Free use of this software is granted under +the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_gem/man.text b/cdist/conf/type/__rvm_gem/man.text deleted file mode 100644 index d7eff3be..00000000 --- a/cdist/conf/type/__rvm_gem/man.text +++ /dev/null @@ -1,57 +0,0 @@ -cdist-type__rvm_gemset(7) -========================== -Evax Software - - -NAME ----- -cdist-type__rvm_gem - Manage Ruby gems through rvm - - -DESCRIPTION ------------ -RVM is the Ruby enVironment Manager for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -user:: - The remote user account to use -gemset:: - The gemset to use -state:: - Either "present" or "absent", defaults to "present". - -OPTIONAL PARAMETERS -------------------- -default:: - Make the selected gemset the default - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Install the rails gem in gemset ruby-1.9.3-p0@myset for user bill -__rvm_gemset rails --gemset ruby-1.9.3-p0@myset --user bill --state present - -# Do the same and also make ruby-1.9.3-p0@myset the default gemset -__rvm_gemset rails --gemset ruby-1.9.3-p0@myset --user bill \ - --state present --default - -# Remove it -__rvm_ruby rails --gemset ruby-1.9.3-p0@myset --user bill --state absent --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__rvm(7) -- cdist-type__rvm_ruby(7) -- cdist-type__rvm_gemset(7) - - -COPYING -------- -Copyright \(C) 2012 Evax Software. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_gemset/man.rst b/cdist/conf/type/__rvm_gemset/man.rst new file mode 100644 index 00000000..422130cb --- /dev/null +++ b/cdist/conf/type/__rvm_gemset/man.rst @@ -0,0 +1,52 @@ +cdist-type__rvm_gemset(7) +========================== +Manage gemsets through rvm + +Evax Software + + +DESCRIPTION +----------- +RVM is the Ruby enVironment Manager for the Ruby programming language. + + +REQUIRED PARAMETERS +------------------- +user + The remote user account to use +state + Either "present" or "absent", defaults to "present". + +BOOLEAN PARAMETERS +------------------- +default + If present, set the given gemset as default. + + +EXAMPLES +-------- + +.. code-block:: sh + + # Install the gemset @myset for user charles on based on ruby-1.9.3-0 + __rvm_gemset ruby-1.9.3-p0@myset --user charles --state present + + # Do the same and make ruby-1.9.3-p0@myset the default gemset + __rvm_gemset ruby-1.9.3-p0@myset --user charles --state present --default + + # Remove the gemset @myset for user john + __rvm_ruby ruby-1.9.3-p0@myset --user john --state absent + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__rvm(7) `_ +- `cdist-type__rvm_ruby(7) `_ +- `cdist-type__rvm_gem(7) `_ + + +COPYING +------- +Copyright \(C) 2012 Evax Software. Free use of this software is granted under +the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_gemset/man.text b/cdist/conf/type/__rvm_gemset/man.text deleted file mode 100644 index e85425f3..00000000 --- a/cdist/conf/type/__rvm_gemset/man.text +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__rvm_gemset(7) -========================== -Evax Software - - -NAME ----- -cdist-type__rvm_gemset - Manage gemsets through rvm - - -DESCRIPTION ------------ -RVM is the Ruby enVironment Manager for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -user:: - The remote user account to use -state:: - Either "present" or "absent", defaults to "present". - -BOOLEAN PARAMETERS -------------------- -default:: - If present, set the given gemset as default. - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Install the gemset @myset for user charles on based on ruby-1.9.3-0 -__rvm_gemset ruby-1.9.3-p0@myset --user charles --state present - -# Do the same and make ruby-1.9.3-p0@myset the default gemset -__rvm_gemset ruby-1.9.3-p0@myset --user charles --state present --default - -# Remove the gemset @myset for user john -__rvm_ruby ruby-1.9.3-p0@myset --user john --state absent --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__rvm(7) -- cdist-type__rvm_ruby(7) -- cdist-type__rvm_gem(7) - - -COPYING -------- -Copyright \(C) 2012 Evax Software. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_ruby/man.rst b/cdist/conf/type/__rvm_ruby/man.rst new file mode 100644 index 00000000..dbb1c9a2 --- /dev/null +++ b/cdist/conf/type/__rvm_ruby/man.rst @@ -0,0 +1,53 @@ +cdist-type__rvm_ruby(7) +======================= +Manage ruby installations through rvm + +Evax Software + + +DESCRIPTION +----------- +RVM is the Ruby enVironment Manager for the Ruby programming language. + + +REQUIRED PARAMETERS +------------------- +user + The remote user account to use +state + Either "present" or "absent", defaults to "present". + + +BOOLEAN PARAMETERS +------------------ +default + Set the given version as default + + +EXAMPLES +-------- + +.. code-block:: sh + + # Install ruby 1.9.3 through rvm for user thelonious + __rvm_ruby ruby-1.9.3-p0 --user thelonious --state present + + # Install ruby 1.9.3 through rvm for user ornette and make it the default + __rvm_ruby ruby-1.9.3-p0 --user ornette --state present --default + + # Remove ruby 1.9.3 for user john + __rvm_ruby ruby-1.9.3-p0 --user john --state absent + + +SEE ALSO +-------- +- `cdist-type(7) `_ +- `cdist-type__rvm(7) `_ +- `cdist-type__rvm_gemset(7) `_ +- `cdist-type__rvm_gem(7) `_ + + +COPYING +------- +Copyright \(C) 2012 Evax Software. Free use of this software is granted under +the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_ruby/man.text b/cdist/conf/type/__rvm_ruby/man.text deleted file mode 100644 index 6419a4d4..00000000 --- a/cdist/conf/type/__rvm_ruby/man.text +++ /dev/null @@ -1,54 +0,0 @@ -cdist-type__rvm_ruby(7) -======================= -Evax Software - - -NAME ----- -cdist-type__rvm_ruby - Manage ruby installations through rvm - - -DESCRIPTION ------------ -RVM is the Ruby enVironment Manager for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -user:: - The remote user account to use -state:: - Either "present" or "absent", defaults to "present". - -BOOLEAN PARAMETERS ------------------- -default: - Set the given version as default - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Install ruby 1.9.3 through rvm for user thelonious -__rvm_ruby ruby-1.9.3-p0 --user thelonious --state present - -# Install ruby 1.9.3 through rvm for user ornette and make it the default -__rvm_ruby ruby-1.9.3-p0 --user ornette --state present --default - -# Remove ruby 1.9.3 for user john -__rvm_ruby ruby-1.9.3-p0 --user john --state absent --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__rvm(7) -- cdist-type__rvm_gemset(7) -- cdist-type__rvm_gem(7) - - -COPYING -------- -Copyright \(C) 2012 Evax Software. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__ssh_authorized_key/man.text b/cdist/conf/type/__ssh_authorized_key/man.rst similarity index 61% rename from cdist/conf/type/__ssh_authorized_key/man.text rename to cdist/conf/type/__ssh_authorized_key/man.rst index b519222c..984ea51b 100644 --- a/cdist/conf/type/__ssh_authorized_key/man.text +++ b/cdist/conf/type/__ssh_authorized_key/man.rst @@ -1,13 +1,10 @@ cdist-type__ssh_authorized_key(7) ================================= +Manage a single ssh authorized key entry + Steven Armstrong -NAME ----- -cdist-type__ssh_authorized_key - manage a single ssh authorized key entry - - DESCRIPTION ----------- Manage a single authorized key entry in an authorized_key file. @@ -16,49 +13,49 @@ This type was created to be used by the __ssh_authorized_keys type. REQUIRED PARAMETERS ------------------- -file:: +file the authorized_keys file to which the given key should be added -key:: +key a string containing the ssh keytype, base 64 encoded key and optional trailing comment which shall be added to the given authorized_keys file. OPTIONAL PARAMETERS ------------------- -comment:: +comment explicit comment instead of the one which may be trailing the given key -option:: +option an option to set for this authorized_key entry. Can be specified multiple times. See sshd(8) for available options. -state:: +state if the given keys should be 'present' or 'absent', defaults to 'present'. EXAMPLES -------- --------------------------------------------------------------------------------- -__ssh_authorized_key some-id \ - --file "/home/user/.ssh/autorized_keys" \ - --key "$(cat ~/.ssh/id_rsa.pub)" +.. code-block:: sh -__ssh_authorized_key some-id \ - --file "/home/user/.ssh/autorized_keys" \ - --key "$(cat ~/.ssh/id_rsa.pub)" \ - --option 'command="/path/to/script"' \ - --option 'environment="FOO=bar"' \ - --comment 'one to rule them all' --------------------------------------------------------------------------------- + __ssh_authorized_key some-id \ + --file "/home/user/.ssh/autorized_keys" \ + --key "$(cat ~/.ssh/id_rsa.pub)" + + __ssh_authorized_key some-id \ + --file "/home/user/.ssh/autorized_keys" \ + --key "$(cat ~/.ssh/id_rsa.pub)" \ + --option 'command="/path/to/script"' \ + --option 'environment="FOO=bar"' \ + --comment 'one to rule them all' SEE ALSO -------- -- cdist-type(7) -- cdist__ssh_authorized_keys(7) +- `cdist-type(7) `_ +- `cdist__ssh_authorized_keys(7) `_ - sshd(8) COPYING diff --git a/cdist/conf/type/__ssh_authorized_keys/man.text b/cdist/conf/type/__ssh_authorized_keys/man.rst similarity index 51% rename from cdist/conf/type/__ssh_authorized_keys/man.text rename to cdist/conf/type/__ssh_authorized_keys/man.rst index d5523a6e..0907c2b3 100644 --- a/cdist/conf/type/__ssh_authorized_keys/man.text +++ b/cdist/conf/type/__ssh_authorized_keys/man.rst @@ -1,13 +1,10 @@ cdist-type__ssh_authorized_keys(7) ================================== +Manage ssh authorized_keys files + Steven Armstrong -NAME ----- -cdist-type__ssh_authorized_keys - manage ssh authorized_keys files - - DESCRIPTION ----------- Adds or removes ssh keys from a authorized_keys file. @@ -24,38 +21,38 @@ permissions work with ssh. REQUIRED PARAMETERS ------------------- -key:: +key the ssh key which shall be added to this authorized_keys file. Must be a string and can be specified multiple times. OPTIONAL PARAMETERS ------------------- -comment:: +comment explicit comment instead of the one which may be trailing the given key -file:: +file an alternative destination file, defaults to ~$owner/.ssh/authorized_keys -option:: +option an option to set for all created authorized_key entries. Can be specified multiple times. See sshd(8) for available options. -owner:: +owner the user owning the authorized_keys file, defaults to object_id. -state:: +state if the given keys should be 'present' or 'absent', defaults to 'present'. BOOLEAN PARAMETERS ------------------ -noparent:: +noparent don't create or change ownership and permissions of the directory containing the authorized_keys file -nofile:: +nofile don't manage existence, ownership and permissions of the the authorized_keys file @@ -63,51 +60,51 @@ nofile:: EXAMPLES -------- --------------------------------------------------------------------------------- -# add your ssh key to remote root's authorized_keys file -__ssh_authorized_keys root \ - --key "$(cat ~/.ssh/id_rsa.pub)" +.. code-block:: sh -# allow key to login as user-name -__ssh_authorized_keys user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." + # add your ssh key to remote root's authorized_keys file + __ssh_authorized_keys root \ + --key "$(cat ~/.ssh/id_rsa.pub)" -# allow key to login as user-name with options and expicit comment -__ssh_authorized_keys user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." \ - --option no-agent-forwarding \ - --option 'from="*.example.com"' \ - --comment 'backup server' + # allow key to login as user-name + __ssh_authorized_keys user-name \ + --key "ssh-rsa AXYZAAB3NzaC1yc2..." -# same as above, but with explicit owner and two keys -# note that the options are set for all given keys -__ssh_authorized_keys some-fancy-id \ - --owner user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." \ - --key "ssh-rsa AZXYAAB3NzaC1yc2..." \ - --option no-agent-forwarding \ - --option 'from="*.example.com"' \ - --comment 'backup server' + # allow key to login as user-name with options and expicit comment + __ssh_authorized_keys user-name \ + --key "ssh-rsa AXYZAAB3NzaC1yc2..." \ + --option no-agent-forwarding \ + --option 'from="*.example.com"' \ + --comment 'backup server' -# authorized_keys file in non standard location -__ssh_authorized_keys some-fancy-id \ - --file /etc/ssh/keys/user-name/authorized_keys \ - --owner user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." + # same as above, but with explicit owner and two keys + # note that the options are set for all given keys + __ssh_authorized_keys some-fancy-id \ + --owner user-name \ + --key "ssh-rsa AXYZAAB3NzaC1yc2..." \ + --key "ssh-rsa AZXYAAB3NzaC1yc2..." \ + --option no-agent-forwarding \ + --option 'from="*.example.com"' \ + --comment 'backup server' -# same as above, but directory and authorized_keys file is created elswhere -__ssh_authorized_keys some-fancy-id \ - --file /etc/ssh/keys/user-name/authorized_keys \ - --owner user-name \ - --noparent \ - --nofile \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." --------------------------------------------------------------------------------- + # authorized_keys file in non standard location + __ssh_authorized_keys some-fancy-id \ + --file /etc/ssh/keys/user-name/authorized_keys \ + --owner user-name \ + --key "ssh-rsa AXYZAAB3NzaC1yc2..." + + # same as above, but directory and authorized_keys file is created elswhere + __ssh_authorized_keys some-fancy-id \ + --file /etc/ssh/keys/user-name/authorized_keys \ + --owner user-name \ + --noparent \ + --nofile \ + --key "ssh-rsa AXYZAAB3NzaC1yc2..." SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - sshd(8) diff --git a/cdist/conf/type/__ssh_dot_ssh/man.text b/cdist/conf/type/__ssh_dot_ssh/man.rst similarity index 57% rename from cdist/conf/type/__ssh_dot_ssh/man.text rename to cdist/conf/type/__ssh_dot_ssh/man.rst index 2cd2001c..1b84c924 100644 --- a/cdist/conf/type/__ssh_dot_ssh/man.text +++ b/cdist/conf/type/__ssh_dot_ssh/man.rst @@ -1,11 +1,12 @@ cdist-type__ssh_dot_ssh(7) ========================== +Manage .ssh directory + Nico Schottelius NAME ---- -cdist-type__ssh_dot_ssh - Manage .ssh directory DESCRIPTION @@ -14,28 +15,29 @@ Adds or removes .ssh directory to a user home. This type is being used by __ssh_authorized_keys. + OPTIONAL PARAMETERS ------------------- -state:: +state if the directory should be 'present' or 'absent', defaults to 'present'. EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure root has ~/.ssh with the right permissions -__ssh_dot_ssh root +.. code-block:: sh -# Nico does not need ~/.ssh anymore -__ssh_dot_ssh nico --state absent --------------------------------------------------------------------------------- + # Ensure root has ~/.ssh with the right permissions + __ssh_dot_ssh root + + # Nico does not need ~/.ssh anymore + __ssh_dot_ssh nico --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__ssh_authorized_keys(7) +- `cdist-type(7) `_ +- `cdist-type__ssh_authorized_keys(7) `_ COPYING diff --git a/cdist/conf/type/__staged_file/man.text b/cdist/conf/type/__staged_file/man.rst similarity index 69% rename from cdist/conf/type/__staged_file/man.text rename to cdist/conf/type/__staged_file/man.rst index e94e491d..ed977b28 100644 --- a/cdist/conf/type/__staged_file/man.text +++ b/cdist/conf/type/__staged_file/man.rst @@ -1,13 +1,10 @@ cdist-type__staged_file(7) ========================== +Manage staged files + Steven Armstrong -NAME ----- -cdist-type__staged_file - manage staged files - - DESCRIPTION ----------- Manages a staged file that is downloaded on the server (the machine running @@ -16,17 +13,21 @@ cdist) and then deployed to the target host using the __file type. REQUIRED PARAMETERS ------------------- -source:: +source the URL from which to retreive the source file. e.g. - https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip - file:///path/to/local/file -cksum:: + + * https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip + * file:///path/to/local/file + +cksum the output of running the command: `cksum $source-file` - e.g. + e.g.:: + $ echo foobar > /tmp/foobar $ cksum /tmp/foobar 857691210 7 /tmp/foobar + If either checksum or file size has changed the file will be (re)fetched from the --source. The file name can be omitted and is ignored if given. @@ -34,19 +35,23 @@ cksum:: OPTIONAL PARAMETERS ------------------- -fetch-command:: +fetch-command the command used to fetch the staged file using printf formatting. Where a single %s will be replaced with the value of the given --source parameter. The --fetch-command is expected to output the fetched file to stdout. Defaults to 'curl -s -L "%s"'. -group:: + +group see cdist-type__file -owner:: + +owner see cdist-type__file -mode:: + +mode see cdist-type__file -prepare-command:: + +prepare-command the optional command used to prepare or preprocess the staged file for later use by the file type. If given, it must be a string in printf formatting where a single %s will @@ -59,42 +64,42 @@ prepare-command:: --prepare-command of 'unzip -p "%s"', the code `unzip -p "my-zip.zip"` will be executed in the folder containing the downloaded file my-zip.zip. A more complex example might be --prepare-command 'tar -xz "%s"; cat path/from/archive' -stage-dir:: +stage-dir the directory in which to store downloaded and prepared files. Defaults to '/var/tmp/cdist/__staged_file' -state:: + +state see cdist-type__file EXAMPLES -------- --------------------------------------------------------------------------------- -__staged_file /usr/local/bin/consul \ - --source file:///path/to/local/copy/consul \ - --cksum '428915666 15738724' \ - --state present \ - --group root \ - --owner root \ - --mode 755 +.. code-block:: sh -__staged_file /usr/local/bin/consul \ - --source https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip \ - --cksum '428915666 15738724' \ - --fetch-command 'curl -s -L "%s"' \ - --prepare-command 'unzip -p "%s"' \ - --state present \ - --group root \ - --owner root \ - --mode 755 + __staged_file /usr/local/bin/consul \ + --source file:///path/to/local/copy/consul \ + --cksum '428915666 15738724' \ + --state present \ + --group root \ + --owner root \ + --mode 755 --------------------------------------------------------------------------------- + __staged_file /usr/local/bin/consul \ + --source https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip \ + --cksum '428915666 15738724' \ + --fetch-command 'curl -s -L "%s"' \ + --prepare-command 'unzip -p "%s"' \ + --state present \ + --group root \ + --owner root \ + --mode 755 SEE ALSO -------- -- cdist-type(7) -- cdist-type__file(7) +- `cdist-type(7) `_ +- `cdist-type__file(7) `_ COPYING diff --git a/cdist/conf/type/__start_on_boot/man.text b/cdist/conf/type/__start_on_boot/man.rst similarity index 57% rename from cdist/conf/type/__start_on_boot/man.text rename to cdist/conf/type/__start_on_boot/man.rst index dfada6d8..2fb2c7d9 100644 --- a/cdist/conf/type/__start_on_boot/man.text +++ b/cdist/conf/type/__start_on_boot/man.rst @@ -1,53 +1,51 @@ cdist-type__start_on_boot(7) ============================ +Manage stuff to be started at boot + Nico Schottelius -NAME ----- -cdist-type__start_on_boot - Manage stuff to be started at boot - - DESCRIPTION ----------- This cdist type allows you to enable or disable stuff to be started at boot of your operating system. Warning: This type has not been tested intensively and is not fully -supported (i.e. *bsd are not implemented). +supported (i.e. \*BSD are not implemented). REQUIRED PARAMETERS ------------------- None. + OPTIONAL PARAMETERS ------------------- -state:: +state Either "present" or "absent", defaults to "present" -target_runlevel:: +target_runlevel Runlevel which should be modified, defaults to "default" (only used on gentoo systems). EXAMPLES -------- --------------------------------------------------------------------------------- -# Ensure snmpd is started at boot -__start_on_boot snmpd +.. code-block:: sh -# Same, but more explicit -__start_on_boot snmpd --state present + # Ensure snmpd is started at boot + __start_on_boot snmpd -# Ensure legacy configuration management will not be started -__start_on_boot puppet --state absent --------------------------------------------------------------------------------- + # Same, but more explicit + __start_on_boot snmpd --state present + + # Ensure legacy configuration management will not be started + __start_on_boot puppet --state absent SEE ALSO -------- -- cdist-type(7) -- cdist-type__process(7) +- `cdist-type(7) `_ +- `cdist-type__process(7) `_ COPYING diff --git a/cdist/conf/type/__timezone/man.text b/cdist/conf/type/__timezone/man.rst similarity index 56% rename from cdist/conf/type/__timezone/man.text rename to cdist/conf/type/__timezone/man.rst index 606a54da..083f4fe6 100644 --- a/cdist/conf/type/__timezone/man.text +++ b/cdist/conf/type/__timezone/man.rst @@ -1,13 +1,10 @@ cdist-type__timezone(7) ======================= +Allows one to configure the desired localtime timezone. + Ramon Salvadó -NAME ----- -cdist-type__timezone - Allows one to configure the desired localtime timezone. - - DESCRIPTION ----------- This type creates a symlink (/etc/localtime) to the selected timezone @@ -27,18 +24,18 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -#Set up Europe/Andorra as our timezone. -__timezone Europe/Andorra +.. code-block:: sh -#Set up US/Central as our timezone. -__timezone US/Central --------------------------------------------------------------------------------- + #Set up Europe/Andorra as our timezone. + __timezone Europe/Andorra + + #Set up US/Central as our timezone. + __timezone US/Central SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__update_alternatives/man.text b/cdist/conf/type/__update_alternatives/man.rst similarity index 61% rename from cdist/conf/type/__update_alternatives/man.text rename to cdist/conf/type/__update_alternatives/man.rst index 2bcc1874..477ee88c 100644 --- a/cdist/conf/type/__update_alternatives/man.text +++ b/cdist/conf/type/__update_alternatives/man.rst @@ -1,13 +1,10 @@ cdist-type__update_alternatives(7) ================================== +Configure alternatives + Nico Schottelius -NAME ----- -cdist-type__update_alternatives - Configure alternatives - - DESCRIPTION ----------- On Debian and alike systems update-alternatives(1) can be used @@ -17,23 +14,23 @@ One of the most common used targets is the "editor". REQUIRED PARAMETERS ------------------- -path:: +path Use this path for the given alternative EXAMPLES -------- --------------------------------------------------------------------------------- -# Setup vim as the default editor -__update_alternatives editor --path /usr/bin/vim.basic --------------------------------------------------------------------------------- +.. code-block:: sh + + # Setup vim as the default editor + __update_alternatives editor --path /usr/bin/vim.basic SEE ALSO -------- -- cdist-type(7) -- cdist-type__debconf_set_selections(7) +- `cdist-type(7) `_ +- `cdist-type__debconf_set_selections(7) `_ - update-alternatives(8) diff --git a/cdist/conf/type/__user/man.text b/cdist/conf/type/__user/man.rst similarity index 56% rename from cdist/conf/type/__user/man.text rename to cdist/conf/type/__user/man.rst index be70ec12..c690a559 100644 --- a/cdist/conf/type/__user/man.text +++ b/cdist/conf/type/__user/man.rst @@ -1,13 +1,10 @@ cdist-type__user(7) =================== +Manage users + Steven Armstrong -NAME ----- -cdist-type__user - Manage users - - DESCRIPTION ----------- This cdist type allows you to create or modify users on the target. @@ -20,63 +17,73 @@ None. OPTIONAL PARAMETERS ------------------- -state:: +state absent or present, defaults to present -comment:: + +comment see usermod(8) -home:: + +home see above -gid:: + +gid see above -password:: + +password see above -shell:: + +shell see above -uid:: + +uid see above + BOOLEAN PARAMETERS ------------------ -system:: +system see useradd(8), apply only on user create -create-home:: + +create-home see useradd(8), apply only on user create -remove-home:: + +remove-home see userdel(8), apply only on user delete MESSAGES -------- -mod:: +mod User is modified -add:: + +add New user added EXAMPLES -------- --------------------------------------------------------------------------------- -# Create user account for foobar with operating system default settings -__user foobar +.. code-block:: sh -# Same but with a different shell -__user foobar --shell /bin/zsh + # Create user account for foobar with operating system default settings + __user foobar -# Same but for a system account -__user foobar --system + # Same but with a different shell + __user foobar --shell /bin/zsh -# Set explicit uid and home -__user foobar --uid 1001 --shell /bin/zsh --home /home/foobar + # Same but for a system account + __user foobar --system -# Drop user if exists -__user foobar --state absent --------------------------------------------------------------------------------- + # Set explicit uid and home + __user foobar --uid 1001 --shell /bin/zsh --home /home/foobar + + # Drop user if exists + __user foobar --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - usermod(8) or pw(8) diff --git a/cdist/conf/type/__user_groups/man.text b/cdist/conf/type/__user_groups/man.rst similarity index 60% rename from cdist/conf/type/__user_groups/man.text rename to cdist/conf/type/__user_groups/man.rst index d45784fe..4458a6cf 100644 --- a/cdist/conf/type/__user_groups/man.text +++ b/cdist/conf/type/__user_groups/man.rst @@ -1,13 +1,10 @@ cdist-type__user_groups(7) ========================== +Manage user groups + Steven Armstrong -NAME ----- -cdist-type__user_groups - manage user groups - - DESCRIPTION ----------- Adds or removes a user from one or more groups. @@ -15,35 +12,35 @@ Adds or removes a user from one or more groups. REQUIRED PARAMETERS ------------------- -group:: +group the group to which this user should be added or removed. Can be specified multiple times. OPTIONAL PARAMETERS ------------------- -user:: +user the name of the user. Defaults to object_id -state:: +state absent or present. Defaults to present. EXAMPLES -------- --------------------------------------------------------------------------------- -__user_groups nginx --group webuser1 --group webuser2 +.. code-block:: sh -# remove user nginx from groups webuser2 -__user_groups nginx-webuser2 --user nginx \ - --group webuser2 --state absent --------------------------------------------------------------------------------- + __user_groups nginx --group webuser1 --group webuser2 + + # remove user nginx from groups webuser2 + __user_groups nginx-webuser2 --user nginx \ + --group webuser2 --state absent SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/cdist/conf/type/__yum_repo/man.rst b/cdist/conf/type/__yum_repo/man.rst new file mode 100644 index 00000000..396f271c --- /dev/null +++ b/cdist/conf/type/__yum_repo/man.rst @@ -0,0 +1,121 @@ +cdist-type__yum_repo(7) +======================= +Manage yum repositories + +Steven Armstrong + + +DESCRIPTION +----------- +For all undocumented parameters see yum.conf(5). + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +state + 'present' or 'absent'. Defaults to 'present' + +repositoryid + Defaults to __object_id. + +name + +baseurl + Can be specified multiple times. + +metalink + +mirrorlist + +gpgkey + Can be specified multiple times. + +gpgcakey + +gpgcheck + +exclude + +includepkgs + +failovermethod + +timeout + +http_caching + +retries + +throttle + +bandwidth + +sslcacert + +sslverify + +sslclientcert + +sslclientkey + +ssl_check_cert_permissions + +metadata_expire + +mirrorlist_expire + +proxy + +proxy_username + +proxy_password + +username + +password + +cost + + +BOOLEAN PARAMETERS +------------------ +enabled + +repo_gpgcheck + +disablegroups + ! enablegroups + +keepalive + +skip_if_unavailable + + +EXAMPLES +-------- + +.. code-block:: sh + + __yum_repo epel \ + --name 'Extra Packages for Enterprise Linux 6 - $basearch' \ + --mirrorlist 'https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch' \ + --failovermethod priority \ + --enabled \ + --gpgcheck 1 \ + --gpgkey https://fedoraproject.org/static/0608B895.txt + + +SEE ALSO +-------- +- `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2014 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__yum_repo/man.text b/cdist/conf/type/__yum_repo/man.text deleted file mode 100644 index 549cf336..00000000 --- a/cdist/conf/type/__yum_repo/man.text +++ /dev/null @@ -1,91 +0,0 @@ -cdist-type__yum_repo(7) -======================= -Steven Armstrong - - -NAME ----- -cdist-type__yum_repo - manage yum repositories - - -DESCRIPTION ------------ -For all undocumented parameters see yum.conf(5). - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state:: - 'present' or 'absent'. Defaults to 'present' -repositoryid:: - Defaults to __object_id. -name:: -baseurl:: - Can be specified multiple times. -metalink:: -mirrorlist:: -gpgkey:: - Can be specified multiple times. -gpgcakey:: -gpgcheck:: -exclude:: -includepkgs:: -failovermethod:: -timeout:: -http_caching:: -retries:: -throttle:: -bandwidth:: -sslcacert:: -sslverify:: -sslclientcert:: -sslclientkey:: -ssl_check_cert_permissions:: -metadata_expire:: -mirrorlist_expire:: -proxy:: -proxy_username:: -proxy_password:: -username:: -password:: -cost:: - - -BOOLEAN PARAMETERS ------------------- -enabled:: -repo_gpgcheck:: -disablegroups:: - ! enablegroups -keepalive:: -skip_if_unavailable:: - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -__yum_repo epel \ - --name 'Extra Packages for Enterprise Linux 6 - $basearch' \ - --mirrorlist 'https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch' \ - --failovermethod priority \ - --enabled \ - --gpgcheck 1 \ - --gpgkey https://fedoraproject.org/static/0608B895.txt --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -COPYING -------- -Copyright \(C) 2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__zypper_repo/man.rst b/cdist/conf/type/__zypper_repo/man.rst new file mode 100644 index 00000000..e3bc1d4f --- /dev/null +++ b/cdist/conf/type/__zypper_repo/man.rst @@ -0,0 +1,70 @@ +cdist-type__zypper_repo(7) +========================== +Repository management with zypper + +Daniel Heule + + +DESCRIPTION +----------- +zypper is usually used on the SuSE distribution to manage repositories. + + +REQUIRED PARAMETERS +------------------- +None + + +OPTIONAL PARAMETERS +------------------- +state + Either "present" or "absent" or "enabled" or "disabled", defaults to "present" + + * **present** - make sure that the repo is available, needs uri and repo_desc for all following states, the repo can be searched via repo_id or uri + * **absent** - drop the repo if found + + * **enabled** - a repo can have state disabled if installed via zypper service (ris), in this case, you can enable the repo + * **disabled** - instead of absent (drop), a repo can also set to disabled, which makes it inaccessible + +uri + If supplied, use the uri and not the object id as repo uri. + +repo_desc + If supplied, use the description and not the object id as repo description, only used if the state is present and the repo has to be created + +repo_id + If supplied, use the id and not the object id as repo id, can be used with state absent, enabled and disabled + + +EXAMPLES +-------- + +.. code-block:: sh + + # Ensure testrepo in installed + __zypper_repo testrepo --state present --uri http://url.to.your.repo/with/path + + # Drop repo by repo uri + __zypper_repo testrepo --state absent --uri http://url.to.your.repo/with/path + + # Drop repo by id number (attention: repos are always numbered from 1 to max) + __zypper_repo testrepo --state absent --repo_id 1 + + # enable repo by id + __zypper_repo testrepo2 --state enabled --repo_id 2 + + # enable repo by uri + __zypper_repo testrepo3 --state enabled --uri http://url.to.your.repo/with/path + + # disable a repo works like enabling it + __zypper_repo testrepo4 --state disabled --repo_id 4 + + +SEE ALSO +-------- +- `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2013 Daniel Heule. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__zypper_repo/man.text b/cdist/conf/type/__zypper_repo/man.text deleted file mode 100644 index a1dd9565..00000000 --- a/cdist/conf/type/__zypper_repo/man.text +++ /dev/null @@ -1,73 +0,0 @@ -cdist-type__zypper_repo(7) -========================== -Daniel Heule - - -NAME ----- -cdist-type__zypper_repo - repository management with zypper - - -DESCRIPTION ------------ -zypper is usually used on the SuSE distribution to manage repositories. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -state:: - Either "present" or "absent" or "enabled" or "disabled", defaults to "present" + - #present# - make sure that the repo is available, needs uri and repo_desc + - for all following states, the repo can be searched via repo_id or uri + - #absent# - drop the repo if found + - #enabled# - a repo can have state disabled if installed via zypper service (ris), in this case, you can enable the repo + - #disabled# - instead of absent (drop), a repo can also set to disabled, which makes it inaccessible + - -uri:: - If supplied, use the uri and not the object id as repo uri. - -repo_desc:: - If supplied, use the description and not the object id as repo description, only used if the state is present and the repo has to be created - -repo_id:: - If supplied, use the id and not the object id as repo id, can be used with state absent, enabled and disabled - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Ensure testrepo in installed -__zypper_repo testrepo --state present --uri http://url.to.your.repo/with/path - -# Drop repo by repo uri -__zypper_repo testrepo --state absent --uri http://url.to.your.repo/with/path - -# Drop repo by id number (attention: repos are always numbered from 1 to max) -__zypper_repo testrepo --state absent --repo_id 1 - -# enable repo by id -__zypper_repo testrepo2 --state enabled --repo_id 2 - -# enable repo by uri -__zypper_repo testrepo3 --state enabled --uri http://url.to.your.repo/with/path - -# disable a repo works like enabling it -__zypper_repo testrepo4 --state disabled --repo_id 4 --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -COPYING -------- -Copyright \(C) 2013 Daniel Heule. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__zypper_service/man.rst b/cdist/conf/type/__zypper_service/man.rst new file mode 100644 index 00000000..377d30e1 --- /dev/null +++ b/cdist/conf/type/__zypper_service/man.rst @@ -0,0 +1,63 @@ +cdist-type__zypper_service(7) +============================= +Service management with zypper + +Daniel Heule + + +DESCRIPTION +----------- +zypper is usually used on SuSE systems to manage services. + + +REQUIRED PARAMETERS +------------------- +uri + Uri of the service + + +OPTIONAL PARAMETERS +------------------- +service_desc + If supplied, use the service_desc and not the object id as descritpion for the service. + +state + Either "present" or "absent", defaults to "present" + +type + Defaults to "ris", the standard type of services at SLES11. For other values, see manpage of zypper. + + +BOOLEAN PARAMETERS +------------------ +remove-all-other-services + Drop all other services found on the target host before adding the new one. + +remove-all-repos + If supplied, remove all existing repos prior to setup the new service. + + +EXAMPLES +-------- + +.. code-block:: sh + + # Ensure that internal SLES11 SP3 RIS is in installed and all other services and repos are discarded + __zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --uri "http://path/to/your/ris/dir" --remove-all-other-services --remove-all-repos + + # Ensure that internal SLES11 SP3 RIS is in installed, no changes to ohter services or repos + __zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --uri "http://path/to/your/ris/dir" + + # Drop service by uri, no changes to ohter services or repos + __zypper_service INTERNAL_SLES11_SP3 --state absent --uri "http://path/to/your/ris/dir" + + +SEE ALSO +-------- +- `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2013 Daniel Heule. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__zypper_service/man.text b/cdist/conf/type/__zypper_service/man.text deleted file mode 100644 index b6bba660..00000000 --- a/cdist/conf/type/__zypper_service/man.text +++ /dev/null @@ -1,67 +0,0 @@ -cdist-type__zypper_service(7) -============================= -Daniel Heule - - -NAME ----- -cdist-type__zypper_service - service management with zypper - - -DESCRIPTION ------------ -zypper is usually used on SuSE systems to manage services. - - -REQUIRED PARAMETERS -------------------- -uri:: - Uri of the service - - -OPTIONAL PARAMETERS -------------------- -service_desc:: - If supplied, use the service_desc and not the object id as descritpion for the service. - -state:: - Either "present" or "absent", defaults to "present" - -type:: - Defaults to "ris", the standard type of services at SLES11. For other values, see manpage of zypper. - - -BOOLEAN PARAMETERS ------------------- -remove-all-other-services:: - Drop all other services found on the target host before adding the new one. - -remove-all-repos:: - If supplied, remove all existing repos prior to setup the new service. - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Ensure that internal SLES11 SP3 RIS is in installed and all other services and repos are discarded -__zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --uri "http://path/to/your/ris/dir" --remove-all-other-services --remove-all-repos - -# Ensure that internal SLES11 SP3 RIS is in installed, no changes to ohter services or repos -__zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --uri "http://path/to/your/ris/dir" - -# Drop service by uri, no changes to ohter services or repos -__zypper_service INTERNAL_SLES11_SP3 --state absent --uri "http://path/to/your/ris/dir" - --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -COPYING -------- -Copyright \(C) 2013 Daniel Heule. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/docs/man/Makefile b/docs/man/Makefile new file mode 100644 index 00000000..721acaf6 --- /dev/null +++ b/docs/man/Makefile @@ -0,0 +1,230 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) + $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " epub3 to make an epub3" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + @echo " dummy to check syntax errors of document sources" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR)/* + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cdist-docs.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cdist-docs.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/cdist-docs" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cdist-docs" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: epub3 +epub3: + $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 + @echo + @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +.PHONY: dummy +dummy: + $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy + @echo + @echo "Build finished. Dummy builder generates no files." diff --git a/docs/man/cdist-reference.text.sh b/docs/man/cdist-reference.rst.sh similarity index 85% rename from docs/man/cdist-reference.text.sh rename to docs/man/cdist-reference.rst.sh index 012bcf5d..ae73169e 100755 --- a/docs/man/cdist-reference.text.sh +++ b/docs/man/cdist-reference.rst.sh @@ -37,11 +37,9 @@ exec > "$dest" cat << eof cdist-reference(7) ================== -Nico Schottelius +Variable, path and type reference for cdist -NAME ----- -cdist-reference - Variable, path and type reference for cdist +Nico Schottelius EXPLORERS @@ -60,97 +58,97 @@ cat << eof PATHS ----- -\$HOME/.cdist:: +\$HOME/.cdist The standard cdist configuration directory relative to your home directory This is usually the place you want to store your site specific configuration -cdist/conf/:: +cdist/conf/ The distribution configuration directory This contains types and explorers to be used -confdir:: +confdir Cdist will use all available configuration directories and create a temporary confdir containing links to the real configuration directories. This way it is possible to merge configuration directories. By default it consists of everything in \$HOME/.cdist and cdist/conf/. For more details see cdist(1) -confdir/manifest/init:: +confdir/manifest/init This is the central entry point. It is an executable (+x bit set) shell script that can use values from the explorers to decide which configuration to create for the specified target host. Its intent is to used to define mapping from configurations to hosts. -confdir/manifest/*:: +confdir/manifest/* All other files in this directory are not directly used by cdist, but you can separate configuration mappings, if you have a lot of code in the conf/manifest/init file. This may also be helpful to have different admins maintain different groups of hosts. -confdir/explorer/:: +confdir/explorer/ Contains explorers to be run on the target hosts, see cdist-explorer(7). -confdir/type/:: +confdir/type/ Contains all available types, which are used to provide some kind of functionality. See cdist-type(7). -confdir/type//:: +confdir/type// Home of the type . This directory is referenced by the variable __type (see below). -confdir/type//man.text:: - Manpage in Asciidoc format (required for inclusion into upstream) +confdir/type//man.rst + Manpage in reStructuredText format (required for inclusion into upstream) -confdir/type//manifest:: +confdir/type//manifest Used to generate additional objects from a type. -confdir/type//gencode-local:: +confdir/type//gencode-local Used to generate code to be executed on the source host -confdir/type//gencode-remote:: +confdir/type//gencode-remote Used to generate code to be executed on the target host -confdir/type//parameter/required:: +confdir/type//parameter/required Parameters required by type, \n separated list. -confdir/type//parameter/optional:: +confdir/type//parameter/optional Parameters optionally accepted by type, \n separated list. -confdir/type//parameter/default/*:: +confdir/type//parameter/default/* Default values for optional parameters. Assuming an optional parameter name of 'foo', it's default value would be read from the file confdir/type//parameter/default/foo. -confdir/type//parameter/boolean:: +confdir/type//parameter/boolean Boolean parameters accepted by type, \n separated list. -confdir/type//explorer:: +confdir/type//explorer Location of the type specific explorers. This directory is referenced by the variable __type_explorer (see below). See cdist-explorer(7). -confdir/type//files:: +confdir/type//files This directory is reserved for user data and will not be used by cdist at any time. It can be used for storing supplementary files (like scripts to act as a template or configuration files). -out/:: +out/ This directory contains output of cdist and is usually located in a temporary directory and thus will be removed after the run. This directory is referenced by the variable __global (see below). -out/explorer:: +out/explorer Output of general explorers. -out/object:: +out/object Objects created for the host. -out/object/:: +out/object/ Contains all object specific information. This directory is referenced by the variable __object (see below). -out/object//explorers:: +out/object//explorers Output of type specific explorers, per object. TYPES @@ -159,14 +157,15 @@ The following types are available: eof -for type in man7/cdist-type__*.text; do +for type in man7/cdist-type__*.rst; do no_dir="${type#man7/}"; no_type="${no_dir#cdist-type}"; - name="${no_type%.text}"; + name="${no_type%.rst}"; name_no_underline="$(echo $name | sed 's/^__/\\__/g')" - man="${no_dir%.text}(7)" + manref="${no_dir%.rst}" + man="${manref}(7)" - echo "- $name_no_underline" "($man)" + echo "- $name_no_underline" "(\`${man} <${manref}.html>\`_)" done cat << eof @@ -177,14 +176,14 @@ OBJECTS For object to object communication and tests, the following paths are usable within a object directory: -files:: +files This directory is reserved for user data and will not be used by cdist at any time. It can be used freely by the type (for instance to store template results). -changed:: +changed This empty file exists in an object directory, if the object has code to be executed (either remote or local) -stdin:: +stdin This file exists and contains data, if data was provided on stdin when the type was called. @@ -193,40 +192,40 @@ ENVIRONMENT VARIABLES (FOR READING) ----------------------------------- The following environment variables are exported by cdist: -__explorer:: +__explorer Directory that contains all global explorers. Available for: initial manifest, explorer, type explorer, shell -__manifest:: +__manifest Directory that contains the initial manifest. Available for: initial manifest, type manifest, shell -__global:: +__global Directory that contains generic output like explorer. Available for: initial manifest, type manifest, type gencode, shell -__messages_in:: +__messages_in File to read messages from. Available for: initial manifest, type manifest, type gencode -__messages_out:: +__messages_out File to write messages. Available for: initial manifest, type manifest, type gencode -__object:: +__object Directory that contains the current object. Available for: type manifest, type explorer, type gencode and code scripts -__object_id:: +__object_id The type unique object id. Available for: type manifest, type explorer, type gencode and code scripts Note: The leading and the trailing "/" will always be stripped (caused by the filesystem database and ensured by the core). Note: Double slashes ("//") will not be fixed and result in an error. -__object_name:: +__object_name The full qualified name of the current object. Available for: type manifest, type explorer, type gencode -__target_host:: +__target_host The host we are deploying to. Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell -__type:: +__type Path to the current type. Available for: type manifest, type gencode -__type_explorer:: +__type_explorer Directory that contains the type explorers. Available for: type explorer @@ -234,30 +233,30 @@ ENVIRONMENT VARIABLES (FOR WRITING) ----------------------------------- The following environment variables influence the behaviour of cdist: -require:: +require Setup dependencies between objects (see cdist-manifest(7)) -CDIST_LOCAL_SHELL:: +CDIST_LOCAL_SHELL Use this shell locally instead of /bin/sh to execute scripts -CDIST_REMOTE_SHELL:: +CDIST_REMOTE_SHELL Use this shell remotely instead of /bin/sh to execute scripts -CDIST_OVERRIDE:: +CDIST_OVERRIDE Allow overwriting type parameters (see cdist-manifest(7)) -CDIST_ORDER_DEPENDENCY:: +CDIST_ORDER_DEPENDENCY Create dependencies based on the execution order (see cdist-manifest(7)) -CDIST_REMOTE_EXEC:: +CDIST_REMOTE_EXEC Use this command for remote execution (should behave like ssh) -CDIST_REMOTE_COPY:: +CDIST_REMOTE_COPY Use this command for remote copy (should behave like scp) SEE ALSO -------- -- cdist(1) +- \`cdist(1) <../man1/cdist.html>\`_ COPYING diff --git a/docs/man/conf.py b/docs/man/conf.py new file mode 100644 index 00000000..0cf8bc61 --- /dev/null +++ b/docs/man/conf.py @@ -0,0 +1,305 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# cdist-docs documentation build configuration file, created by +# sphinx-quickstart on Fri May 6 21:45:28 2016. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +source_suffix = ['.rst'] + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'cdist' +#copyright = '2016, Darko Poljak' +#author = 'Darko Poljak' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +import cdist.version +version = cdist.version.VERSION +# The full version, including alpha/beta/rc tags. +release = version + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +import sphinx_rtd_theme +html_theme = 'sphinx_rtd_theme' +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. +# " v documentation" by default. +#html_title = 'cdist-docs v0.0.1' + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +#html_last_updated_fmt = None + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None +#html_file_suffix = "" + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' +#html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +#html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +#html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'cdistdoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', + +# Latex figure (float) alignment +#'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'cdist.tex', 'cdist Documentation', + 'Darko Poljak', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +mandir = os.path.dirname(os.path.realpath(__file__)) +man_pages = [] +for mansubdir in ('man1', 'man7'): + for root, dirs, files in os.walk(os.path.join(mandir, mansubdir)): + for fname in files: + froot, fext = os.path.splitext(fname) + if fext == '.rst': + man_page = (os.path.join(mansubdir, froot), froot, '', + [], 7) + man_pages.append(man_page) + +#man_pages = [ +# ('cdist-type', 'cdist-type', 'cdist-type documentation', +# [author], 1), +# ('man7/cdist-type__file', 'cdist-type__file', +# '', [], 1), +# ('cdist-type__directory', 'cdist-type__directory', +# 'cdist-type__directory documentation', [author], 1), +#] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'cdist', 'cdist Documentation', + '', 'cdist', 'Configuration management system.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False diff --git a/docs/man/index.rst b/docs/man/index.rst new file mode 100644 index 00000000..f0638779 --- /dev/null +++ b/docs/man/index.rst @@ -0,0 +1,12 @@ +Welcome to cdist documentation +============================== + +Contents: + +.. toctree:: + :titlesonly: + :glob: + :numbered: + + man1/* + man7/* diff --git a/docs/man/man1/cdist.text b/docs/man/man1/cdist.rst similarity index 60% rename from docs/man/man1/cdist.text rename to docs/man/man1/cdist.rst index e29ae3ae..0178215c 100644 --- a/docs/man/man1/cdist.text +++ b/docs/man/man1/cdist.rst @@ -1,22 +1,22 @@ cdist(1) ======== +Usable Configuration Management + Nico Schottelius -NAME ----- -cdist - Usable Configuration Management - - SYNOPSIS -------- -cdist [-h] [-d] [-v] [-V] {banner,config,shell} ... -cdist banner [-h] [-d] [-v] +:: -cdist config [-h] [-d] [-V] [-c CONF_DIR] [-i MANIFEST] [-p] [-s] host [host ...] + cdist [-h] [-d] [-v] [-V] {banner,config,shell} ... -cdist shell [-h] [-d] [-v] [-s SHELL] + cdist banner [-h] [-d] [-v] + + cdist config [-h] [-d] [-V] [-c CONF_DIR] [-i MANIFEST] [-p] [-s] host [host ...] + + cdist shell [-h] [-d] [-v] [-s SHELL] DESCRIPTION @@ -28,16 +28,20 @@ GENERAL ------- All commands accept the following options: --d, --debug:: +.. option:: -d, --debug + Set log level to debug --h, --help:: +.. option:: -h, --help + Show the help screen --v, --verbose:: +.. option:: -v, --verbose + Set log level to info, be more verbose --V, --version:: +.. option:: -V, --version + Show version and exit @@ -51,10 +55,12 @@ CONFIG ------ Configure one or more hosts --h, --help:: +.. option:: -h, --help + Show the help screen --c CONF_DIR, --conf-dir CONF_DIR:: +.. option:: -c CONF_DIR, --conf-dir CONF_DIR + Add a configuration directory. Can be specified multiple times. If configuration directories contain conflicting types, explorers or manifests, then the last one found is used. Additionally this can also @@ -63,19 +69,24 @@ Configure one or more hosts --conf-dir argument have higher precedence over those set through the environment variable. --i MANIFEST, --initial-manifest MANIFEST:: +.. option:: -i MANIFEST, --initial-manifest MANIFEST + Path to a cdist manifest or - to read from stdin --p, --parallel:: +.. option:: -p, --parallel + Operate on multiple hosts in parallel --s, --sequential:: +.. option:: -s, --sequential + Operate on multiple hosts sequentially ---remote-copy REMOTE_COPY:: +.. option:: --remote-copy REMOTE_COPY + Command to use for remote copy (should behave like scp) ---remote-exec REMOTE_EXEC:: +.. option:: --remote-exec REMOTE_EXEC + Command to use for remote execution (should behave like ssh) SHELL @@ -85,79 +96,78 @@ to the types as commands. It can be thought as an "interactive manifest" environment. See below for example usage. Its primary use is for debugging type parameters. --s/--shell:: +.. option:: -s/--shell + Select shell to use, defaults to current shell EXAMPLES -------- --------------------------------------------------------------------------------- -# Configure ikq05.ethz.ch with debug enabled -% cdist config -d ikq05.ethz.ch +.. code-block:: sh -# Configure hosts in parallel and use a different configuration directory -% cdist config -c ~/p/cdist-nutzung \ - -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch + # Configure ikq05.ethz.ch with debug enabled + % cdist config -d ikq05.ethz.ch -# Use custom remote exec / copy commands -% cdist config --remote-exec /path/to/my/remote/exec \ - --remote-copy /path/to/my/remote/copy \ - -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch + # Configure hosts in parallel and use a different configuration directory + % cdist config -c ~/p/cdist-nutzung \ + -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch -# Display banner -cdist banner + # Use custom remote exec / copy commands + % cdist config --remote-exec /path/to/my/remote/exec \ + --remote-copy /path/to/my/remote/copy \ + -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch -# Show help -% cdist --help + # Display banner + cdist banner -# Show Version -% cdist --version + # Show help + % cdist --help -# Enter a shell that has access to emulated types -% cdist shell -% __git -usage: __git --source SOURCE [--state STATE] [--branch BRANCH] - [--group GROUP] [--owner OWNER] [--mode MODE] object_id + # Show Version + % cdist --version - --------------------------------------------------------------------------------- + # Enter a shell that has access to emulated types + % cdist shell + % __git + usage: __git --source SOURCE [--state STATE] [--branch BRANCH] + [--group GROUP] [--owner OWNER] [--mode MODE] object_id ENVIRONMENT ----------- -TMPDIR, TEMP, TMP:: +TMPDIR, TEMP, TMP Setup the base directory for the temporary directory. See http://docs.python.org/py3k/library/tempfile.html for more information. This is rather useful, if the standard directory used does not allow executables. -CDIST_LOCAL_SHELL:: +CDIST_LOCAL_SHELL Selects shell for local script execution, defaults to /bin/sh -CDIST_REMOTE_SHELL:: +CDIST_REMOTE_SHELL Selects shell for remote scirpt execution, defaults to /bin/sh -CDIST_REMOTE_EXEC:: +CDIST_REMOTE_EXEC Use this command for remote execution (should behave like ssh) -CDIST_REMOTE_COPY:: +CDIST_REMOTE_COPY Use this command for remote copy (should behave like scp) EXIT STATUS ----------- The following exit values shall be returned: -0:: +0 Successful completion -1:: +1 One or more host configurations failed SEE ALSO -------- -- cdist(7) -- cdist-reference(7) +- `cdist-type(7) <../man7/cdist-type.html>`_ +- `cdist-reference(7) <../man7/cdist-reference.html>`_ COPYING diff --git a/docs/man/man7/cdist-best-practice.rst b/docs/man/man7/cdist-best-practice.rst new file mode 100644 index 00000000..13d65cce --- /dev/null +++ b/docs/man/man7/cdist-best-practice.rst @@ -0,0 +1,238 @@ +cdist-best-practice(7) +====================== +Practices used in real environments + +Nico Schottelius + + +PASSWORDLESS CONNECTIONS +------------------------ +It is recommended to run cdist with public key authentication. +This requires a private/public key pair and the entry +"PermitRootLogin without-password" in the sshd server. +See sshd_config(5) and ssh-keygen(1). + + +SPEEDING UP SSH CONNECTIONS +--------------------------- +When connecting to a new host, the initial delay with ssh connections +is pretty big. You can work around this by +"sharing of multiple sessions over a single network connection" +(quote from ssh_config(5)). The following code is suitable for +inclusion into your ~/.ssh/config:: + + Host * + ControlPath ~/.ssh/master-%l-%r@%h:%p + ControlMaster auto + ControlPersist 10 + + +SPEEDING UP SHELL EXECUTION +---------------------------- +On the source host, ensure that /bin/sh is *not* bash: bash is quite slow for +script execution. Instead, you could use dash after installing it:: + + ln -sf /bin/dash /bin/sh + + +MULTI MASTER OR ENVIRONMENT SETUPS +---------------------------------- +If you plan to distribute cdist among servers or use different +environments, you can do so easily with the included version +control git. For instance if you plan to use the typical three +environments production, integration and development, you can +realise this with git branches:: + + # Go to cdist checkout + cd /path/to/cdist + + # Create branches + git branch development + git branch integration + git branch production + + # Make use of a branch, for instance production + git checkout production + +Similar if you want to have cdist checked out at multiple machines, +you can clone it multiple times:: + + machine-a % git clone git://your-git-server/cdist + machine-b % git clone git://your-git-server/cdist + + +SEPERATING WORK BY GROUPS +------------------------- +If you are working with different groups on one cdist-configuration, +you can delegate to other manifests and have the groups edit only +their manifests. You can use the following snippet in +**conf/manifests/init**:: + + # Include other groups + sh -e "$__manifest/systems" + + sh -e "$__manifest/cbrg" + + +MAINTAINING MULTIPLE CONFIGURATIONS +----------------------------------- +When you need to manage multiple sites with cdist, like company_a, company_b +and private for instance, you can easily use git for this purpose. +Including a possible common base that is reused across the different sites:: + + # create branches + git branch company_a company_b common private + + # make stuff for company a + git checkout company_a + # work, commit, etc. + + # make stuff for company b + git checkout company_b + # work, commit, etc. + + # make stuff relevant for all sites + git checkout common + # work, commit, etc. + + # change to private and include latest common stuff + git checkout private + git merge common + + +The following **.git/config** is taken from a a real world scenario:: + + # Track upstream, merge from time to time + [remote "upstream"] + url = git://git.schottelius.org/cdist + fetch = +refs/heads/*:refs/remotes/upstream/* + + # Same as upstream, but works when being offline + [remote "local"] + fetch = +refs/heads/*:refs/remotes/local/* + url = /home/users/nico/p/cdist + + # Remote containing various ETH internal branches + [remote "eth"] + url = sans.ethz.ch:/home/services/sans/git/cdist-eth + fetch = +refs/heads/*:refs/remotes/eth/* + + # Public remote that contains my private changes to cdist upstream + [remote "nico"] + url = git.schottelius.org:/home/services/git/cdist-nico + fetch = +refs/heads/*:refs/remotes/nico/* + + # The "nico" branch will be synced with the remote nico, branch master + [branch "nico"] + remote = nico + merge = refs/heads/master + + # ETH stable contains rock solid configurations used in various places + [branch "eth-stable"] + remote = eth + merge = refs/heads/stable + +Have a look at git-remote(1) to adjust the remote configuration, which allows + + +MULTIPLE DEVELOPERS WITH DIFFERENT TRUST +---------------------------------------- +If you are working in an environment that requires different people to +work on the same configuration, but having different privileges, you can +implement this scenario with a gateway host and sudo: + +- Create a dedicated user (for instance **cdist**) +- Setup the ssh-pubkey for this user that has the right to configure all hosts +- Create a wrapper to update the cdist configuration in ~cdist/cdist +- Allow every developer to execute this script via sudo as the user cdist +- Allow run of cdist as user cdist on specific hosts on a per user/group base + + - f.i. nico ALL=(ALL) NOPASSWD: /home/cdist/bin/cdist config hostabc + +For more details consult sudoers(5) + + +TEMPLATING +---------- +* create directory files/ in your type (convention) +* create the template as an executable file like files/basic.conf.sh, it will output text using shell variables for the values + +.. code-block:: sh + + #!/bin/sh + # in the template, use cat << eof (here document) to output the text + # and use standard shell variables in the template + # output everything in the template script to stdout + cat << EOF + server { + listen 80; + server_name $SERVERNAME; + root $ROOT; + + access_log /var/log/nginx/$SERVERNAME_access.log + error_log /var/log/nginx/$SERVERNAME_error.log + } + EOF + +* in the manifest, export the relevant variables and add the following lines in your manifest: + +.. code-block:: console + + # export variables needed for the template + export SERVERNAME='test" + export ROOT='/var/www/test' + # render the template + mkdir -p "$__object/files" + "$__type/files/basic.conf.sh" > "$__object/files/basic.conf" + # send the rendered template + __file /etc/nginx/sites-available/test.conf \ + --state present + --source "$__object/files/basic.conf" + + +TESTING A NEW TYPE +------------------ +If you want to test a new type on a node, you can tell cdist to only use an +object of this type: Use the '--initial-manifest' parameter +with - (stdin) as argument and feed object into stdin +of cdist: + +.. code-block:: sh + + # Singleton type without parameter + echo __ungleich_munin_server | cdist --initial-manifest - munin.panter.ch + + # Singleton type with parameter + echo __ungleich_munin_node --allow 1.2.3.4 | \ + cdist --initial-manifest - rails-19.panter.ch + + # Normal type + echo __file /tmp/stdintest --mode 0644 | \ + cdist --initial-manifest - cdist-dev-01.ungleich.ch + + +OTHER CONTENT IN CDIST REPOSITORY +--------------------------------- +Usually the cdist repository contains all configuration +items. Sometimes you may have additional resources that +you would like to store in your central configuration +repositiory (like password files from KeepassX, +Libreoffice diagrams, etc.). + +It is recommended to use a subfolder named "non-cdist" +in the repository for such content: It allows you to +easily distinguish what is used by cdist and what not +and also to store all important files in one +repository. + + +SEE ALSO +-------- +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-tutorial(7) `_ + + +COPYING +------- +Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/docs/man/man7/cdist-best-practice.text b/docs/man/man7/cdist-best-practice.text deleted file mode 100644 index 953b8272..00000000 --- a/docs/man/man7/cdist-best-practice.text +++ /dev/null @@ -1,247 +0,0 @@ -cdist-best-practice(7) -====================== -Nico Schottelius - -NAME ----- -cdist-best-practice - Practices used in real environments - - -PASSWORDLESS CONNECTIONS ------------------------- -It is recommended to run cdist with public key authentication. -This requires a private/public key pair and the entry -"PermitRootLogin without-password" in the sshd server. -See sshd_config(5) and ssh-keygen(1). - - -SPEEDING UP SSH CONNECTIONS ---------------------------- -When connecting to a new host, the initial delay with ssh connections -is pretty big. You can work around this by -"sharing of multiple sessions over a single network connection" -(quote from ssh_config(5)). The following code is suitable for -inclusion into your ~/.ssh/config: - --------------------------------------------------------------------------------- -Host * - ControlPath ~/.ssh/master-%l-%r@%h:%p - ControlMaster auto - ControlPersist 10 --------------------------------------------------------------------------------- - -SPEEDING UP SHELL EXECUTION ----------------------------- -On the source host, ensure that /bin/sh is *not* bash: bash is quite slow for -script execution. Instead, you could use dash after installing it: - --------------------------------------------------------------------------------- -ln -sf /bin/dash /bin/sh --------------------------------------------------------------------------------- - - -MULTI MASTER OR ENVIRONMENT SETUPS ----------------------------------- -If you plan to distribute cdist among servers or use different -environments, you can do so easily with the included version -control git. For instance if you plan to use the typical three -environments production, integration and development, you can -realise this with git branches: - --------------------------------------------------------------------------------- -# Go to cdist checkout -cd /path/to/cdist - -# Create branches -git branch development -git branch integration -git branch production - -# Make use of a branch, for instance production -git checkout production --------------------------------------------------------------------------------- - -Similar if you want to have cdist checked out at multiple machines, -you can clone it multiple times: - --------------------------------------------------------------------------------- -machine-a % git clone git://your-git-server/cdist -machine-b % git clone git://your-git-server/cdist --------------------------------------------------------------------------------- - -SEPERATING WORK BY GROUPS -------------------------- -If you are working with different groups on one cdist-configuration, -you can delegate to other manifests and have the groups edit only -their manifests. You can use the following snippet in -**conf/manifests/init**: - --------------------------------------------------------------------------------- -# Include other groups -sh -e "$__manifest/systems" - -sh -e "$__manifest/cbrg" --------------------------------------------------------------------------------- - - -MAINTAINING MULTIPLE CONFIGURATIONS ------------------------------------ -When you need to manage multiple sites with cdist, like company_a, company_b -and private for instance, you can easily use git for this purpose. -Including a possible common base that is reused across the different sites: - --------------------------------------------------------------------------------- -# create branches -git branch company_a company_b common private - -# make stuff for company a -git checkout company_a -# work, commit, etc. - -# make stuff for company b -git checkout company_b -# work, commit, etc. - -# make stuff relevant for all sites -git checkout common -# work, commit, etc. - -# change to private and include latest common stuff -git checkout private -git merge common --------------------------------------------------------------------------------- - -The following **.git/config** is taken from a a real world scenario: --------------------------------------------------------------------------------- -# Track upstream, merge from time to time -[remote "upstream"] - url = git://git.schottelius.org/cdist - fetch = +refs/heads/*:refs/remotes/upstream/* - -# Same as upstream, but works when being offline -[remote "local"] - fetch = +refs/heads/*:refs/remotes/local/* - url = /home/users/nico/p/cdist - -# Remote containing various ETH internal branches -[remote "eth"] - url = sans.ethz.ch:/home/services/sans/git/cdist-eth - fetch = +refs/heads/*:refs/remotes/eth/* - -# Public remote that contains my private changes to cdist upstream -[remote "nico"] - url = git.schottelius.org:/home/services/git/cdist-nico - fetch = +refs/heads/*:refs/remotes/nico/* - -# The "nico" branch will be synced with the remote nico, branch master -[branch "nico"] - remote = nico - merge = refs/heads/master - -# ETH stable contains rock solid configurations used in various places -[branch "eth-stable"] - remote = eth - merge = refs/heads/stable --------------------------------------------------------------------------------- - -Have a look at git-remote(1) to adjust the remote configuration, which allows - - -MULTIPLE DEVELOPERS WITH DIFFERENT TRUST ----------------------------------------- -If you are working in an environment that requires different people to -work on the same configuration, but having different privileges, you can -implement this scenario with a gateway host and sudo: - -- Create a dedicated user (for instance **cdist**) -- Setup the ssh-pubkey for this user that has the right to configure all hosts -- Create a wrapper to update the cdist configuration in ~cdist/cdist -- Allow every developer to execute this script via sudo as the user cdist -- Allow run of cdist as user cdist on specific hosts on a per user/group base - - f.i. nico ALL=(ALL) NOPASSWD: /home/cdist/bin/cdist config hostabc - -For more details consult sudoers(5) - -TEMPLATING ----------- -* create directory files/ in your type (convention) -* create the template as an executable file like files/basic.conf.sh, it will output text using shell variables for the values - --------------------------------------------------------------------------------- -#!/bin/sh -# in the template, use cat << eof (here document) to output the text -# and use standard shell variables in the template -# output everything in the template script to stdout -cat << EOF -server { - listen 80; - server_name $SERVERNAME; - root $ROOT; - - access_log /var/log/nginx/$SERVERNAME_access.log - error_log /var/log/nginx/$SERVERNAME_error.log -} -EOF --------------------------------------------------------------------------------- - -* in the manifest, export the relevant variables and add the following lines in your manifest: --------------------------------------------------------------------------------- -# export variables needed for the template - export SERVERNAME='test" - export ROOT='/var/www/test' -# render the template - mkdir -p "$__object/files" - "$__type/files/basic.conf.sh" > "$__object/files/basic.conf" -# send the rendered template - __file /etc/nginx/sites-available/test.conf \ - --state present - --source "$__object/files/basic.conf" --------------------------------------------------------------------------------- - - -TESTING A NEW TYPE ------------------- -If you want to test a new type on a node, you can tell cdist to only use an -object of this type: Use the '--initial-manifest' parameter -with - (stdin) as argument and feed object into stdin -of cdist: - --------------------------------------------------------------------------------- -# Singleton type without parameter -echo __ungleich_munin_server | cdist --initial-manifest - munin.panter.ch - -# Singleton type with parameter -echo __ungleich_munin_node --allow 1.2.3.4 | \ - cdist --initial-manifest - rails-19.panter.ch - -# Normal type -echo __file /tmp/stdintest --mode 0644 | \ - cdist --initial-manifest - cdist-dev-01.ungleich.ch --------------------------------------------------------------------------------- - - -OTHER CONTENT IN CDIST REPOSITORY ---------------------------------- -Usually the cdist repository contains all configuration -items. Sometimes you may have additional resources that -you would like to store in your central configuration -repositiory (like password files from KeepassX, -Libreoffice diagrams, etc.). - -It is recommended to use a subfolder named "non-cdist" -in the repository for such content: It allows you to -easily distinguish what is used by cdist and what not -and also to store all important files in one -repository. - - -SEE ALSO --------- -- cdist(1) -- cdist-tutorial(7) - - -COPYING -------- -Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/docs/man/man7/cdist-bootstrap.text b/docs/man/man7/cdist-bootstrap.rst similarity index 59% rename from docs/man/man7/cdist-bootstrap.text rename to docs/man/man7/cdist-bootstrap.rst index 5852bad0..df55e2af 100644 --- a/docs/man/man7/cdist-bootstrap.text +++ b/docs/man/man7/cdist-bootstrap.rst @@ -1,13 +1,10 @@ cdist-bootstrap(7) ================== +Setup cdist environment + Nico Schottelius -NAME ----- -cdist-bootstrap - setup cdist environment - - INTRODUCTION ------------ This document describes the usual steps recommended for a new @@ -42,23 +39,21 @@ you are on the **master** branch. The master branch reflects the latest development of cdist. As this is the development branch, it may or may not work. There are also version branches available, which are kept in a stable state. Let's use **git branch -r** -to list all branches: +to list all branches:: --------------------------------------------------------------------------------- -cdist% git branch -r - origin/1.0 - origin/1.1 - origin/1.2 - origin/1.3 - origin/1.4 - origin/1.5 - origin/1.6 - origin/1.7 - origin/2.0 - origin/HEAD -> origin/master - origin/archive_shell_function_approach - origin/master --------------------------------------------------------------------------------- + cdist% git branch -r + origin/1.0 + origin/1.1 + origin/1.2 + origin/1.3 + origin/1.4 + origin/1.5 + origin/1.6 + origin/1.7 + origin/2.0 + origin/HEAD -> origin/master + origin/archive_shell_function_approach + origin/master So **2.0** is the latest version branch in this example. All versions (2.0.x) within one version branch (2.0) are compatible to each @@ -75,16 +70,14 @@ your own work. Now it's time to create your branch, which contains your local changes. I usually name it by the company/area I am working for: ethz-systems, localch, customerX, ... But this is pretty much up to you. -In this tutorial I use the branch **mycompany**: +In this tutorial I use the branch **mycompany**:: --------------------------------------------------------------------------------- -cdist% git checkout -b mycompany origin/master -Branch mycompany set up to track remote branch master from origin. -Switched to a new branch 'mycompany' -cdist-user% git branch - master -* mycompany --------------------------------------------------------------------------------- + cdist% git checkout -b mycompany origin/master + Branch mycompany set up to track remote branch master from origin. + Switched to a new branch 'mycompany' + cdist-user% git branch + master + * mycompany From now on, you can use git as usual to commit your changes in your own branch. @@ -95,51 +88,47 @@ Usually a development machine like a notebook should be considered temporary only. For this reason and to enable shareability, the configuration should be published to another device as early as possible. The following example shows how to publish the configuration to another host that is -reachable via ssh and has git installed: +reachable via ssh and has git installed:: --------------------------------------------------------------------------------- -# Create bare git repository on the host named "loch" -cdist% ssh loch "GIT_DIR=/home/nutzer/cdist git init" -Initialized empty Git repository in /home/nutzer/cdist/ + # Create bare git repository on the host named "loch" + cdist% ssh loch "GIT_DIR=/home/nutzer/cdist git init" + Initialized empty Git repository in /home/nutzer/cdist/ -# Add remote git repo to git config -cdist% git remote add loch loch:/home/nutzer/cdist + # Add remote git repo to git config + cdist% git remote add loch loch:/home/nutzer/cdist -# Configure the mycompany branch to push to loch -cdist% git config branch.mycompany.remote loch + # Configure the mycompany branch to push to loch + cdist% git config branch.mycompany.remote loch -# Configure mycompany branch to push into remote master branch -cdist% git config branch.mycompany.merge refs/heads/master + # Configure mycompany branch to push into remote master branch + cdist% git config branch.mycompany.merge refs/heads/master -# Push mycompany branch to remote branch master initially -cdist% git push loch mycompany:refs/heads/master --------------------------------------------------------------------------------- + # Push mycompany branch to remote branch master initially + cdist% git push loch mycompany:refs/heads/master Now you have setup the git repository to synchronise the **mycompany** branch with the **master** branch on the host **loch**. Thus you can commit -as usual in your branch and push out changes by entering ***git push***. +as usual in your branch and push out changes by entering **git push**. UPDATING FROM ORIGIN -------------------- -Whenever you want to update your cdist installation, you can use git to do so: +Whenever you want to update your cdist installation, you can use git to do so:: --------------------------------------------------------------------------------- -# Update git repository with latest changes from origin -cdist% git fetch origin + # Update git repository with latest changes from origin + cdist% git fetch origin -# Update current branch with master branch from origin -cdist% git merge origin/master + # Update current branch with master branch from origin + cdist% git merge origin/master -# Alternative: Update current branch with 2.0 branch from origin -cdist% git merge origin/2.0 --------------------------------------------------------------------------------- + # Alternative: Update current branch with 2.0 branch from origin + cdist% git merge origin/2.0 SEE ALSO -------- -- cdist(1) -- cdist-tutorial(7) +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-tutorial(7) `_ COPYING diff --git a/docs/man/man7/cdist-explorer.text b/docs/man/man7/cdist-explorer.rst similarity index 59% rename from docs/man/man7/cdist-explorer.text rename to docs/man/man7/cdist-explorer.rst index a99be050..1bbd7e75 100644 --- a/docs/man/man7/cdist-explorer.text +++ b/docs/man/man7/cdist-explorer.rst @@ -1,13 +1,10 @@ cdist-explorer(7) ================= +Explore the target systems + Nico Schottelius -NAME ----- -cdist-explorer - Explore the target systems - - DESCRIPTION ----------- Explorer are small shell scripts, which will be executed on the target @@ -21,9 +18,17 @@ type explorers. Both work almost exactly the same way, with the difference that the values of the general explorers are stored in a general location and the type specific below the object. -Explorers can reuse other explorers on the target system by calling -$__explorer/ (general and type explorer) or -$__type_explorer/ (type explorer). +Explorers can reuse other explorers on the target system by calling + +:: + + $__explorer/ (general and type explorer) + +or + +:: + + $__type_explorer/ (type explorer). In case of significant errors, the explorer may exit non-zero and return an error message on stderr, which will cause cdist to abort. @@ -33,33 +38,31 @@ explorer. EXAMPLES -------- -A very simple explorer may look like this: +A very simple explorer may look like this:: --------------------------------------------------------------------------------- -hostname --------------------------------------------------------------------------------- + hostname -Which is in practise the ***hostname*** explorer. +Which is in practise the **hostname** explorer. A type explorer, which could check for the status of a package may look like this: --------------------------------------------------------------------------------- -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi +.. code-block:: sh -# Expect dpkg failing, if package is not known / installed -dpkg -s "$name" 2>/dev/null || exit 0 --------------------------------------------------------------------------------- + if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" + else + name="$__object_id" + fi + + # Expect dpkg failing, if package is not known / installed + dpkg -s "$name" 2>/dev/null || exit 0 SEE ALSO -------- -- cdist(1) -- cdist-reference(7) -- cdist-stages(7) +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-reference(7) `_ +- `cdist-stages(7) `_ COPYING diff --git a/docs/man/man7/cdist-hacker.text b/docs/man/man7/cdist-hacker.rst similarity index 60% rename from docs/man/man7/cdist-hacker.text rename to docs/man/man7/cdist-hacker.rst index 2cbf5a8b..1d0e7f2e 100644 --- a/docs/man/man7/cdist-hacker.text +++ b/docs/man/man7/cdist-hacker.rst @@ -1,13 +1,10 @@ cdist-hacker(7) =============== +How to get (stuff) into cdist + Nico Schottelius -NAME ----- -cdist-hacker - How to get (stuff) into cdist - - WELCOME ------- Welcome dear hacker! I invite you to a tour of pointers to @@ -33,6 +30,7 @@ nearby, so grepping for FIXME gives all positions that need to be fixed. Indention is 4 spaces (welcome to the python world). + HOW TO SUBMIT STUFF FOR INCLUSION INTO UPSTREAM CDIST ----------------------------------------------------- If you did some cool changes to cdist, which you value as a benefit for @@ -46,7 +44,9 @@ work nor kill the authors brain: - Do not add cdist/conf/manifest/init - This file should only be touched in your private branch! - Code to be included should be branched of the upstream "master" branch + - Exception: Bugfixes to a version branch + - On a merge request, always name the branch I should pull from - Always ensure **all** manpages build. Use **./build man** to test. - If you developed more than **one** feature, consider submitting them in @@ -69,82 +69,76 @@ AND asciidoc is able to compile it (i.e. do NOT have to many "=" in the second line). Warning: Submitting "exec" or "run" types that simply echo their parameter in -gencode* will not be accepted, because they are of no use. Every type can output +**gencode** will not be accepted, because they are of no use. Every type can output code and thus such a type introduces redundant functionality that is given by core cdist already. EXAMPLE GIT WORKFLOW --------------------- -The following workflow works fine for most developers: +The following workflow works fine for most developers:: --------------------------------------------------------------------------------- -# get latest upstream master branch -git clone https://github.com/telmich/cdist.git + # get latest upstream master branch + git clone https://github.com/telmich/cdist.git -# update if already existing -cd cdist; git fetch -v; git merge origin/master + # update if already existing + cd cdist; git fetch -v; git merge origin/master -# create a new branch for your feature/bugfix -cd cdist # if you haven't done before -git checkout -b documentation_cleanup + # create a new branch for your feature/bugfix + cd cdist # if you haven't done before + git checkout -b documentation_cleanup -# *hack* -*hack* + # *hack* + *hack* -# clone the cdist repository on github if you haven't done so + # clone the cdist repository on github if you haven't done so -# configure your repo to know about your clone (only once) -git remote add github git@github.com:YOURUSERNAME/cdist.git + # configure your repo to know about your clone (only once) + git remote add github git@github.com:YOURUSERNAME/cdist.git -# push the new branch to github -git push github documentation_cleanup + # push the new branch to github + git push github documentation_cleanup -# (or everything) -git push --mirror github + # (or everything) + git push --mirror github -# create a pull request at github (use a browser) -# *fixthingsbecausequalityassurancefoundissuesinourpatch* -*hack* + # create a pull request at github (use a browser) + # *fixthingsbecausequalityassurancefoundissuesinourpatch* + *hack* -# push code to github again -git push ... # like above + # push code to github again + git push ... # like above -# add comment that everything should be green now (use a browser) + # add comment that everything should be green now (use a browser) -# go back to master branch -git checkout master + # go back to master branch + git checkout master -# update master branch that includes your changes now -git fetch -v origin -git diff master..origin/master -git merge origin/master --------------------------------------------------------------------------------- + # update master branch that includes your changes now + git fetch -v origin + git diff master..origin/master + git merge origin/master If at any point you want to go back to the original master branch, you can -use **git stash** to stash your changes away: +use **git stash** to stash your changes away:: --------------------------------------------------------------------------------- -# assume you are on documentation_cleanup -git stash + # assume you are on documentation_cleanup + git stash -# change to master and update to most recent upstream version -git checkout master -git fetch -v origin -git merge origin/master --------------------------------------------------------------------------------- + # change to master and update to most recent upstream version + git checkout master + git fetch -v origin + git merge origin/master Similar when you want to develop another new feature, you go back -to the master branch and create another branch based on it: +to the master branch and create another branch based on it:: --------------------------------------------------------------------------------- -# change to master and update to most recent upstream version -git checkout master -git fetch -v origin -git merge origin/master + # change to master and update to most recent upstream version + git checkout master + git fetch -v origin + git merge origin/master -git checkout -b another_feature --------------------------------------------------------------------------------- + git checkout -b another_feature (you can repeat the code above for as many features as you want to develop in parallel) @@ -152,7 +146,7 @@ in parallel) SEE ALSO -------- -- cdist(7) +- `cdist(1) <../man1/cdist.html>`_ - git(1) - git-checkout(1) - git-stash(1) diff --git a/docs/man/man7/cdist-manifest.text b/docs/man/man7/cdist-manifest.rst similarity index 52% rename from docs/man/man7/cdist-manifest.text rename to docs/man/man7/cdist-manifest.rst index 12cc91c8..c8984acf 100644 --- a/docs/man/man7/cdist-manifest.text +++ b/docs/man/man7/cdist-manifest.rst @@ -1,20 +1,17 @@ cdist-manifest(7) ================= +(Re-)Use types + Nico Schottelius -NAME ----- -cdist-manifest - (Re-)Use types - - DESCRIPTION ----------- Manifests are used to define which objects to create. Objects are instances of **types**, like in object oriented programming languages. An object is represented by the combination of **type + slash + object name**: **\__file/etc/cdist-configured** is an -object of the type ***__file*** with the name ***etc/cdist-configured***. +object of the type **__file** with the name **etc/cdist-configured**. All available types can be found in the **cdist/conf/type/** directory, use **ls cdist/conf/type** to get the list of available types. If you have @@ -23,14 +20,13 @@ the reference with pointers to the manpages. Types in manifests are used like normal command line tools. Let's have a look -at an example: --------------------------------------------------------------------------------- -# Create object of type __package with the parameter state = absent -__package apache2 --state absent +at an example:: -# Same with the __directory type -__directory /tmp/cdist --state present --------------------------------------------------------------------------------- + # Create object of type __package with the parameter state = absent + __package apache2 --state absent + + # Same with the __directory type + __directory /tmp/cdist --state present These two lines create objects, which will later be used to realise the configuration on the target host. @@ -62,23 +58,21 @@ Cdist expects the initial manifest at **cdist/conf/manifest/init**. Within this initial manifest you define, which objects should be created on which host. To distinguish between hosts, you can use the environment variable **__target_host**. Let's have a look at a simple -example: +example:: --------------------------------------------------------------------------------- -__cdistmarker + __cdistmarker -case "$__target_host" in - localhost) - __directory /home/services/kvm-vm --parents yes - ;; -esac --------------------------------------------------------------------------------- + case "$__target_host" in + localhost) + __directory /home/services/kvm-vm --parents yes + ;; + esac This manifest says: Independent of the host, always use the type -***__cdistmarker***, which creates the file **/etc/cdist-configured**, +**__cdistmarker**, which creates the file **/etc/cdist-configured**, with the timestamp as content. -The directory ***/home/services/kvm-vm***, including all parent directories, -is only created on the host ***localhost***. +The directory **/home/services/kvm-vm**, including all parent directories, +is only created on the host **localhost**. As you can see, there is no magic involved, the manifest is simple shell code that utilises cdist types. Every available type can be executed like a normal @@ -89,18 +83,16 @@ SPLITTING UP THE INITIAL MANIFEST --------------------------------- If you want to split up your initial manifest, you can create other shell scripts in **cdist/conf/manifest/** and include them in **cdist/conf/manifest/init**. -Cdist provides the environment variable ***__manifest*** to reference +Cdist provides the environment variable **__manifest** to reference the directory containing the initial manifest (see cdist-reference(7)). -The following example would include every file with a **.sh** suffix: +The following example would include every file with a **.sh** suffix:: --------------------------------------------------------------------------------- -# Include *.sh -for manifest in $__manifest/*.sh; do - # And source scripts into our shell environment - . "$manifest" -done --------------------------------------------------------------------------------- + # Include *.sh + for manifest in $__manifest/*.sh; do + # And source scripts into our shell environment + . "$manifest" + done DEPENDENCIES @@ -109,20 +101,19 @@ If you want to describe that something requires something else, just setup the variable "require" to contain the requirements. Multiple requirements can be added white space separated. --------------------------------------------------------------------------------- +:: - 1 # No dependency - 2 __file /etc/cdist-configured - 3 - 4 # Require above object - 5 require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ - 6 --source /etc/cdist-configured --type symbolic - 7 - 8 # Require two objects - 9 require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ -10 __file /tmp/cdist-another-testfile + 1 # No dependency + 2 __file /etc/cdist-configured + 3 + 4 # Require above object + 5 require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ + 6 --source /etc/cdist-configured --type symbolic + 7 + 8 # Require two objects + 9 require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ + 10 __file /tmp/cdist-another-testfile --------------------------------------------------------------------------------- Above the "require" variable is only set for the command that is immediately following it. Dependencies should always be declared that way. @@ -141,23 +132,22 @@ export the "require" variable as well. But then, if you need to add extra dependencies to a specific type, you have to make sure that you append these to the globally already defined one. --------------------------------------------------------------------------------- +:: -# First of all, update the package index -__package_update_index -# Upgrade all the installed packages afterwards -require="__package_update_index" __package_upgrade_all -# Create a common dependency for all the next types so that they get to -# be executed only after the package upgrade has finished -export require="__package_upgrade_all" + # First of all, update the package index + __package_update_index + # Upgrade all the installed packages afterwards + require="__package_update_index" __package_upgrade_all + # Create a common dependency for all the next types so that they get to + # be executed only after the package upgrade has finished + export require="__package_upgrade_all" -# Ensure that lighttpd is installed after we have upgraded all the packages -__package lighttpd --state present -# Ensure that munin is installed after lighttpd is present and after all -# the packages are upgraded -require="$require __package/lighttpd" __package munin --state present + # Ensure that lighttpd is installed after we have upgraded all the packages + __package lighttpd --state present + # Ensure that munin is installed after lighttpd is present and after all + # the packages are upgraded + require="$require __package/lighttpd" __package munin --state present --------------------------------------------------------------------------------- All objects that are created in a type manifest are automatically required from the type that is calling them. This is called "autorequirement" in @@ -166,6 +156,7 @@ cdist jargon. You can find an more in depth description of the flow execution of manifests in cdist-stages(7) and of how types work in cdist-type(7). + CREATE DEPENDENCIES FROM EXECUTION ORDER ----------------------------------------- You can tell cdist to execute all types in the order in which they are created @@ -193,90 +184,85 @@ CDIST_ORDER_DEPENDENCY will be ignored, because adding a dependency in case of overrides would result in circular dependencies, which is an error. - - EXAMPLES -------- The initial manifest may for instance contain the following code: --------------------------------------------------------------------------------- -# Always create this file, so other sysadmins know cdist is used. -__file /etc/cdist-configured +.. code-block:: sh -case "$__target_host" in - my.server.name) - __directory /root/bin/ - __file /etc/issue.net --source "$__manifest/issue.net - ;; -esac --------------------------------------------------------------------------------- + # Always create this file, so other sysadmins know cdist is used. + __file /etc/cdist-configured + + case "$__target_host" in + my.server.name) + __directory /root/bin/ + __file /etc/issue.net --source "$__manifest/issue.net + ;; + esac The manifest of the type "nologin" may look like this: --------------------------------------------------------------------------------- -__file /etc/nologin --source "$__type/files/default.nologin" --------------------------------------------------------------------------------- +.. code-block:: sh + + __file /etc/nologin --source "$__type/files/default.nologin" This example makes use of dependencies: --------------------------------------------------------------------------------- -# Ensure that lighttpd is installed -__package lighttpd --state present -# Ensure that munin makes use of lighttpd instead of the default webserver -# package as decided by the package manager -require="__package/lighttpd" __package munin --state present --------------------------------------------------------------------------------- +.. code-block:: sh + + # Ensure that lighttpd is installed + __package lighttpd --state present + # Ensure that munin makes use of lighttpd instead of the default webserver + # package as decided by the package manager + require="__package/lighttpd" __package munin --state present How to override objects: --------------------------------------------------------------------------------- -# for example in the inital manifest +.. code-block:: sh -# create user account foobar with some hash for password -__user foobar --password 'some_fancy_hash' --home /home/foobarexample + # for example in the inital manifest -# ... many statements and includes in the manifest later ... -# somewhere in a conditionally sourced manifest -# (e.g. for example only sourced if a special application is on the target host) + # create user account foobar with some hash for password + __user foobar --password 'some_fancy_hash' --home /home/foobarexample -# this leads to an error ... -__user foobar --password 'some_other_hash' + # ... many statements and includes in the manifest later ... + # somewhere in a conditionally sourced manifest + # (e.g. for example only sourced if a special application is on the target host) -# this tells cdist, that you know that this is an override and should be accepted -CDIST_OVERRIDE=yes __user foobar --password 'some_other_hash' -# it's only an override, means the parameter --home is not touched -# and stays at the original value of /home/foobarexample --------------------------------------------------------------------------------- + # this leads to an error ... + __user foobar --password 'some_other_hash' + + # this tells cdist, that you know that this is an override and should be accepted + CDIST_OVERRIDE=yes __user foobar --password 'some_other_hash' + # it's only an override, means the parameter --home is not touched + # and stays at the original value of /home/foobarexample Dependencies defined by execution order work as following: --------------------------------------------------------------------------------- +.. code-block:: sh -# Tells cdist to execute all types in the order in which they are created ... -export CDIST_ORDER_DEPENDENCY=on -__sample_type 1 -require="__some_type_somewhere/id" __sample_type 2 -__example_type 23 -# Now this types are executed in the creation order until the variable is unset -unset CDIST_ORDER_DEPENDENCY -# all now following types cdist makes the order .. -__not_in_order_type 42 - -# how it works : -# this lines above are translated to: -__sample_type 1 -require="__some_type_somewhere/id __sample_type/1" __sample_type 2 -require="__sample_type/2" __example_type 23 -__not_in_order_type 42 - --------------------------------------------------------------------------------- + # Tells cdist to execute all types in the order in which they are created ... + export CDIST_ORDER_DEPENDENCY=on + __sample_type 1 + require="__some_type_somewhere/id" __sample_type 2 + __example_type 23 + # Now this types are executed in the creation order until the variable is unset + unset CDIST_ORDER_DEPENDENCY + # all now following types cdist makes the order .. + __not_in_order_type 42 + # how it works : + # this lines above are translated to: + __sample_type 1 + require="__some_type_somewhere/id __sample_type/1" __sample_type 2 + require="__sample_type/2" __example_type 23 + __not_in_order_type 42 SEE ALSO -------- -- cdist-tutorial(7) -- cdist-type(7) +- `cdist-tutorial(7) `_ +- `cdist-type(7) `_ COPYING diff --git a/docs/man/man7/cdist-messaging.rst b/docs/man/man7/cdist-messaging.rst new file mode 100644 index 00000000..6f29a363 --- /dev/null +++ b/docs/man/man7/cdist-messaging.rst @@ -0,0 +1,111 @@ +cdist-messaging(7) +================== +How the initial manifest and types can communication + +Nico Schottelius + +DESCRIPTION +----------- +cdist has a simple but powerful way of allowing communication between +the initial manifest and types as well as types and types. + +Whenever execution is passed from cdist to one of the +scripts described below, cdist generate 2 new temporary files +and exports the environment variables **__messages_in** and +**__messages_out** to point to them. + +Before handing over the control, the content of the global message +file is copied into the file referenced by **$__messages_in**. + +After cdist gained control back, the content of the file referenced +by **$__messages_out** is appended to the global message file. + +This way overwriting any of the two files by accident does not +interfere with other types. + +The order of execution is not defined unless you create dependencies +between the different objects (see cdist-manifest(7)) and thus you +can only react reliably on messages by objects that you depend on. + + +AVAILABILITY +------------ +Messaging is possible between all **local** scripts: + +- initial manifest +- type/manifest +- type/gencode-local +- type/gencode-remote + + +EXAMPLES +-------- +When you want to emit a message use: + +.. code-block:: sh + + echo "something" >> "$__messages_out" + +When you want to react on a message use: + +.. code-block:: sh + + if grep -q "^__your_type/object/id:something" "$__messages_in"; then + echo "I do something else" + fi + +Some real life examples: + +.. code-block:: sh + + # Reacting on changes from block for keepalive + if grep -q "^__block/keepalive-vrrp" "$__messages_in"; then + echo /etc/init.d/keepalived restart + fi + + # Reacting on changes of configuration files + if grep -q "^__file/etc/one" $__messages_in; then + echo 'for init in /etc/init.d/opennebula*; do $init restart; done' + fi + +Restart sshd on changes + +.. code-block:: sh + + os="$(cat "$__global/explorer/os")" + + case "$os" in + centos|redhat|suse) + restart="/etc/init.d/sshd restart" + ;; + debian|ubuntu) + restart="/etc/init.d/ssh restart" + ;; + *) + cat << eof >&2 + Unsupported os $os. + If you would like to have this type running on $os, + you can either develop the changes and send a pull + request or ask for a quote at www.ungleich.ch + eof + exit 1 + ;; + esac + + if grep -q "^__key_value/PermitRootLogin" "$__messages_in"; then + echo $restart + fi + + +SEE ALSO +-------- +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-manifest(7) `_ +- `cdist-reference(7) `_ +- `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2013 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/docs/man/man7/cdist-messaging.text b/docs/man/man7/cdist-messaging.text deleted file mode 100644 index a6258564..00000000 --- a/docs/man/man7/cdist-messaging.text +++ /dev/null @@ -1,114 +0,0 @@ -cdist-messaging(7) -================== -Nico Schottelius - -NAME ----- -cdist-messaging - How the initial manifest and types can communication - - -DESCRIPTION ------------ -cdist has a simple but powerful way of allowing communication between -the initial manifest and types as well as types and types. - -Whenever execution is passed from cdist to one of the -scripts described below, cdist generate 2 new temporary files -and exports the environment variables __messages_in and -__messages_out to point to them. - -Before handing over the control, the content of the global message -file is copied into the file referenced by $__messages_in. - -After cdist gained control back, the content of the file referenced -by $__messages_out is appended to the global message file. - -This way overwriting any of the two files by accident does not -interfere with other types. - -The order of execution is not defined unless you create dependencies -between the different objects (see cdist-manifest(7)) and thus you -can only react reliably on messages by objects that you depend on. - - -AVAILABILITY ------------- -Messaging is possible between all **local** scripts: - -- initial manifest -- type/manifest -- type/gencode-local -- type/gencode-remote - - -EXAMPLES --------- -When you want to emit a message use: - --------------------------------------------------------------------------------- -echo "something" >> "$__messages_out" --------------------------------------------------------------------------------- - -When you want to react on a message use: - --------------------------------------------------------------------------------- -if grep -q "^__your_type/object/id:something" "$__messages_in"; then - echo "I do something else" -fi --------------------------------------------------------------------------------- - -Some real life examples: --------------------------------------------------------------------------------- -# Reacting on changes from block for keepalive -if grep -q "^__block/keepalive-vrrp" "$__messages_in"; then - echo /etc/init.d/keepalived restart -fi - -# Reacting on changes of configuration files -if grep -q "^__file/etc/one" $__messages_in; then - echo 'for init in /etc/init.d/opennebula*; do $init restart; done' -fi --------------------------------------------------------------------------------- - -Restart sshd on changes --------------------------------------------------------------------------------- -os="$(cat "$__global/explorer/os")" - -case "$os" in - centos|redhat|suse) - restart="/etc/init.d/sshd restart" - ;; - debian|ubuntu) - restart="/etc/init.d/ssh restart" - ;; - *) - cat << eof >&2 -Unsupported os $os. -If you would like to have this type running on $os, -you can either develop the changes and send a pull -request or ask for a quote at www.ungleich.ch -eof - exit 1 - ;; -esac - -if grep -q "^__key_value/PermitRootLogin" "$__messages_in"; then - echo $restart -fi --------------------------------------------------------------------------------- - - - - -SEE ALSO --------- -- cdist(1) -- cdist-manifest(7) -- cdist-reference(7) -- cdist-type(7) - - -COPYING -------- -Copyright \(C) 2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/docs/man/man7/cdist-quickstart.text b/docs/man/man7/cdist-quickstart.rst similarity index 50% rename from docs/man/man7/cdist-quickstart.text rename to docs/man/man7/cdist-quickstart.rst index 8b754650..d1186ffe 100644 --- a/docs/man/man7/cdist-quickstart.text +++ b/docs/man/man7/cdist-quickstart.rst @@ -1,13 +1,10 @@ cdist-quickstart(7) =================== +Jump in and enjoy cdist + Nico Schottelius -NAME ----- -cdist-quickstart - jump in and enjoy cdist - - INTRODUCTION ------------ This tutorial is aimed at people learning cdist and shows @@ -31,62 +28,55 @@ and usually logs into the **target host** as the **root** user. So you need to configure the **ssh server** of the target host to allow root logins: Edit the file **/etc/ssh/sshd_config** and add one of the following -lines: +lines:: --------------------------------------------------------------------------------- -# Allow login only via public key -PermitRootLogin without-password + # Allow login only via public key + PermitRootLogin without-password -# Allow login via password and public key -PermitRootLogin yes --------------------------------------------------------------------------------- + # Allow login via password and public key + PermitRootLogin yes As cdist uses ssh intensively, it is recommended to setup authentication -with public keys: +with public keys:: --------------------------------------------------------------------------------- -# Generate pubkey pair as a normal user -ssh-keygen + # Generate pubkey pair as a normal user + ssh-keygen -# Copy pubkey over to target host -ssh-copy-id root@localhost --------------------------------------------------------------------------------- + # Copy pubkey over to target host + ssh-copy-id root@localhost Have a look at ssh-agent(1) and ssh-add(1) on how to cache the password for -your public key. Usually it looks like this: +your public key. Usually it looks like this:: --------------------------------------------------------------------------------- -# Start agent and export variables -eval `ssh-agent` + # Start agent and export variables + eval `ssh-agent` -# Add keys (requires password for every identity file) -ssh-add --------------------------------------------------------------------------------- + # Add keys (requires password for every identity file) + ssh-add -At this point you should be able to ***ssh root@localhost*** without +At this point you should be able to **ssh root@localhost** without re-entering the password. If something failed until here, ensure that all steps went successfully and you have read and understood the documentation. As soon as you are able to login without password to localhost, we can use cdist to configure it. You can copy and paste the following -code into your shell to get started and configure localhost: --------------------------------------------------------------------------------- -# Get cdist -# Mirrors can be found on -# http://www.nico.schottelius.org/software/cdist/install/#index2h4 -git clone git://git.schottelius.org/cdist +code into your shell to get started and configure localhost:: -# Create manifest (maps configuration to host(s) -cd cdist -echo '__file /etc/cdist-configured' > cdist/conf/manifest/init + # Get cdist + # Mirrors can be found on + # http://www.nico.schottelius.org/software/cdist/install/#index2h4 + git clone git://git.schottelius.org/cdist -# Configure localhost in verbose mode -./bin/cdist config -v localhost + # Create manifest (maps configuration to host(s) + cd cdist + echo '__file /etc/cdist-configured' > cdist/conf/manifest/init -# Find out that cdist created /etc/cdist-configured -ls -l /etc/cdist-configured --------------------------------------------------------------------------------- + # Configure localhost in verbose mode + ./bin/cdist config -v localhost + + # Find out that cdist created /etc/cdist-configured + ls -l /etc/cdist-configured That's it, you've successfully used cdist to configure your first host! Continue reading the next sections, to understand what you did and how @@ -95,8 +85,8 @@ to create a more sophisticated configuration. SEE ALSO -------- -- cdist(1) -- cdist-tutorial(7) +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-tutorial(7) `_ COPYING diff --git a/docs/man/man7/cdist-reference.rst b/docs/man/man7/cdist-reference.rst new file mode 100644 index 00000000..bef0e452 --- /dev/null +++ b/docs/man/man7/cdist-reference.rst @@ -0,0 +1,313 @@ +cdist-reference(7) +================== +Variable, path and type reference for cdist + +Nico Schottelius + + +EXPLORERS +--------- +The following global explorers are available: + +- cpu_cores +- cpu_sockets +- hostname +- init +- interfaces +- lsb_codename +- lsb_description +- lsb_id +- lsb_release +- machine +- machine_type +- memory +- os +- os_version +- runlevel + +PATHS +----- +$HOME/.cdist + The standard cdist configuration directory relative to your home directory + This is usually the place you want to store your site specific configuration + +cdist/conf/ + The distribution configuration directory + This contains types and explorers to be used + +confdir + Cdist will use all available configuration directories and create + a temporary confdir containing links to the real configuration directories. + This way it is possible to merge configuration directories. + By default it consists of everything in $HOME/.cdist and cdist/conf/. + For more details see cdist(1) + +confdir/manifest/init + This is the central entry point. + It is an executable (+x bit set) shell script that can use + values from the explorers to decide which configuration to create + for the specified target host. + Its intent is to used to define mapping from configurations to hosts. + +confdir/manifest/* + All other files in this directory are not directly used by cdist, but you + can separate configuration mappings, if you have a lot of code in the + conf/manifest/init file. This may also be helpful to have different admins + maintain different groups of hosts. + +confdir/explorer/ + Contains explorers to be run on the target hosts, see cdist-explorer(7). + +confdir/type/ + Contains all available types, which are used to provide + some kind of functionality. See cdist-type(7). + +confdir/type// + Home of the type . + This directory is referenced by the variable __type (see below). + +confdir/type//man.rst + Manpage in reStructuredText format (required for inclusion into upstream) + +confdir/type//manifest + Used to generate additional objects from a type. + +confdir/type//gencode-local + Used to generate code to be executed on the source host + +confdir/type//gencode-remote + Used to generate code to be executed on the target host + +confdir/type//parameter/required + Parameters required by type, \n separated list. + +confdir/type//parameter/optional + Parameters optionally accepted by type, \n separated list. + +confdir/type//parameter/default/* + Default values for optional parameters. + Assuming an optional parameter name of 'foo', it's default value would + be read from the file confdir/type//parameter/default/foo. + +confdir/type//parameter/boolean + Boolean parameters accepted by type, \n separated list. + +confdir/type//explorer + Location of the type specific explorers. + This directory is referenced by the variable __type_explorer (see below). + See cdist-explorer(7). + +confdir/type//files + This directory is reserved for user data and will not be used + by cdist at any time. It can be used for storing supplementary + files (like scripts to act as a template or configuration files). + +out/ + This directory contains output of cdist and is usually located + in a temporary directory and thus will be removed after the run. + This directory is referenced by the variable __global (see below). + +out/explorer + Output of general explorers. + +out/object + Objects created for the host. + +out/object/ + Contains all object specific information. + This directory is referenced by the variable __object (see below). + +out/object//explorers + Output of type specific explorers, per object. + +TYPES +----- +The following types are available: + +- \__apt_key (`cdist-type__apt_key(7) `_) +- \__apt_key_uri (`cdist-type__apt_key_uri(7) `_) +- \__apt_norecommends (`cdist-type__apt_norecommends(7) `_) +- \__apt_ppa (`cdist-type__apt_ppa(7) `_) +- \__apt_source (`cdist-type__apt_source(7) `_) +- \__apt_update_index (`cdist-type__apt_update_index(7) `_) +- \__block (`cdist-type__block(7) `_) +- \__ccollect_source (`cdist-type__ccollect_source(7) `_) +- \__cdist (`cdist-type__cdist(7) `_) +- \__cdistmarker (`cdist-type__cdistmarker(7) `_) +- \__config_file (`cdist-type__config_file(7) `_) +- \__consul (`cdist-type__consul(7) `_) +- \__consul_agent (`cdist-type__consul_agent(7) `_) +- \__consul_check (`cdist-type__consul_check(7) `_) +- \__consul_reload (`cdist-type__consul_reload(7) `_) +- \__consul_service (`cdist-type__consul_service(7) `_) +- \__consul_template (`cdist-type__consul_template(7) `_) +- \__consul_template_template (`cdist-type__consul_template_template(7) `_) +- \__consul_watch_checks (`cdist-type__consul_watch_checks(7) `_) +- \__consul_watch_event (`cdist-type__consul_watch_event(7) `_) +- \__consul_watch_key (`cdist-type__consul_watch_key(7) `_) +- \__consul_watch_keyprefix (`cdist-type__consul_watch_keyprefix(7) `_) +- \__consul_watch_nodes (`cdist-type__consul_watch_nodes(7) `_) +- \__consul_watch_service (`cdist-type__consul_watch_service(7) `_) +- \__consul_watch_services (`cdist-type__consul_watch_services(7) `_) +- \__cron (`cdist-type__cron(7) `_) +- \__debconf_set_selections (`cdist-type__debconf_set_selections(7) `_) +- \__directory (`cdist-type__directory(7) `_) +- \__dog_vdi (`cdist-type__dog_vdi(7) `_) +- \__file (`cdist-type__file(7) `_) +- \__firewalld_rule (`cdist-type__firewalld_rule(7) `_) +- \__git (`cdist-type__git(7) `_) +- \__group (`cdist-type__group(7) `_) +- \__hostname (`cdist-type__hostname(7) `_) +- \__iptables_apply (`cdist-type__iptables_apply(7) `_) +- \__iptables_rule (`cdist-type__iptables_rule(7) `_) +- \__issue (`cdist-type__issue(7) `_) +- \__jail (`cdist-type__jail(7) `_) +- \__key_value (`cdist-type__key_value(7) `_) +- \__line (`cdist-type__line(7) `_) +- \__link (`cdist-type__link(7) `_) +- \__locale (`cdist-type__locale(7) `_) +- \__motd (`cdist-type__motd(7) `_) +- \__mount (`cdist-type__mount(7) `_) +- \__mysql_database (`cdist-type__mysql_database(7) `_) +- \__package (`cdist-type__package(7) `_) +- \__package_apt (`cdist-type__package_apt(7) `_) +- \__package_emerge (`cdist-type__package_emerge(7) `_) +- \__package_emerge_dependencies (`cdist-type__package_emerge_dependencies(7) `_) +- \__package_luarocks (`cdist-type__package_luarocks(7) `_) +- \__package_opkg (`cdist-type__package_opkg(7) `_) +- \__package_pacman (`cdist-type__package_pacman(7) `_) +- \__package_pip (`cdist-type__package_pip(7) `_) +- \__package_pkg_freebsd (`cdist-type__package_pkg_freebsd(7) `_) +- \__package_pkg_openbsd (`cdist-type__package_pkg_openbsd(7) `_) +- \__package_pkgng_freebsd (`cdist-type__package_pkgng_freebsd(7) `_) +- \__package_rubygem (`cdist-type__package_rubygem(7) `_) +- \__package_update_index (`cdist-type__package_update_index(7) `_) +- \__package_upgrade_all (`cdist-type__package_upgrade_all(7) `_) +- \__package_yum (`cdist-type__package_yum(7) `_) +- \__package_zypper (`cdist-type__package_zypper(7) `_) +- \__pacman_conf (`cdist-type__pacman_conf(7) `_) +- \__pacman_conf_integrate (`cdist-type__pacman_conf_integrate(7) `_) +- \__pf_apply (`cdist-type__pf_apply(7) `_) +- \__pf_ruleset (`cdist-type__pf_ruleset(7) `_) +- \__postfix (`cdist-type__postfix(7) `_) +- \__postfix_master (`cdist-type__postfix_master(7) `_) +- \__postfix_postconf (`cdist-type__postfix_postconf(7) `_) +- \__postfix_postmap (`cdist-type__postfix_postmap(7) `_) +- \__postfix_reload (`cdist-type__postfix_reload(7) `_) +- \__postgres_database (`cdist-type__postgres_database(7) `_) +- \__postgres_role (`cdist-type__postgres_role(7) `_) +- \__process (`cdist-type__process(7) `_) +- \__pyvenv (`cdist-type__pyvenv(7) `_) +- \__qemu_img (`cdist-type__qemu_img(7) `_) +- \__rbenv (`cdist-type__rbenv(7) `_) +- \__rsync (`cdist-type__rsync(7) `_) +- \__rvm (`cdist-type__rvm(7) `_) +- \__rvm_gem (`cdist-type__rvm_gem(7) `_) +- \__rvm_gemset (`cdist-type__rvm_gemset(7) `_) +- \__rvm_ruby (`cdist-type__rvm_ruby(7) `_) +- \__ssh_authorized_key (`cdist-type__ssh_authorized_key(7) `_) +- \__ssh_authorized_keys (`cdist-type__ssh_authorized_keys(7) `_) +- \__ssh_dot_ssh (`cdist-type__ssh_dot_ssh(7) `_) +- \__staged_file (`cdist-type__staged_file(7) `_) +- \__start_on_boot (`cdist-type__start_on_boot(7) `_) +- \__timezone (`cdist-type__timezone(7) `_) +- \__update_alternatives (`cdist-type__update_alternatives(7) `_) +- \__user (`cdist-type__user(7) `_) +- \__user_groups (`cdist-type__user_groups(7) `_) +- \__yum_repo (`cdist-type__yum_repo(7) `_) +- \__zypper_repo (`cdist-type__zypper_repo(7) `_) +- \__zypper_service (`cdist-type__zypper_service(7) `_) + + +OBJECTS +------- +For object to object communication and tests, the following paths are +usable within a object directory: + +files + This directory is reserved for user data and will not be used + by cdist at any time. It can be used freely by the type + (for instance to store template results). +changed + This empty file exists in an object directory, if the object has + code to be executed (either remote or local) +stdin + This file exists and contains data, if data was provided on stdin + when the type was called. + + +ENVIRONMENT VARIABLES (FOR READING) +----------------------------------- +The following environment variables are exported by cdist: + +__explorer + Directory that contains all global explorers. + Available for: initial manifest, explorer, type explorer, shell +__manifest + Directory that contains the initial manifest. + Available for: initial manifest, type manifest, shell +__global + Directory that contains generic output like explorer. + Available for: initial manifest, type manifest, type gencode, shell +__messages_in + File to read messages from. + Available for: initial manifest, type manifest, type gencode +__messages_out + File to write messages. + Available for: initial manifest, type manifest, type gencode +__object + Directory that contains the current object. + Available for: type manifest, type explorer, type gencode and code scripts +__object_id + The type unique object id. + Available for: type manifest, type explorer, type gencode and code scripts + Note: The leading and the trailing "/" will always be stripped (caused by + the filesystem database and ensured by the core). + Note: Double slashes ("//") will not be fixed and result in an error. +__object_name + The full qualified name of the current object. + Available for: type manifest, type explorer, type gencode +__target_host + The host we are deploying to. + Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell +__type + Path to the current type. + Available for: type manifest, type gencode +__type_explorer + Directory that contains the type explorers. + Available for: type explorer + +ENVIRONMENT VARIABLES (FOR WRITING) +----------------------------------- +The following environment variables influence the behaviour of cdist: + +require + Setup dependencies between objects (see cdist-manifest(7)) + +CDIST_LOCAL_SHELL + Use this shell locally instead of /bin/sh to execute scripts + +CDIST_REMOTE_SHELL + Use this shell remotely instead of /bin/sh to execute scripts + +CDIST_OVERRIDE + Allow overwriting type parameters (see cdist-manifest(7)) + +CDIST_ORDER_DEPENDENCY + Create dependencies based on the execution order (see cdist-manifest(7)) + +CDIST_REMOTE_EXEC + Use this command for remote execution (should behave like ssh) + +CDIST_REMOTE_COPY + Use this command for remote copy (should behave like scp) + +SEE ALSO +-------- +- `cdist(1) <../man1/cdist.html>`_ + + +COPYING +------- +Copyright \(C) 2011-2014 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/docs/man/man7/cdist-remote-exec-copy.text b/docs/man/man7/cdist-remote-exec-copy.rst similarity index 84% rename from docs/man/man7/cdist-remote-exec-copy.text rename to docs/man/man7/cdist-remote-exec-copy.rst index 298891d6..27b78d42 100644 --- a/docs/man/man7/cdist-remote-exec-copy.text +++ b/docs/man/man7/cdist-remote-exec-copy.rst @@ -1,23 +1,22 @@ cdist-remote-exec-copy(7) ========================= +How to use remote exec and copy + Nico Schottelius -NAME ----- -cdist-remote-exec-copy - How to use remote exec and copy - - INTRO ----- Cdist interacts with the target host in two ways: + - it executes code (__remote_exec) - and it copies files (__remote_copy) By default this is accomplished with ssh and scp respectively. -The default implementations used by cdist are: -__remote_exec: ssh -o User=root -q -__remote_copy: scp -o User=root -q +The default implementations used by cdist are:: + + __remote_exec: ssh -o User=root -q + __remote_copy: scp -o User=root -q The user can override these defaults by providing custom implementations and passing them to cdist with the --remote-exec and/or --remote-copy arguments. @@ -37,7 +36,7 @@ See cdist/other/examples/remote/ for some example implementations. SEE ALSO -------- -- cdist(7) +- `cdist(1) <../man1/cdist.html>`_ COPYING diff --git a/docs/man/man7/cdist-stages.text b/docs/man/man7/cdist-stages.rst similarity index 95% rename from docs/man/man7/cdist-stages.text rename to docs/man/man7/cdist-stages.rst index 5f2d2e4c..4b29585d 100644 --- a/docs/man/man7/cdist-stages.text +++ b/docs/man/man7/cdist-stages.rst @@ -1,12 +1,9 @@ cdist-stages(7) =============== +Stages used during configuration deployment + Nico Schottelius -NAME ----- -cdist-stages - Stages used during configuration deployment - - DESCRIPTION ----------- Starting the execution of deployment with cdist, cdist passes @@ -79,8 +76,8 @@ will be applied to the target. SEE ALSO -------- -- cdist(1) -- cdist-reference(7) +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-reference(7) `_ COPYING diff --git a/docs/man/man7/cdist-troubleshooting.text b/docs/man/man7/cdist-troubleshooting.rst similarity index 52% rename from docs/man/man7/cdist-troubleshooting.text rename to docs/man/man7/cdist-troubleshooting.rst index 7c5e7612..075c3480 100644 --- a/docs/man/man7/cdist-troubleshooting.text +++ b/docs/man/man7/cdist-troubleshooting.rst @@ -1,28 +1,25 @@ cdist-troubleshooting(7) ======================== +Common problems and their solutions + Nico Schottelius -NAME ----- -cdist-troubleshooting - common problems and their solutions - - ERROR IN MANIFEST IS NOT CONSIDERED AN ERROR BY CDIST ----------------------------------------------------- Situation: You are executing other scripts from a manifest. This script fails, but cdist does not recognise the error. An example script would be something like this: --------------------------------------------------------------------------------- -% cat ~/.cdist/manifest/init -"$__manifest/special" -% cat ~/.cdist/manifest/special -#!/bin/sh -echo "Here is an unclean exiting script" -somecommandthatdoesnotexist -echo "I continue here although previous command failed" --------------------------------------------------------------------------------- +.. code-block:: sh + + % cat ~/.cdist/manifest/init + "$__manifest/special" + % cat ~/.cdist/manifest/special + #!/bin/sh + echo "Here is an unclean exiting script" + somecommandthatdoesnotexist + echo "I continue here although previous command failed" We can clearly see that **somecommandthatdoesnotexist** will fail in ~/.cdist/manifest/special. But as the custom @@ -33,28 +30,29 @@ code of the last echo line instead of the failing command. All scripts executed by cdist carry the -e flag. To prevent the above from happening, there are three solutions available, two of which can be used in the calling script: --------------------------------------------------------------------------------- -# Execute as before, but abort on failure -sh -e "$__manifest/special" -# Source the script in our namespace, runs in a set -e environment: -. "$__manifest/special" --------------------------------------------------------------------------------- +.. code-block:: sh + + # Execute as before, but abort on failure + sh -e "$__manifest/special" + + # Source the script in our namespace, runs in a set -e environment: + . "$__manifest/special" The third solution is to include a shebang header in every script you write to use the -e flag: --------------------------------------------------------------------------------- -% cat ~/.cdist/manifest/special -#!/bin/sh -e -... --------------------------------------------------------------------------------- +.. code-block:: sh + + % cat ~/.cdist/manifest/special + #!/bin/sh -e + ... SEE ALSO -------- -- cdist(1) -- cdist-tutorial(7) +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-tutorial(7) `_ COPYING diff --git a/docs/man/man7/cdist-tutorial.text b/docs/man/man7/cdist-tutorial.rst similarity index 78% rename from docs/man/man7/cdist-tutorial.text rename to docs/man/man7/cdist-tutorial.rst index 85419025..4899dcb0 100644 --- a/docs/man/man7/cdist-tutorial.text +++ b/docs/man/man7/cdist-tutorial.rst @@ -1,13 +1,10 @@ cdist-tutorial(7) ================= +A guided introduction into cdist + Nico Schottelius -NAME ----- -cdist-tutorial - a guided introduction into cdist - - INTRODUCTION ------------ This document gives you a pointer on what to read in @@ -16,40 +13,40 @@ So in case you are just starting, just "begin at the beginning" (Brave New World). You can see the target audience in [] brackets after the description. -cdist-quickstart:: +cdist-quickstart New to cdist? Want to get your hands dirty? Read this. [beginner] -cdist-bootstrap:: +cdist-bootstrap The comprehensive guide to your first cdist installation [beginner] -cdist-manifest:: +cdist-manifest Learn how to define which hosts get which configurations [beginner] -cdist-type:: +cdist-type Understand how types are working and created [intermediate] -cdist-best-practice:: +cdist-best-practice Hints from real life experience to help you to organise cdist [intermediate] -cdist-reference:: +cdist-reference The type, explorers and environment variables reference [intermediate] -cdist-explorer:: +cdist-explorer Interested in getting more information about the target system? [intermediate] -cdist-stages:: +cdist-stages Understand the internal workflow of cdist. [advanced] -cdist-hacker:: +cdist-hacker README, if you want to extend or modify cdist. [hacker] SEE ALSO -------- -- cdist(1) -- cdist-type(7) -- cdist-best-practice(7) -- cdist-stages(7) +- `cdist(1) <../man1/cdist.html>`_ +- `cdist-type(7) `_ +- `cdist-best-practice(7) `_ +- `cdist-stages(7) `_ - Brave New World by Aldous Huxley COPYING diff --git a/docs/man/man7/cdist-type.text b/docs/man/man7/cdist-type.rst similarity index 54% rename from docs/man/man7/cdist-type.text rename to docs/man/man7/cdist-type.rst index 71d04ab3..cfd331e1 100644 --- a/docs/man/man7/cdist-type.text +++ b/docs/man/man7/cdist-type.rst @@ -1,18 +1,17 @@ cdist-type(7) ============= +Functionality bundled + Nico Schottelius -NAME ----- -cdist-type - Functionality bundled - - SYNOPSIS -------- -__TYPE ID --parameter value [--parameter value ...] -__TYPE --parameter value [--parameter value ...] (for singletons) +:: + + __TYPE ID --parameter value [--parameter value ...] + __TYPE --parameter value [--parameter value ...] (for singletons) DESCRIPTION @@ -27,13 +26,13 @@ HOW TO USE A TYPE You can use types from the initial manifest or the type manifest like a normal shell command: --------------------------------------------------------------------------------- -# Creates empty file /etc/cdist-configured -__file /etc/cdist-configured --type file +.. code-block:: sh -# Ensure tree is installed -__package tree --state installed --------------------------------------------------------------------------------- + # Creates empty file /etc/cdist-configured + __file /etc/cdist-configured --type file + + # Ensure tree is installed + __package tree --state installed A list of supported types can be found in the cdist-reference(7) manpage. @@ -44,14 +43,16 @@ If a type is flagged as a singleton, it may be used only once per host. This is useful for types which can be used only once on a system. Singleton types do not take an object name as argument. -Example: --------------------------------------------------------------------------------- -# __issue type manages /etc/issue -__issue -# Probably your own type - singletons may use parameters -__myfancysingleton --colour green --------------------------------------------------------------------------------- +Example: + +.. code-block:: sh + + # __issue type manages /etc/issue + __issue + + # Probably your own type - singletons may use parameters + __myfancysingleton --colour green HOW TO WRITE A NEW TYPE @@ -73,9 +74,9 @@ To implement a new type, create the directory **cdist/conf/type/__NAME**. DEFINING PARAMETERS ------------------- Every type consists of required, optional and boolean parameters, which must -each be declared in a newline separated file in ***parameter/required***, -***parameter/required_multiple***, ***parameter/optional***, -***parameter/optional_multiple*** and ***parameter/boolean***. +each be declared in a newline separated file in **parameter/required**, +**parameter/required_multiple**, **parameter/optional**, +**parameter/optional_multiple** and **parameter/boolean**. Parameters which are allowed multiple times should be listed in required_multiple or optional_multiple respectively. All other parameters follow the standard unix behaviour "the last given wins". @@ -83,18 +84,19 @@ If either is missing, the type will have no required, no optional, no boolean or no parameters at all. Default values for optional parameters can be predefined in -***parameter/default/***. +**parameter/default/**. Example: --------------------------------------------------------------------------------- -echo servername >> cdist/conf/type/__nginx_vhost/parameter/required -echo logdirectory >> cdist/conf/type/__nginx_vhost/parameter/optional -echo loglevel >> cdist/conf/type/__nginx_vhost/parameter/optional -mkdir cdist/conf/type/__nginx_vhost/parameter/default -echo warning > cdist/conf/type/__nginx_vhost/parameter/default/loglevel -echo server_alias >> cdist/conf/type/__nginx_vhost/parameter/optional_multiple -echo use_ssl >> cdist/conf/type/__nginx_vhost/parameter/boolean --------------------------------------------------------------------------------- + +.. code-block:: sh + + echo servername >> cdist/conf/type/__nginx_vhost/parameter/required + echo logdirectory >> cdist/conf/type/__nginx_vhost/parameter/optional + echo loglevel >> cdist/conf/type/__nginx_vhost/parameter/optional + mkdir cdist/conf/type/__nginx_vhost/parameter/default + echo warning > cdist/conf/type/__nginx_vhost/parameter/default/loglevel + echo server_alias >> cdist/conf/type/__nginx_vhost/parameter/optional_multiple + echo use_ssl >> cdist/conf/type/__nginx_vhost/parameter/boolean USING PARAMETERS @@ -105,60 +107,62 @@ represented by file existence. File exists -> True, file does not exist -> False Example: (e.g. in cdist/conf/type/__nginx_vhost/manifest) --------------------------------------------------------------------------------- -# required parameter -servername="$(cat "$__object/parameter/servername")" -# optional parameter -if [ -f "$__object/parameter/logdirectory" ]; then - logdirectory="$(cat "$__object/parameter/logdirectory")" -fi +.. code-block:: sh -# optional parameter with predefined default -loglevel="$(cat "$__object/parameter/loglevel")" + # required parameter + servername="$(cat "$__object/parameter/servername")" -# boolean parameter -if [ -f "$__object/parameter/use_ssl" ]; then - # file exists -> True - # do some fancy ssl stuff -fi + # optional parameter + if [ -f "$__object/parameter/logdirectory" ]; then + logdirectory="$(cat "$__object/parameter/logdirectory")" + fi -# parameter with multiple values -if [ -f "$__object/parameter/server_alias" ]; then - for alias in $(cat "$__object/parameter/server_alias"); do - echo $alias > /some/where/usefull - done -fi + # optional parameter with predefined default + loglevel="$(cat "$__object/parameter/loglevel")" --------------------------------------------------------------------------------- + # boolean parameter + if [ -f "$__object/parameter/use_ssl" ]; then + # file exists -> True + # do some fancy ssl stuff + fi + + # parameter with multiple values + if [ -f "$__object/parameter/server_alias" ]; then + for alias in $(cat "$__object/parameter/server_alias"); do + echo $alias > /some/where/usefull + done + fi INPUT FROM STDIN ---------------- Every type can access what has been written on stdin when it has been called. -The result is saved into the ***stdin*** file in the object directory. +The result is saved into the **stdin** file in the object directory. Example use of a type: (e.g. in cdist/conf/type/__archlinux_hostname) --------------------------------------------------------------------------------- -__file /etc/rc.conf --source - << eof -... -HOSTNAME="$__target_host" -... -eof --------------------------------------------------------------------------------- + +.. code-block:: sh + + __file /etc/rc.conf --source - << eof + ... + HOSTNAME="$__target_host" + ... + eof + If you have not seen this syntax (<< eof) before, it may help you to read about "here documents". In the __file type, stdin is used as source for the file, if - is used for source: --------------------------------------------------------------------------------- +.. code-block:: sh + if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" if [ "$source" = "-" ]; then source="$__object/stdin" fi .... --------------------------------------------------------------------------------- WRITING THE MANIFEST @@ -167,20 +171,20 @@ In the manifest of a type you can use other types, so your type extends their functionality. A good example is the __package type, which in a shortened version looks like this: --------------------------------------------------------------------------------- -os="$(cat "$__global/explorer/os")" -case "$os" in - archlinux) type="pacman" ;; - debian|ubuntu) type="apt" ;; - gentoo) type="emerge" ;; - *) - echo "Don't know how to manage packages on: $os" >&2 - exit 1 - ;; -esac +.. code-block:: sh -__package_$type "$@" --------------------------------------------------------------------------------- + os="$(cat "$__global/explorer/os")" + case "$os" in + archlinux) type="pacman" ;; + debian|ubuntu) type="apt" ;; + gentoo) type="emerge" ;; + *) + echo "Don't know how to manage packages on: $os" >&2 + exit 1 + ;; + esac + + __package_$type "$@" As you can see, the type can reference different environment variables, which are documented in cdist-reference(7). @@ -195,15 +199,15 @@ If you want to ensure that a type can only be used once per target, you can mark it as a singleton: Just create the (empty) file "singleton" in your type directory: --------------------------------------------------------------------------------- -touch cdist/conf/type/__NAME/singleton --------------------------------------------------------------------------------- +.. code-block:: sh + + touch cdist/conf/type/__NAME/singleton This will also change the way your type must be called: --------------------------------------------------------------------------------- -__YOURTYPE --parameter value --------------------------------------------------------------------------------- +.. code-block:: sh + + __YOURTYPE --parameter value As you can see, the object ID is omitted, because it does not make any sense, if your type can be used only once. @@ -218,22 +222,22 @@ The explorers are stored under the "explorer" directory below the type. It could for instance contain code to check the md5sum of a file on the client, like this (shortened version from the type __file): --------------------------------------------------------------------------------- -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - destination="/$__object_id" -fi +.. code-block:: sh -if [ -e "$destination" ]; then - md5sum < "$destination" -fi --------------------------------------------------------------------------------- + if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" + else + destination="/$__object_id" + fi + + if [ -e "$destination" ]; then + md5sum < "$destination" + fi WRITING THE GENCODE SCRIPT -------------------------- -There are two gencode scripts: ***gencode-local*** and ***gencode-remote***. +There are two gencode scripts: **gencode-local** and **gencode-remote**. The output of gencode-local is executed locally, whereas the output of gencode-remote is executed on the target. The gencode scripts can make use of the parameters, the global explorers @@ -243,13 +247,13 @@ If the gencode scripts encounters an error, it should print diagnostic messages to stderr and exit non-zero. If you need to debug the gencode script, you can write to stderr: --------------------------------------------------------------------------------- -# Debug output to stderr -echo "My fancy debug line" >&2 +.. code-block:: sh -# Output to be saved by cdist for execution on the target -echo "touch /etc/cdist-configured" --------------------------------------------------------------------------------- + # Debug output to stderr + echo "My fancy debug line" >&2 + + # Output to be saved by cdist for execution on the target + echo "touch /etc/cdist-configured" VARIABLE ACCESS FROM THE GENERATED SCRIPTS @@ -264,13 +268,13 @@ files after the script execution. So when you generate a script with the following content, it will work: --------------------------------------------------------------------------------- -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi --------------------------------------------------------------------------------- +.. code-block:: sh + + if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" + else + name="$__object_id" + fi HINTS FOR TYPEWRITERS @@ -298,10 +302,10 @@ how to submit it. SEE ALSO -------- -- cdist-explorer(7) -- cdist-hacker(7) -- cdist-stages(7) -- cdist-tutorial(7) +- `cdist-explorer(7) `_ +- `cdist-hacker(7) `_ +- `cdist-stages(7) `_ +- `cdist-tutorial(7) `_ COPYING diff --git a/docs/man/man7/cdist-type__apt_key.rst b/docs/man/man7/cdist-type__apt_key.rst new file mode 120000 index 00000000..12d532ee --- /dev/null +++ b/docs/man/man7/cdist-type__apt_key.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__apt_key/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__apt_key_uri.rst b/docs/man/man7/cdist-type__apt_key_uri.rst new file mode 120000 index 00000000..e90fda00 --- /dev/null +++ b/docs/man/man7/cdist-type__apt_key_uri.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__apt_key_uri/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__apt_norecommends.rst b/docs/man/man7/cdist-type__apt_norecommends.rst new file mode 120000 index 00000000..2ce4bdea --- /dev/null +++ b/docs/man/man7/cdist-type__apt_norecommends.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__apt_norecommends/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__apt_ppa.rst b/docs/man/man7/cdist-type__apt_ppa.rst new file mode 120000 index 00000000..efdc1de2 --- /dev/null +++ b/docs/man/man7/cdist-type__apt_ppa.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__apt_ppa/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__apt_source.rst b/docs/man/man7/cdist-type__apt_source.rst new file mode 120000 index 00000000..2d2c77b7 --- /dev/null +++ b/docs/man/man7/cdist-type__apt_source.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__apt_source/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__apt_update_index.rst b/docs/man/man7/cdist-type__apt_update_index.rst new file mode 120000 index 00000000..f2ee88e7 --- /dev/null +++ b/docs/man/man7/cdist-type__apt_update_index.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__apt_update_index/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__block.rst b/docs/man/man7/cdist-type__block.rst new file mode 120000 index 00000000..74d8e18f --- /dev/null +++ b/docs/man/man7/cdist-type__block.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__block/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__ccollect_source.rst b/docs/man/man7/cdist-type__ccollect_source.rst new file mode 120000 index 00000000..8398eb0f --- /dev/null +++ b/docs/man/man7/cdist-type__ccollect_source.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__ccollect_source/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__cdist.rst b/docs/man/man7/cdist-type__cdist.rst new file mode 120000 index 00000000..483afed8 --- /dev/null +++ b/docs/man/man7/cdist-type__cdist.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__cdist/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__cdistmarker.rst b/docs/man/man7/cdist-type__cdistmarker.rst new file mode 120000 index 00000000..3b4db6a6 --- /dev/null +++ b/docs/man/man7/cdist-type__cdistmarker.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__cdistmarker/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__config_file.rst b/docs/man/man7/cdist-type__config_file.rst new file mode 120000 index 00000000..714be1a6 --- /dev/null +++ b/docs/man/man7/cdist-type__config_file.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__config_file/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul.rst b/docs/man/man7/cdist-type__consul.rst new file mode 120000 index 00000000..5548772f --- /dev/null +++ b/docs/man/man7/cdist-type__consul.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_agent.rst b/docs/man/man7/cdist-type__consul_agent.rst new file mode 120000 index 00000000..89101b6e --- /dev/null +++ b/docs/man/man7/cdist-type__consul_agent.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_agent/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_check.rst b/docs/man/man7/cdist-type__consul_check.rst new file mode 120000 index 00000000..767cfc78 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_check.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_check/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_reload.rst b/docs/man/man7/cdist-type__consul_reload.rst new file mode 120000 index 00000000..9344d259 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_reload.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_reload/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_service.rst b/docs/man/man7/cdist-type__consul_service.rst new file mode 120000 index 00000000..697b6de7 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_service.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_service/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_template.rst b/docs/man/man7/cdist-type__consul_template.rst new file mode 120000 index 00000000..73cb7f66 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_template.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_template/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_template_template.rst b/docs/man/man7/cdist-type__consul_template_template.rst new file mode 120000 index 00000000..ea2fa00e --- /dev/null +++ b/docs/man/man7/cdist-type__consul_template_template.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_template_template/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_watch_checks.rst b/docs/man/man7/cdist-type__consul_watch_checks.rst new file mode 120000 index 00000000..241f2c86 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_watch_checks.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_watch_checks/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_watch_event.rst b/docs/man/man7/cdist-type__consul_watch_event.rst new file mode 120000 index 00000000..710f69bb --- /dev/null +++ b/docs/man/man7/cdist-type__consul_watch_event.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_watch_event/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_watch_key.rst b/docs/man/man7/cdist-type__consul_watch_key.rst new file mode 120000 index 00000000..d3987862 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_watch_key.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_watch_key/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_watch_keyprefix.rst b/docs/man/man7/cdist-type__consul_watch_keyprefix.rst new file mode 120000 index 00000000..f5a58339 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_watch_keyprefix.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_watch_keyprefix/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_watch_nodes.rst b/docs/man/man7/cdist-type__consul_watch_nodes.rst new file mode 120000 index 00000000..20b29324 --- /dev/null +++ b/docs/man/man7/cdist-type__consul_watch_nodes.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_watch_nodes/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_watch_service.rst b/docs/man/man7/cdist-type__consul_watch_service.rst new file mode 120000 index 00000000..0965c7ca --- /dev/null +++ b/docs/man/man7/cdist-type__consul_watch_service.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_watch_service/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__consul_watch_services.rst b/docs/man/man7/cdist-type__consul_watch_services.rst new file mode 120000 index 00000000..06610a8c --- /dev/null +++ b/docs/man/man7/cdist-type__consul_watch_services.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__consul_watch_services/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__cron.rst b/docs/man/man7/cdist-type__cron.rst new file mode 120000 index 00000000..783ef87d --- /dev/null +++ b/docs/man/man7/cdist-type__cron.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__cron/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__debconf_set_selections.rst b/docs/man/man7/cdist-type__debconf_set_selections.rst new file mode 120000 index 00000000..88c233ae --- /dev/null +++ b/docs/man/man7/cdist-type__debconf_set_selections.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__debconf_set_selections/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__directory.rst b/docs/man/man7/cdist-type__directory.rst new file mode 120000 index 00000000..8c25832f --- /dev/null +++ b/docs/man/man7/cdist-type__directory.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__directory/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__dog_vdi.rst b/docs/man/man7/cdist-type__dog_vdi.rst new file mode 120000 index 00000000..4ffbb2db --- /dev/null +++ b/docs/man/man7/cdist-type__dog_vdi.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__dog_vdi/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__file.rst b/docs/man/man7/cdist-type__file.rst new file mode 120000 index 00000000..60aa8b88 --- /dev/null +++ b/docs/man/man7/cdist-type__file.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__file/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__firewalld_rule.rst b/docs/man/man7/cdist-type__firewalld_rule.rst new file mode 120000 index 00000000..756b8d20 --- /dev/null +++ b/docs/man/man7/cdist-type__firewalld_rule.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__firewalld_rule/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__git.rst b/docs/man/man7/cdist-type__git.rst new file mode 120000 index 00000000..14057be3 --- /dev/null +++ b/docs/man/man7/cdist-type__git.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__git/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__group.rst b/docs/man/man7/cdist-type__group.rst new file mode 120000 index 00000000..a35a5779 --- /dev/null +++ b/docs/man/man7/cdist-type__group.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__group/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__hostname.rst b/docs/man/man7/cdist-type__hostname.rst new file mode 120000 index 00000000..46eaec8b --- /dev/null +++ b/docs/man/man7/cdist-type__hostname.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__hostname/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__iptables_apply.rst b/docs/man/man7/cdist-type__iptables_apply.rst new file mode 120000 index 00000000..cc4c25d7 --- /dev/null +++ b/docs/man/man7/cdist-type__iptables_apply.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__iptables_apply/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__iptables_rule.rst b/docs/man/man7/cdist-type__iptables_rule.rst new file mode 120000 index 00000000..4e5c50f4 --- /dev/null +++ b/docs/man/man7/cdist-type__iptables_rule.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__iptables_rule/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__issue.rst b/docs/man/man7/cdist-type__issue.rst new file mode 120000 index 00000000..9dad6d0d --- /dev/null +++ b/docs/man/man7/cdist-type__issue.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__issue/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__jail.rst b/docs/man/man7/cdist-type__jail.rst new file mode 120000 index 00000000..75ad8a18 --- /dev/null +++ b/docs/man/man7/cdist-type__jail.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__jail/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__key_value.rst b/docs/man/man7/cdist-type__key_value.rst new file mode 120000 index 00000000..0dd8b882 --- /dev/null +++ b/docs/man/man7/cdist-type__key_value.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__key_value/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__line.rst b/docs/man/man7/cdist-type__line.rst new file mode 120000 index 00000000..3d6b98d5 --- /dev/null +++ b/docs/man/man7/cdist-type__line.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__line/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__link.rst b/docs/man/man7/cdist-type__link.rst new file mode 120000 index 00000000..ecb21b4a --- /dev/null +++ b/docs/man/man7/cdist-type__link.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__link/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__locale.rst b/docs/man/man7/cdist-type__locale.rst new file mode 120000 index 00000000..b1506d28 --- /dev/null +++ b/docs/man/man7/cdist-type__locale.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__locale/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__motd.rst b/docs/man/man7/cdist-type__motd.rst new file mode 120000 index 00000000..300ad9bd --- /dev/null +++ b/docs/man/man7/cdist-type__motd.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__motd/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__mount.rst b/docs/man/man7/cdist-type__mount.rst new file mode 120000 index 00000000..e2ee3a56 --- /dev/null +++ b/docs/man/man7/cdist-type__mount.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__mount/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__mysql_database.rst b/docs/man/man7/cdist-type__mysql_database.rst new file mode 120000 index 00000000..3d0ebe5f --- /dev/null +++ b/docs/man/man7/cdist-type__mysql_database.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__mysql_database/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package.rst b/docs/man/man7/cdist-type__package.rst new file mode 120000 index 00000000..da9a827a --- /dev/null +++ b/docs/man/man7/cdist-type__package.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_apt.rst b/docs/man/man7/cdist-type__package_apt.rst new file mode 120000 index 00000000..c1c21110 --- /dev/null +++ b/docs/man/man7/cdist-type__package_apt.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_apt/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_emerge.rst b/docs/man/man7/cdist-type__package_emerge.rst new file mode 120000 index 00000000..33312455 --- /dev/null +++ b/docs/man/man7/cdist-type__package_emerge.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_emerge/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_emerge_dependencies.rst b/docs/man/man7/cdist-type__package_emerge_dependencies.rst new file mode 120000 index 00000000..785ccd97 --- /dev/null +++ b/docs/man/man7/cdist-type__package_emerge_dependencies.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_emerge_dependencies/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_luarocks.rst b/docs/man/man7/cdist-type__package_luarocks.rst new file mode 120000 index 00000000..e87cc0ee --- /dev/null +++ b/docs/man/man7/cdist-type__package_luarocks.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_luarocks/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_opkg.rst b/docs/man/man7/cdist-type__package_opkg.rst new file mode 120000 index 00000000..0ea6199b --- /dev/null +++ b/docs/man/man7/cdist-type__package_opkg.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_opkg/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_pacman.rst b/docs/man/man7/cdist-type__package_pacman.rst new file mode 120000 index 00000000..30d0efd1 --- /dev/null +++ b/docs/man/man7/cdist-type__package_pacman.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_pacman/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_pip.rst b/docs/man/man7/cdist-type__package_pip.rst new file mode 120000 index 00000000..1d8202ff --- /dev/null +++ b/docs/man/man7/cdist-type__package_pip.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_pip/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_pkg_freebsd.rst b/docs/man/man7/cdist-type__package_pkg_freebsd.rst new file mode 120000 index 00000000..2fcbb36b --- /dev/null +++ b/docs/man/man7/cdist-type__package_pkg_freebsd.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_pkg_freebsd/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_pkg_openbsd.rst b/docs/man/man7/cdist-type__package_pkg_openbsd.rst new file mode 120000 index 00000000..01676166 --- /dev/null +++ b/docs/man/man7/cdist-type__package_pkg_openbsd.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_pkg_openbsd/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_pkgng_freebsd.rst b/docs/man/man7/cdist-type__package_pkgng_freebsd.rst new file mode 120000 index 00000000..2cac19eb --- /dev/null +++ b/docs/man/man7/cdist-type__package_pkgng_freebsd.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_pkgng_freebsd/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_rubygem.rst b/docs/man/man7/cdist-type__package_rubygem.rst new file mode 120000 index 00000000..e9b394fd --- /dev/null +++ b/docs/man/man7/cdist-type__package_rubygem.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_rubygem/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_update_index.rst b/docs/man/man7/cdist-type__package_update_index.rst new file mode 120000 index 00000000..1d4175a9 --- /dev/null +++ b/docs/man/man7/cdist-type__package_update_index.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_update_index/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_upgrade_all.rst b/docs/man/man7/cdist-type__package_upgrade_all.rst new file mode 120000 index 00000000..7fb535e2 --- /dev/null +++ b/docs/man/man7/cdist-type__package_upgrade_all.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_upgrade_all/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_yum.rst b/docs/man/man7/cdist-type__package_yum.rst new file mode 120000 index 00000000..eebce5b1 --- /dev/null +++ b/docs/man/man7/cdist-type__package_yum.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_yum/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__package_zypper.rst b/docs/man/man7/cdist-type__package_zypper.rst new file mode 120000 index 00000000..b35d0f25 --- /dev/null +++ b/docs/man/man7/cdist-type__package_zypper.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__package_zypper/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__pacman_conf.rst b/docs/man/man7/cdist-type__pacman_conf.rst new file mode 120000 index 00000000..99901486 --- /dev/null +++ b/docs/man/man7/cdist-type__pacman_conf.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__pacman_conf/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__pacman_conf_integrate.rst b/docs/man/man7/cdist-type__pacman_conf_integrate.rst new file mode 120000 index 00000000..298576dc --- /dev/null +++ b/docs/man/man7/cdist-type__pacman_conf_integrate.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__pacman_conf_integrate/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__pf_apply.rst b/docs/man/man7/cdist-type__pf_apply.rst new file mode 120000 index 00000000..6897ffad --- /dev/null +++ b/docs/man/man7/cdist-type__pf_apply.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__pf_apply/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__pf_ruleset.rst b/docs/man/man7/cdist-type__pf_ruleset.rst new file mode 120000 index 00000000..6f484a26 --- /dev/null +++ b/docs/man/man7/cdist-type__pf_ruleset.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__pf_ruleset/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__postfix.rst b/docs/man/man7/cdist-type__postfix.rst new file mode 120000 index 00000000..43001302 --- /dev/null +++ b/docs/man/man7/cdist-type__postfix.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__postfix/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__postfix_master.rst b/docs/man/man7/cdist-type__postfix_master.rst new file mode 120000 index 00000000..7e35f771 --- /dev/null +++ b/docs/man/man7/cdist-type__postfix_master.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__postfix_master/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__postfix_postconf.rst b/docs/man/man7/cdist-type__postfix_postconf.rst new file mode 120000 index 00000000..2e66b0fc --- /dev/null +++ b/docs/man/man7/cdist-type__postfix_postconf.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__postfix_postconf/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__postfix_postmap.rst b/docs/man/man7/cdist-type__postfix_postmap.rst new file mode 120000 index 00000000..5fab5328 --- /dev/null +++ b/docs/man/man7/cdist-type__postfix_postmap.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__postfix_postmap/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__postfix_reload.rst b/docs/man/man7/cdist-type__postfix_reload.rst new file mode 120000 index 00000000..b60fc927 --- /dev/null +++ b/docs/man/man7/cdist-type__postfix_reload.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__postfix_reload/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__postgres_database.rst b/docs/man/man7/cdist-type__postgres_database.rst new file mode 120000 index 00000000..22697ebb --- /dev/null +++ b/docs/man/man7/cdist-type__postgres_database.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__postgres_database/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__postgres_role.rst b/docs/man/man7/cdist-type__postgres_role.rst new file mode 120000 index 00000000..ffd8cfc2 --- /dev/null +++ b/docs/man/man7/cdist-type__postgres_role.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__postgres_role/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__process.rst b/docs/man/man7/cdist-type__process.rst new file mode 120000 index 00000000..6385603a --- /dev/null +++ b/docs/man/man7/cdist-type__process.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__process/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__pyvenv.rst b/docs/man/man7/cdist-type__pyvenv.rst new file mode 120000 index 00000000..b7fdf05e --- /dev/null +++ b/docs/man/man7/cdist-type__pyvenv.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__pyvenv/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__qemu_img.rst b/docs/man/man7/cdist-type__qemu_img.rst new file mode 120000 index 00000000..88797991 --- /dev/null +++ b/docs/man/man7/cdist-type__qemu_img.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__qemu_img/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__rbenv.rst b/docs/man/man7/cdist-type__rbenv.rst new file mode 120000 index 00000000..6f990abf --- /dev/null +++ b/docs/man/man7/cdist-type__rbenv.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__rbenv/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__rsync.rst b/docs/man/man7/cdist-type__rsync.rst new file mode 120000 index 00000000..c581bd7b --- /dev/null +++ b/docs/man/man7/cdist-type__rsync.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__rsync/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__rvm.rst b/docs/man/man7/cdist-type__rvm.rst new file mode 120000 index 00000000..ad7c1fde --- /dev/null +++ b/docs/man/man7/cdist-type__rvm.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__rvm/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__rvm_gem.rst b/docs/man/man7/cdist-type__rvm_gem.rst new file mode 120000 index 00000000..fd1c83c1 --- /dev/null +++ b/docs/man/man7/cdist-type__rvm_gem.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__rvm_gem/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__rvm_gemset.rst b/docs/man/man7/cdist-type__rvm_gemset.rst new file mode 120000 index 00000000..49da138a --- /dev/null +++ b/docs/man/man7/cdist-type__rvm_gemset.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__rvm_gemset/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__rvm_ruby.rst b/docs/man/man7/cdist-type__rvm_ruby.rst new file mode 120000 index 00000000..48fec75d --- /dev/null +++ b/docs/man/man7/cdist-type__rvm_ruby.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__rvm_ruby/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__ssh_authorized_key.rst b/docs/man/man7/cdist-type__ssh_authorized_key.rst new file mode 120000 index 00000000..b82695cb --- /dev/null +++ b/docs/man/man7/cdist-type__ssh_authorized_key.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__ssh_authorized_key/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__ssh_authorized_keys.rst b/docs/man/man7/cdist-type__ssh_authorized_keys.rst new file mode 120000 index 00000000..71794a71 --- /dev/null +++ b/docs/man/man7/cdist-type__ssh_authorized_keys.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__ssh_authorized_keys/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__ssh_dot_ssh.rst b/docs/man/man7/cdist-type__ssh_dot_ssh.rst new file mode 120000 index 00000000..e88fc415 --- /dev/null +++ b/docs/man/man7/cdist-type__ssh_dot_ssh.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__ssh_dot_ssh/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__staged_file.rst b/docs/man/man7/cdist-type__staged_file.rst new file mode 120000 index 00000000..17e94c67 --- /dev/null +++ b/docs/man/man7/cdist-type__staged_file.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__staged_file/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__start_on_boot.rst b/docs/man/man7/cdist-type__start_on_boot.rst new file mode 120000 index 00000000..f0223931 --- /dev/null +++ b/docs/man/man7/cdist-type__start_on_boot.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__start_on_boot/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__timezone.rst b/docs/man/man7/cdist-type__timezone.rst new file mode 120000 index 00000000..fd6db767 --- /dev/null +++ b/docs/man/man7/cdist-type__timezone.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__timezone/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__update_alternatives.rst b/docs/man/man7/cdist-type__update_alternatives.rst new file mode 120000 index 00000000..6337c09d --- /dev/null +++ b/docs/man/man7/cdist-type__update_alternatives.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__update_alternatives/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__user.rst b/docs/man/man7/cdist-type__user.rst new file mode 120000 index 00000000..feea364d --- /dev/null +++ b/docs/man/man7/cdist-type__user.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__user/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__user_groups.rst b/docs/man/man7/cdist-type__user_groups.rst new file mode 120000 index 00000000..92de8259 --- /dev/null +++ b/docs/man/man7/cdist-type__user_groups.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__user_groups/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__yum_repo.rst b/docs/man/man7/cdist-type__yum_repo.rst new file mode 120000 index 00000000..213fc81e --- /dev/null +++ b/docs/man/man7/cdist-type__yum_repo.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__yum_repo/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__zypper_repo.rst b/docs/man/man7/cdist-type__zypper_repo.rst new file mode 120000 index 00000000..8e6e7d14 --- /dev/null +++ b/docs/man/man7/cdist-type__zypper_repo.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__zypper_repo/man.rst \ No newline at end of file diff --git a/docs/man/man7/cdist-type__zypper_service.rst b/docs/man/man7/cdist-type__zypper_service.rst new file mode 120000 index 00000000..7b238e8f --- /dev/null +++ b/docs/man/man7/cdist-type__zypper_service.rst @@ -0,0 +1 @@ +../../../cdist/conf/type/__zypper_service/man.rst \ No newline at end of file diff --git a/other/archived_types/__autofs/man.text b/other/archived_types/__autofs/man.rst similarity index 65% rename from other/archived_types/__autofs/man.text rename to other/archived_types/__autofs/man.rst index 9b343309..4f02720e 100644 --- a/other/archived_types/__autofs/man.text +++ b/other/archived_types/__autofs/man.rst @@ -1,13 +1,10 @@ cdist-type__autofs(7) ===================== +Install and start autofs + Steven Armstrong -NAME ----- -cdist-type__autofs - install and start autofs - - DESCRIPTION ----------- This space intentionally left blank. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__autofs --------------------------------------------------------------------------------- +.. code-block:: sh + + __autofs SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/other/archived_types/__autofs_map/man.text b/other/archived_types/__autofs_map/man.rst similarity index 62% rename from other/archived_types/__autofs_map/man.text rename to other/archived_types/__autofs_map/man.rst index 50ce2fa8..dfb79a27 100644 --- a/other/archived_types/__autofs_map/man.text +++ b/other/archived_types/__autofs_map/man.rst @@ -1,13 +1,10 @@ cdist-type__autofs_map(7) ========================= +Manage autofs maps + Steven Armstrong -NAME ----- -cdist-type__autofs_map - Manage autofs maps - - DESCRIPTION ----------- This cdist type allows you to define maps for autofs. @@ -20,48 +17,50 @@ The object_id is used as the mount-point as described in auto.master(5). REQUIRED PARAMETERS ------------------- -map:: +map Name of the map to use. See auto.master(5). OPTIONAL PARAMETERS ------------------- -type:: +type Type of map used for this mount point. Defaults to 'file'. See map-type in auto.master(5) for possible values. -options:: + +options See auto.master(5). -comment:: + +comment A comment describing this map. Is added to the generated entry in auto.master. BOOLEAN PARAMETERS ------------------ -noreload:: +noreload don't reload autofs after the entry has been changed EXAMPLES -------- --------------------------------------------------------------------------------- -# Add auto mounter at /net and reload -__autofs_map /net --map /etc/auto.net --type program +.. code-block:: sh -# Add auto mounter at /pub and don't reload -__autofs_map /pub \ - --map /etc/auto.pub \ - --type file \ - --options "nosuid,rw,bg,hard,intr --ghost" \ - --noreload --------------------------------------------------------------------------------- + # Add auto mounter at /net and reload + __autofs_map /net --map /etc/auto.net --type program + + # Add auto mounter at /pub and don't reload + __autofs_map /pub \ + --map /etc/auto.pub \ + --type file \ + --options "nosuid,rw,bg,hard,intr --ghost" \ + --noreload SEE ALSO -------- -- cdist-type(7) -- cdist-type__autofs_reload(7) +- `cdist-type(7) `_ +- `cdist-type__autofs_reload(7) `_ COPYING diff --git a/other/archived_types/__autofs_reload/man.text b/other/archived_types/__autofs_reload/man.rst similarity index 63% rename from other/archived_types/__autofs_reload/man.text rename to other/archived_types/__autofs_reload/man.rst index d2085a98..101e9965 100644 --- a/other/archived_types/__autofs_reload/man.text +++ b/other/archived_types/__autofs_reload/man.rst @@ -1,13 +1,10 @@ cdist-type__autofs_reload(7) ============================ +Tell automounter to reload config file + Steven Armstrong -NAME ----- -cdist-type__autofs_reload - tell automounter to reload config file - - DESCRIPTION ----------- This space intentionally left blank. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__autofs_reload --------------------------------------------------------------------------------- +.. code-block:: sh + + __autofs_reload SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/other/types_submitted_for_inclusion/__init_script/man.text b/other/types_submitted_for_inclusion/__init_script/man.rst similarity index 63% rename from other/types_submitted_for_inclusion/__init_script/man.text rename to other/types_submitted_for_inclusion/__init_script/man.rst index c33ff7b7..9d9220d4 100644 --- a/other/types_submitted_for_inclusion/__init_script/man.text +++ b/other/types_submitted_for_inclusion/__init_script/man.rst @@ -1,13 +1,10 @@ cdist-type__init_script(7) ========================== +Use the init scripts + Daniel Roth -NAME ----- -cdist-type__init_script - Use the init scripts - - DESCRIPTION ----------- This type can be used to control your init scripts. @@ -15,34 +12,35 @@ This type can be used to control your init scripts. REQUIRED PARAMETERS ------------------- -mode:: +mode Specifies what shall be done with the init script (usually one of 'start'|'stop'|'restart'|'reload' or 'force-reload') OPTIONAL PARAMETERS ------------------- -script:: +script If supplied, use this as the init-script. Otherwise the object_id is used. -base_dir:: +base_dir If supplied, this type uses this directory instead of '/etc/init.d'. The parameter will not need an ending slash. + EXAMPLES -------- --------------------------------------------------------------------------------- -# Reloads the configuration for lighttpd -__init_script lighttpd --mode force-reload +.. code-block:: sh -# Reloads the configuration for lighttpd -__init_script lighty --script lighttpd --mode force-reload --------------------------------------------------------------------------------- + # Reloads the configuration for lighttpd + __init_script lighttpd --mode force-reload + + # Reloads the configuration for lighttpd + __init_script lighty --script lighttpd --mode force-reload SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/other/types_submitted_for_inclusion/__mysql_server/man.text b/other/types_submitted_for_inclusion/__mysql_server/man.rst similarity index 58% rename from other/types_submitted_for_inclusion/__mysql_server/man.text rename to other/types_submitted_for_inclusion/__mysql_server/man.rst index f8573051..c561117c 100644 --- a/other/types_submitted_for_inclusion/__mysql_server/man.text +++ b/other/types_submitted_for_inclusion/__mysql_server/man.rst @@ -1,13 +1,10 @@ cdist-type__mysql_server(7) =========================== +Manage a MySQL server + Benedikt Koeppel -NAME ----- -cdist-type__mysql_server - Manage a MySQL server - - DESCRIPTION ----------- This cdist type allows you to install a MySQL database server. The @@ -18,13 +15,13 @@ with MySQL. REQUIRED PARAMETERS ------------------- -password:: +password The root password to set. OPTIONAL PARAMETERS ------------------- -no_my_cnf:: +no_my_cnf The /root/.my.cnf file is used to temporary store the root password when doing the mysql_secure_installation. If you want to have your own .my.cnf file, then specify --no_my_cnf "true". @@ -34,24 +31,24 @@ no_my_cnf:: EXAMPLES -------- --------------------------------------------------------------------------------- -# to install a MySQL server -__mysql_server +.. code-block:: sh -# to install a MySQL server, remove remote access, remove test databases -# similar to mysql_secure_installation, specify the root password -__mysql_server --password "Uu9jooKe" -# this will also write a /root/.my.cnf file + # to install a MySQL server + __mysql_server -# if you don't want cdist to write a /root/.my.cnf file permanently, specify -# the --no_my_cnf option -__mysql_server --password "Uu9jooKe" --no_my_cnf --------------------------------------------------------------------------------- + # to install a MySQL server, remove remote access, remove test databases + # similar to mysql_secure_installation, specify the root password + __mysql_server --password "Uu9jooKe" + # this will also write a /root/.my.cnf file + + # if you don't want cdist to write a /root/.my.cnf file permanently, specify + # the --no_my_cnf option + __mysql_server --password "Uu9jooKe" --no_my_cnf SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/other/types_submitted_for_inclusion/__nfs_client/man.text b/other/types_submitted_for_inclusion/__nfs_client/man.rst similarity index 67% rename from other/types_submitted_for_inclusion/__nfs_client/man.text rename to other/types_submitted_for_inclusion/__nfs_client/man.rst index 3f0808a7..3c582958 100644 --- a/other/types_submitted_for_inclusion/__nfs_client/man.text +++ b/other/types_submitted_for_inclusion/__nfs_client/man.rst @@ -1,13 +1,10 @@ cdist-type__nfs_client(7) ========================= +nfs client + Steven Armstrong -NAME ----- -cdist-type__nfs_client - nfs client - - DESCRIPTION ----------- Install, start, do whatever is necessary to have a working nfs client. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__nfs_client --------------------------------------------------------------------------------- +.. code-block:: sh + + __nfs_client SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/other/types_submitted_for_inclusion/__nfs_export/man.text b/other/types_submitted_for_inclusion/__nfs_export/man.rst similarity index 67% rename from other/types_submitted_for_inclusion/__nfs_export/man.text rename to other/types_submitted_for_inclusion/__nfs_export/man.rst index 41ff64e8..4dd164ec 100644 --- a/other/types_submitted_for_inclusion/__nfs_export/man.text +++ b/other/types_submitted_for_inclusion/__nfs_export/man.rst @@ -1,13 +1,10 @@ cdist-type__nfs_export(7) ========================= +Manage nfs exports + Steven Armstrong -NAME ----- -cdist-type__nfs_export - manage nfs exports - - DESCRIPTION ----------- This cdist type allows you to manage entries in /etc/exports.d. @@ -17,35 +14,35 @@ For older distributions (currently ubuntu lucid) that don't support REQUIRED PARAMETERS ------------------- -client:: +client space delimited list of client ip/networks for use in /etc/exports. See exports(5) OPTIONAL PARAMETERS ------------------- -options:: +options export options for use in /etc/exports. See exports(5) -export:: +export the directory to export. Defaults to object_id -state:: +state Either present or absent. Defaults to present. EXAMPLES -------- --------------------------------------------------------------------------------- -__nfs_export /local/chroot/lucid-amd64 \ - --client "192.168.0.1/24 10.0.0.1/16" \ - --options "ro,async,no_all_squash,no_root_squash,subtree_check" --------------------------------------------------------------------------------- +.. code-block:: sh + + __nfs_export /local/chroot/lucid-amd64 \ + --client "192.168.0.1/24 10.0.0.1/16" \ + --options "ro,async,no_all_squash,no_root_squash,subtree_check" SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ - exports(5) diff --git a/other/types_submitted_for_inclusion/__nfs_server/man.text b/other/types_submitted_for_inclusion/__nfs_server/man.rst similarity index 67% rename from other/types_submitted_for_inclusion/__nfs_server/man.text rename to other/types_submitted_for_inclusion/__nfs_server/man.rst index 41fc1d75..1f9aad76 100644 --- a/other/types_submitted_for_inclusion/__nfs_server/man.text +++ b/other/types_submitted_for_inclusion/__nfs_server/man.rst @@ -1,13 +1,10 @@ cdist-type__nfs_server(7) ========================= +nfs server + Steven Armstrong -NAME ----- -cdist-type__nfs_server - nfs server - - DESCRIPTION ----------- Install, start, do whatever is necessary to have a working nfs server. @@ -26,14 +23,14 @@ None. EXAMPLES -------- --------------------------------------------------------------------------------- -__nfs_server --------------------------------------------------------------------------------- +.. code-block:: sh + + __nfs_server SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/other/types_submitted_for_inclusion/__rsyncer/man.text b/other/types_submitted_for_inclusion/__rsyncer/man.rst similarity index 72% rename from other/types_submitted_for_inclusion/__rsyncer/man.text rename to other/types_submitted_for_inclusion/__rsyncer/man.rst index 6fab9fd3..a09bfea5 100644 --- a/other/types_submitted_for_inclusion/__rsyncer/man.text +++ b/other/types_submitted_for_inclusion/__rsyncer/man.rst @@ -1,13 +1,10 @@ cdist-type__rsyncer(7) ====================== +Use rsync to copy files. + Daniel Maher -NAME ----- -cdist-type__rsyncer - Use rsync to copy files. - - DESCRIPTION ----------- This type is used to trigger rsync to copy files from the machine running cdist @@ -19,41 +16,41 @@ from the destination which are not present on the source. REQUIRED PARAMETERS ------------------- -source:: +source The full path of the source from which to copy. This is passed directly to rsync. OPTIONAL PARAMETERS ------------------- -destination:: +destination The full path of the destination. This is passed directly to rsync. Default: object_id -delete:: +delete If true, remove files from destination which are not in source. This is effectively the --delete argument of rsync. Default: false -rsyncbin:: +rsyncbin Specify the full path to the rsync binary. Default: `which rsync` EXAMPLES -------- --------------------------------------------------------------------------------- -# Basic example -__rsyncer '/home/foo' --source '/opt/dist/foo' +.. code-block:: sh -# Fancier example -__rsyncer FOO --source '/opt/dist/foo' --destination '/home/foo/' --delete true --------------------------------------------------------------------------------- + # Basic example + __rsyncer '/home/foo' --source '/opt/dist/foo' + + # Fancier example + __rsyncer FOO --source '/opt/dist/foo' --destination '/home/foo/' --delete true SEE ALSO -------- -- cdist-type(7) +- `cdist-type(7) `_ COPYING diff --git a/other/types_submitted_for_inclusion/__run_command/man.rst b/other/types_submitted_for_inclusion/__run_command/man.rst new file mode 100644 index 00000000..f4426043 --- /dev/null +++ b/other/types_submitted_for_inclusion/__run_command/man.rst @@ -0,0 +1,66 @@ +cdist-type__run_command(7) +========================== +Run a command + +Benedikt Koeppel + + +DESCRIPTION +----------- +This cdist type allows you to run a specific command once at installation time. + + +REQUIRED PARAMETERS +------------------- + + +OPTIONAL PARAMETERS +------------------- +command + Command (with arguments) to run. + + If no command is give, then the object_id is executed. + + + +EXAMPLES +-------- + +.. code-block:: sh + + # Run a command + __run_command "/etc/init.d/mysql restart" + # runs `/etc/init.d/mysql restart` (the "object_id") + + # Run the same command: + __run_command restart-mysql --command "/etc/init.d/mysql restart" + # runs `/etc/init.d/mysql restart` (the --command argument) + # additionally, it can easily be referenced (for example in a require="..." + #as __run_command/restart-mysql + + # Run a script: + __run_command install-pear --command "$(cat <<-EOF + /usr/bin/pear install --force Auth + /usr/bin/pear install --force HTML_Template_IT-1.2.1 + /usr/bin/pear install --force MDB2 + /usr/bin/pear install --force MDB2#mysql + /usr/bin/pear config-set preferred_state beta; + /usr/bin/pear install --force --alldeps Spreadsheet_Excel_Writer; + /usr/bin/pear config-set preferred_state stable + /usr/bin/pear install --force HTTP_Request + /usr/bin/pear install --force Mail + /usr/bin/pear install --force Auth_HTTP + /usr/bin/pear install --force XML_RPC + EOF + )" + + +SEE ALSO +-------- +- `cdist-type(7) `_ + + +COPYING +------- +Copyright \(C) 2012 Benedikt Koeppel. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__run_command/man.text b/other/types_submitted_for_inclusion/__run_command/man.text deleted file mode 100644 index 5ea553c3..00000000 --- a/other/types_submitted_for_inclusion/__run_command/man.text +++ /dev/null @@ -1,70 +0,0 @@ -cdist-type__run_command(7) -========================== -Benedikt Koeppel - - -NAME ----- -cdist-type__run_command - Run a command - - -DESCRIPTION ------------ -This cdist type allows you to run a specific command once at installation time. - - -REQUIRED PARAMETERS -------------------- - - -OPTIONAL PARAMETERS -------------------- -command:: - Command (with arguments) to run. - - If no command is give, then the object_id is executed. - - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Run a command -__run_command "/etc/init.d/mysql restart" -# runs `/etc/init.d/mysql restart` (the "object_id") - -# Run the same command: -__run_command restart-mysql --command "/etc/init.d/mysql restart" -# runs `/etc/init.d/mysql restart` (the --command argument) -# additionally, it can easily be referenced (for example in a require="..." -#as __run_command/restart-mysql - -# Run a script: -__run_command install-pear --command "$(cat <<-EOF - /usr/bin/pear install --force Auth - /usr/bin/pear install --force HTML_Template_IT-1.2.1 - /usr/bin/pear install --force MDB2 - /usr/bin/pear install --force MDB2#mysql - /usr/bin/pear config-set preferred_state beta; - /usr/bin/pear install --force --alldeps Spreadsheet_Excel_Writer; - /usr/bin/pear config-set preferred_state stable - /usr/bin/pear install --force HTTP_Request - /usr/bin/pear install --force Mail - /usr/bin/pear install --force Auth_HTTP - /usr/bin/pear install --force XML_RPC -EOF -)" - --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -COPYING -------- -Copyright \(C) 2012 Benedikt Koeppel. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3).