From 82693ecada305e05c597922243c937a116c38284 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 11 Aug 2016 22:05:00 +0200 Subject: [PATCH 1/6] Clarify: "DebOps" and "DebOps project" have two different meanings Ref: https://github.com/debops/docs/issues/197#issuecomment-239264777 --- CHANGES.rst | 4 ++-- bin/debops | 2 +- bin/debops-defaults | 2 +- bin/debops-init | 10 +++++----- bin/debops-padlock | 2 +- bin/debops-task | 2 +- bin/debops-update | 2 +- debops/__init__.py | 8 ++++---- debops/cmds/__init__.py | 2 +- debops/config.py | 2 +- debops/padlock-script | 2 +- docs/credits.rst | 3 +-- docs/installation.rst | 19 +++++++++++-------- misc/ansigenome/templates/DebOps-README.md.j2 | 2 +- misc/backup/backup-data.txt | 2 +- misc/backup/backup-debops.org.sh | 6 +++--- misc/scripts/bootstrap-ansible.sh | 2 +- setup.py | 2 +- tests/test_config.py | 2 +- 19 files changed, 39 insertions(+), 37 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3f8b176b68..7d053645c5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -173,7 +173,7 @@ Pre-release directory up). This allows to overwrite upstream DebOps roles with local modified ones, which enables easy development or customization when needed. -- ``debops`` script gains even more integration with DebOps project directory. +- ``debops`` script gains even more integration with a DebOps project directory. You can put your custom playbooks in ``playbooks/`` or ``ansible/playbooks/`` directories and access them by specifying name of a playbook as first argument of ``debops`` script. Roles can be put in ``roles/`` and @@ -266,7 +266,7 @@ Pre-release 2014-09-10 ~~~~~~~~~~ -- DebOps project repositories can now be easily backed up using a Bash script +- DebOps project directories can now be easily backed up using a Bash script - New main scripts: diff --git a/bin/debops b/bin/debops index 6102d3f18d..017796b12d 100755 --- a/bin/debops +++ b/bin/debops @@ -4,7 +4,7 @@ debops: run ansible-playbook with some customization """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the diff --git a/bin/debops-defaults b/bin/debops-defaults index 4a4ef1ba7d..e810ecc3aa 100755 --- a/bin/debops-defaults +++ b/bin/debops-defaults @@ -4,7 +4,7 @@ debops-defaults: aggregate all defaults from Ansible roles into one stream """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the diff --git a/bin/debops-init b/bin/debops-init index afb9071ec5..208fc4f1af 100755 --- a/bin/debops-init +++ b/bin/debops-init @@ -1,10 +1,10 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- """ -debops-init: create a new DebOps project +debops-init: create a new DebOps project directory """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -171,12 +171,12 @@ def main(project_root): orig_project_root = project_root project_root = os.path.abspath(project_root) - #-- Check for existing debops project + #-- Check for existing debops project directory debops_project_root = find_debops_project(project_root, required=False) # Exit if DebOps configuration file has been found in project_dir if os.path.exists(os.path.join(project_root, DEBOPS_CONFIG)): - error_msg("%s is already a DebOps project" % project_root) + error_msg("%s is already a DebOps project directory" % project_root) # Exit if we are in a DebOps project dir and nested project would be created if debops_project_root: @@ -184,7 +184,7 @@ def main(project_root): #-- Main script - print("Creating new DebOps project in", orig_project_root, "...") + print("Creating new DebOps project directory in", orig_project_root, "...") # Create base project directories for skel_dir in SKEL_DIRS: diff --git a/bin/debops-padlock b/bin/debops-padlock index e71793a9c9..a77d8d99bc 100755 --- a/bin/debops-padlock +++ b/bin/debops-padlock @@ -4,7 +4,7 @@ debops-padlock: encrypt secret directory with EncFS and GPG """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the diff --git a/bin/debops-task b/bin/debops-task index 55d91b77f1..75141faffb 100755 --- a/bin/debops-task +++ b/bin/debops-task @@ -4,7 +4,7 @@ debops-task: run ansible with some customization """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the diff --git a/bin/debops-update b/bin/debops-update index d9a06d96b3..1368b21333 100755 --- a/bin/debops-update +++ b/bin/debops-update @@ -4,7 +4,7 @@ debops-update: install or update DebOps playbooks and roles """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute diff --git a/debops/__init__.py b/debops/__init__.py index 85b47e5813..e8a010e673 100644 --- a/debops/__init__.py +++ b/debops/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -104,11 +104,11 @@ def _find_up(path, name): def find_debops_project(path=None): """ - Searches the debops project, this workdir belongs to, if any. + Searches DebOps, this workdir belongs to, if any. `path` defaults to the current working directory. - Returns None if this path does not belong to a debops project. + Returns None if this path does not belong to a DebOps project. """ if path is None: path = os.getcwd() @@ -195,7 +195,7 @@ def padlock_unlock(encrypted_path): # Start encfs. It will wait for input on the `configfile` named # pipe. encfs = subprocess.Popen([ - 'encfs', encrypted_path, decrypted_path, + 'encfs', encrypted_path, decrypted_path, '--extpass', 'gpg --no-mdc-warning --output - %s' % shquote(keyfile)]) # now decrypt the config and write it into the named pipe with open(configfile, 'w') as fh: diff --git a/debops/cmds/__init__.py b/debops/cmds/__init__.py index 0ee8244736..de560db7ff 100644 --- a/debops/cmds/__init__.py +++ b/debops/cmds/__init__.py @@ -3,7 +3,7 @@ Support functions for command line utilities (scripts). """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the diff --git a/debops/config.py b/debops/config.py index 66a8a6cc4f..1c008c51ae 100644 --- a/debops/config.py +++ b/debops/config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the diff --git a/debops/padlock-script b/debops/padlock-script index 5b9d602853..d3f98e40f7 100644 --- a/debops/padlock-script +++ b/debops/padlock-script @@ -1,7 +1,7 @@ #!/bin/sh # # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # # This program is free software; you can redistribute # it and/or modify it under the terms of the diff --git a/docs/credits.rst b/docs/credits.rst index c7c31b1828..50caca8b04 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -3,7 +3,7 @@ Credits * Maciej Delmanowski - * creator of the DebOps Project + * creator of DebOps * current project maintainer @@ -21,4 +21,3 @@ Credits * Keeping the documentation up-to-date :) * Security related work. * Author and maintainer of a few roles in DebOps. - diff --git a/docs/installation.rst b/docs/installation.rst index d47ae8b99a..2b6cfeb3c5 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -2,13 +2,17 @@ Installation ============ DebOps scripts are distributed on `PyPI`_, Python Package Index. They can be -installed using the ``pip`` command:: +installed using the ``pip`` command: - pip install debops +.. code-block:: console -You can also use ``pip`` to upgrade the scripts themselves:: + pip install debops - pip install --upgrade debops +You can also use ``pip`` to upgrade the scripts themselves: + +.. code-block:: console + + pip install --upgrade debops After the installation is finished, scripts will be available in ``/usr/local/bin/``, which should be in your shell's ``$PATH``. @@ -32,7 +36,7 @@ Python ``netaddr`` library and networks. DebOps provides an Ansible plugin (included in Ansible 1.9+) which uses this library to manipulate IP addresses. - You can install ``netaddr`` either using your favourite package manager, or + You can install ``netaddr`` either using your favorite package manager, or through ``pip``. Python ``ldap`` library @@ -61,11 +65,10 @@ Python ``passlib`` library to share the encrypted ``secret/`` directory with other users without sharing the password, and using private GPG keys instead. ``debops`` script will automatically decrypt the keyfile and use it to open an EncFS volume. - + GnuPG is usually installed on Linux or MacOSX operating systems. - + ``git`` Git is required to be installed for Debops to be used. Git is a version control system. If it is not already install, it can be usually be installed using your favourite package manager. - diff --git a/misc/ansigenome/templates/DebOps-README.md.j2 b/misc/ansigenome/templates/DebOps-README.md.j2 index 80ac553ae7..f3fee26968 100644 --- a/misc/ansigenome/templates/DebOps-README.md.j2 +++ b/misc/ansigenome/templates/DebOps-README.md.j2 @@ -1,7 +1,7 @@ {% extends "README.md.j2" %} {% block title %} -## [![DebOps project](https://debops.org/images/debops-small.png)](https://debops.org) {{ role.name }} +## [![DebOps](https://debops.org/images/debops-small.png)](https://debops.org) {{ role.name }} {% endblock %} {% block badges %} diff --git a/misc/backup/backup-data.txt b/misc/backup/backup-data.txt index 4875a64e6f..ecab06627c 100644 --- a/misc/backup/backup-data.txt +++ b/misc/backup/backup-data.txt @@ -1,7 +1,7 @@ # This is a bash script sourced by the backup script, with lists of git # repositories to backup or manage. # Copyright (C) 2014 Maciej Delmanowski -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This file should be signed by a GnuPG key with fingerprint: # diff --git a/misc/backup/backup-debops.org.sh b/misc/backup/backup-debops.org.sh index aa95bd717c..5351a51d7d 100755 --- a/misc/backup/backup-debops.org.sh +++ b/misc/backup/backup-debops.org.sh @@ -1,10 +1,10 @@ #!/bin/bash # backup-debops.org.sh: small shell script that clones all git -# repositories of the DebOps project and additional tools +# repositories of DebOps and additional tools # # Copyright (C) 2014 Maciej Delmanowski -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute @@ -29,7 +29,7 @@ # http://www.gnu.org/copyleft/gpl.html -# This script clones all repositories of the DebOps project from GitHub plus +# This script clones all repositories of DebOps from GitHub plus # some additional tools and preserves the '.git' directories. # # Various tools will be cloned into 'tools/' directory. diff --git a/misc/scripts/bootstrap-ansible.sh b/misc/scripts/bootstrap-ansible.sh index de4675a64d..8bb74a4407 100755 --- a/misc/scripts/bootstrap-ansible.sh +++ b/misc/scripts/bootstrap-ansible.sh @@ -2,7 +2,7 @@ # bootstrap-ansible.sh: download and build Ansible on Debian/Ubuntu host # Copyright (C) 2014 Maciej Delmanowski -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute diff --git a/setup.py b/setup.py index 3ca77965dd..99aac65fc3 100755 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ }, # metadata for upload to PyPI - author = "DebOps Project", + author = "DebOps Developers", author_email = "debops@groups.io", description = "Your Debian-based data center in a box.", long_description = README, diff --git a/tests/test_config.py b/tests/test_config.py index fe8a529d83..00614491be 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps project - http://debops.org/ +# Part of the DebOps - http://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the From 66e59614bd418155d5a5fc8c28ea8a090cf69466 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 11 Aug 2016 22:18:05 +0200 Subject: [PATCH 2/6] sphinx-optimized and sphinx-debops-role-build and some manual adjustments --- .gitignore | 11 ++ CHANGES.rst | 158 ++++-------------- README.rst | 24 +-- bin/debops | 4 +- bin/debops-defaults | 4 +- bin/debops-init | 6 +- bin/debops-padlock | 4 +- bin/debops-task | 4 +- bin/debops-update | 4 +- debops/__init__.py | 4 +- debops/cmds/__init__.py | 4 +- debops/config.py | 4 +- debops/padlock-script | 4 +- docs/configuration.rst | 12 +- docs/copyright.rst | 4 +- docs/getting-started.rst | 12 +- docs/includes/all.rst | 1 + docs/includes/all_from_subdir.rst | 2 + docs/installation.rst | 14 +- docs/scripts/debops-init.rst | 2 +- docs/scripts/debops-padlock.rst | 24 +-- docs/scripts/debops-task.rst | 4 +- docs/scripts/debops.rst | 4 +- .../ansigenome/templates/DebOps-README.rst.j2 | 6 +- misc/api/github/test-roles-on-travis.sh | 2 +- misc/backup/README.md | 2 +- misc/backup/backup-data.txt | 2 +- misc/backup/backup-debops.org.sh | 4 +- misc/scripts/bootstrap-ansible.sh | 4 +- setup.py | 2 +- tests/test_config.py | 4 +- 31 files changed, 136 insertions(+), 204 deletions(-) create mode 100644 docs/includes/all.rst create mode 100644 docs/includes/all_from_subdir.rst diff --git a/.gitignore b/.gitignore index 43c47fcc42..0f940b4b24 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,14 @@ local.properties # TeXlipse plugin .texlipse +## For quick testing. +## Generated by https://github.com/ypid/ypid-ansible-common/blob/master/bin/sphinx-debops-role-build +docs/Makefile +docs/_build/ +docs/conf.py +docs/defaults.rst +docs/includes/global.rst +docs/_templates/page.html +docs/_templates/.gitkeep +docs/_static/custom.css +docs/_static/.gitkeep diff --git a/CHANGES.rst b/CHANGES.rst index 7d053645c5..395ff56b23 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,8 @@ Changelog ========= +.. include:: includes/all.rst + v0.4.4 ------ @@ -10,53 +12,53 @@ v0.4.4 - Fix issue with ``bootstrap-ansible.sh`` script not able to install latest Ansible stable version, make the process more verbose and don't remove the - temporary directory by default. [drybjed] + temporary directory by default. [drybjed_] -- Update Ansible Galaxy role links in ``ansigenome`` templates. [drybjed] +- Update Ansible Galaxy role links in ``ansigenome`` templates. [drybjed_] - Fix Unicode support in ``debops-defaults``, it should now output readable - text in the editor. [ypid] + text in the editor. [ypid_] -- Document ``git`` dependency. [violuke] +- Document :command:`git` dependency. [violuke] - Update the Ansigenome ``README.md`` template used to generate role README files to use ``galaxy_url`` instead of ``galaxy_id``. The new variable should - contain full URL of the role on Ansible Galaxy. [drybjed] + contain full URL of the role on Ansible Galaxy. [drybjed_] - Add useful Ansible options to default ``ansible.cfg`` template. By default Ansible will not display skipped hosts during the playbook run, - and "retry" files won't be generated. [drybjed] + and "retry" files won't be generated. [drybjed_] -- Update generated inventory file with more relevant information. [drybjed] +- Update generated inventory file with more relevant information. [drybjed_] -- Update documentation. [drybjed] +- Update documentation. [drybjed_] v0.4.3 ------ *Released: 2015-05-25* -- Rearranged documentation. [drybjed] +- Rearranged documentation. [drybjed_] -- Properly propagate exit code when running debops [do3cc] +- Properly propagate exit code when running debops [do3cc_] - Clone and update roles exclusively over HTTPS to allow operation - over a proxy or in case the git protocol is blocked. [ganto] + over a proxy or in case the git protocol is blocked. [ganto_] v0.4.2 ------ *Released: 2015-03-04* -- On OS X search config-file in ``/etc`` too (before searching in - ``~/Library/Application Support``). [htgoebel] +- On OS X search config-file in :file:`/etc` too (before searching in + ``~/Library/Application Support``). [htgoebel_] - Make debops-init write some example values into .debops.cfg. - [htgoebel] + [htgoebel_] - Add a work-around for ansible's buggy handling of paths containing - spaces. [htgoebel] + spaces. [htgoebel_] v0.4.1 @@ -64,103 +66,24 @@ v0.4.1 *Released: 2015-02-26* -- Update role README template to point to new documentation. [drybjed] - -- Make Travis mass test script less noisy. [drybjed] - -- Add ``library/`` path to default Ansible plugin paths in generated ``ansible.cfg``. [drybjed] - -- Define default ``ansible_managed`` variable in generated ``ansible.cfg``. [drybjed] - -- Changelog is rewritten in reStructuredText. [drybjed] - -v0.4.0 ------- - -*Released: 2015-02-12* - -- DebOps can now use a system-wide configuration file `/etc/debops.cfg`. You - can also install DebOps playbooks and roles in a system-wide location. [htgoebel] - -v0.3.0 ------- - -*Released: 2015-01-27* - -- Small fixes for bugs in DebOps libraries which prevented corret script - execution on platforms other than Linux. [htgoebel] - -v0.2.0 ------- - -*Released: 2015-01-26* - -- ``debops-padlock`` script has been modified to support "lock" and "unlock" - sub-commands and it is now used by the `padlock` wrapper script to lock and - unlock EncFS-encrypted secret directory. [htgoebel] - -- ``debops`` script can now read configuration from several files:: - - /etc/debops.cfg - $XDG_CONFIG_DIRS/debops.cfg (defaults to ~/etc/xdg/debops.cfg) - $XDG_CONFIG_HOME/debops.cfg (defaults to ~/.config/debops.cfg) - ./.debops.cfg +- Update role README template to point to new documentation. [drybjed_] - Configuration options from different files are merged together. [htgoebel] +- Make Travis mass test script less noisy. [drybjed_] -- Scripts are now tested on Travis-CI using `nosetests`. [drybjed] +- Add :file:`library/` path to default Ansible plugin paths in generated ``ansible.cfg``. [drybjed_] +DebOps mailing list`_ has been moved to `groups.io`_. -v0.1.0 ------- - -*Released: 2014-12-14* - -- Scripts are completely rewritten in Python by Hartmut Goebel. This saves - a lot of code allows for more fertile future changes. - -Notable changed related to the shell-version are: - -- Playbooks are no longer searched in ``/usr/local/share/debops`` nor in - ``/usr/share/debops``. We assume DebOps is used from a user account, - so installing playbooks globally is not the common case. - -- Sourcing ``.debops.cfg`` is no longer supported, ``.debops.cfg`` now is - assumed to be an ini-file. - -- The ``ansible_config_hook`` (which was undocumented anyway) is gone. - Instead you can put sections ``[ansible ...]`` into ``.debops.cfg`` - which will go into ``ansible.cfg``. This allows for easy adding e.g. a - ``[paramiko]`` section to `ansible.cfg`. - -- The padlock-script is no longer used to decide if secrets are - encrypted. This is now done by testing for the encrypted keyfile and - the encrypted encfs-config. - -- The padlock script still exists and has been simplified a lot. Most - functionality has been moved into the DebOps python library. - -Pre-release ------------ - -2014-12-02 -~~~~~~~~~~ - -- `DebOps mailing list`_ has been moved to `groups.io`_. - -.. _DebOps mailing list: https://groups.io/org/groupsio/debops .. _groups.io: https://groups.io/ 2014-10-24 ~~~~~~~~~~ -- all role documentation from their readme files has been moved to `separate - documentation page`_, role README files will be converted to more +- All role documentation from their README files has been moved to separate + documentation page, role README files will be converted to more standardized format, and will use Markdown again, since Ansible Galaxy does not support reStructuredText. -.. _separate documentation page: http://docs.debops.org/ - - ``debops`` script will automatically generate custom ``ansible.cfg`` configuration file in project main directory. This file will be used to enable custom set of role and plugin paths, which allows for example to @@ -169,17 +92,17 @@ Pre-release playbooks and roles. - DebOps roles will be now cloned in different directory, they are moved from - ``debops-playbooks/playbooks/roles/`` to ``debops-playbooks/roles/`` (one + :file:`debops-playbooks/playbooks/roles/` to :file:`debops-playbooks/roles/` (one directory up). This allows to overwrite upstream DebOps roles with local modified ones, which enables easy development or customization when needed. - ``debops`` script gains even more integration with a DebOps project directory. - You can put your custom playbooks in ``playbooks/`` or ``ansible/playbooks/`` + You can put your custom playbooks in :file:`playbooks/` or :command:`ansible/playbooks/` directories and access them by specifying name of a playbook as first - argument of ``debops`` script. Roles can be put in ``roles/`` and - ``ansible/roles/`` directories and Ansible will automatically look for them + argument of ``debops`` script. Roles can be put in :file:`roles/` and + :command:`ansible/roles/` directories and Ansible will automatically look for them there. Various plugins can also be put in their respective - ``ansible/*_plugins/`` directories. + :command:`ansible/*_plugins/` directories. 2014-10-21 ~~~~~~~~~~ @@ -189,9 +112,6 @@ Pre-release already written has been moved from ``debops/debops`` repository to the new website, more to come. -.. _DebOps documentation: http://docs.debops.org/ -.. _ReadTheDocs: http://readthedocs.org/ - 2014-09-28 ~~~~~~~~~~ @@ -200,18 +120,18 @@ Pre-release them into one stream and sends it to ``view`` command using ``STDOUT``. By specifying list of roles on the command line you can select which role defaults are aggregated, and by redirecting the script to a file or a command - you can manipulate it (for example grep for a string). + you can manipulate it (for example ``grep`` for a string). 2014-09-22 ~~~~~~~~~~ -- ``debops.secret`` main directory has been changed from ``inventory.secret`` +- debops.secret_ main directory has been changed from ``inventory.secret`` to ``secret`` (the feature that used name of the Ansible inventory as the prefix for secret directory has been dropped, because secrets are stored inside project directory). Because of that, ``debops*`` scripts are updated to support new naming scheme. -- If you use ``debops.secret`` role or DebOps playbooks in general, you will need +- If you use debops.secret_ role or DebOps playbooks in general, you will need to rename your current plaintext and encrypted directories. - ``inventory.secret`` becomes ``secret`` @@ -226,7 +146,7 @@ Pre-release just at the root of the project directory. - ``debops`` script now recognizes encrypted secret directories created by - ``debops-padlock`` and automatically opens them before Ansible playbook run, + :command:`debops-padlock` and automatically opens them before Ansible playbook run, and closes them afterwards. - ``debops-init`` will check if you try to create project directory in another @@ -235,20 +155,18 @@ Pre-release 2014-09-16 ~~~~~~~~~~ -- New ``debops-padlock`` script, which is a companion Bash script to +- New :command:`debops-padlock` script, which is a companion Bash script to `debops.secret`_ role. It can be used to optionally encrypt secret directory using EncFS and GnuPG keys. Main ``debops`` script will be able to recognize these encrypted directories and properly open/close them for - ``ansible-playbook`` runs. - -.. _debops.secret: https://github.com/debops/ansible-secret/ + :command:`ansible-playbook` runs. 2014-09-12 ~~~~~~~~~~ - Makefile has been rewritten and streamlined. ``make install`` will install all scripts, inventory skeleton and playbooks + roles in a system-wide - location (by default, ``/usr/local``) and ``make clean`` will remove + location (by default, :file:`/usr/local`) and ``make clean`` will remove installed files. - Many different changes in the documentation in preparation of the release. @@ -270,9 +188,9 @@ Pre-release - New main scripts: - - ``debops`` - run ``ansible-playbook`` with custom arguments + - ``debops`` - run :command:`ansible-playbook` with custom arguments - - ``debops-task`` - run ``ansible`` with custom arguments + - ``debops-task`` - run :command:`ansible` with custom arguments 2014-09-07 ~~~~~~~~~~ @@ -290,5 +208,3 @@ project gets up to speed. For now, if you want to play with DebOps, I suggest heading to `ginas`_ repository and cloning that instead. That should be fixed soon though, when new role cloning code takes shape. - -.. _ginas: https://github.com/ginas/ginas/ diff --git a/README.rst b/README.rst index 596bffb077..6894c4c7ea 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|debops_logo| `DebOps `_ +|debops_logo| `DebOps `_ =========================================== |CII Best Practices| @@ -56,7 +56,7 @@ use:: $ debops-update Please see the `Installation Guide -`_ for more +`_ for more details. @@ -65,7 +65,7 @@ Getting started Here is a short intro how to use DebOps. Please have a look at the `Getting Started Guide -`_ for more +`_ for more detailed information. **Make your first project** @@ -97,16 +97,16 @@ What do you want to learn more about? |Gratipay|_ - `Playbooks and roles `_ -- `Custom scripts `_ +- `Custom scripts `_ - DebOps guides and troubleshooting - - `Using linux containers `_ - - `Creating a local APT server to use backports `_ + - `Using linux containers `_ + - `Creating a local APT server to use backports `_ - `Solving common problems `_ Do you want to contribute? ^^^^^^^^^^^^^^^^^^^^^^^^^^ -Sounds great, check out the `contributing guide `_ +Sounds great, check out the `contributing guide `_ for the details. Authors @@ -115,14 +115,14 @@ Authors **Maciej Delmanowski** - Email: drybjed@gmail.com -- Twitter: `@drybjed `_ -- Github: `drybjed `_ +- Twitter: `@drybjed_ `_ +- Github: `drybjed `_ **Nick Janetakis** - Email: nick.janetakis@gmail.com - Twitter: `@nickjanetakis `_ -- Github: `nickjj `_ +- Github: `nickjj `_ **Hartmut Goebel** @@ -133,11 +133,11 @@ Authors - Email: ypid@riseup.net - Website: http://ypid.de/ -- GitHub: `ypid `_ +- GitHub: `ypid `_ .. |Gratipay| image:: https://img.shields.io/gratipay/drybjed.svg?style=flat .. _Gratipay: https://www.gratipay.com/drybjed/ -.. |debops_logo| image:: http://debops.org/images/debops-small.png +.. |debops_logo| image:: https://debops.org/images/debops-small.png diff --git a/bin/debops b/bin/debops index 017796b12d..59205cbf40 100755 --- a/bin/debops +++ b/bin/debops @@ -4,7 +4,7 @@ debops: run ansible-playbook with some customization """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -25,7 +25,7 @@ debops: run ansible-playbook with some customization # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from __future__ import print_function diff --git a/bin/debops-defaults b/bin/debops-defaults index e810ecc3aa..baf4f51094 100755 --- a/bin/debops-defaults +++ b/bin/debops-defaults @@ -4,7 +4,7 @@ debops-defaults: aggregate all defaults from Ansible roles into one stream """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -25,7 +25,7 @@ debops-defaults: aggregate all defaults from Ansible roles into one stream # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from __future__ import print_function diff --git a/bin/debops-init b/bin/debops-init index 208fc4f1af..3c0bb14441 100755 --- a/bin/debops-init +++ b/bin/debops-init @@ -4,7 +4,7 @@ debops-init: create a new DebOps project directory """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -25,7 +25,7 @@ debops-init: create a new DebOps project directory # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from __future__ import print_function @@ -114,7 +114,7 @@ HOSTS_FILE_HEADER = """\ # https://github.com/debops/debops-playbooks/blob/master/playbooks/common.yml # # You should check Getting Started guide for useful suggestions: -# http://docs.debops.org/en/latest/debops-playbooks/docs/guides/getting-started.html +# https://docs.debops.org/en/latest/debops-playbooks/docs/guides/getting-started.html """ HOSTS_FILE_CONTENT_CONTROLER = """ diff --git a/bin/debops-padlock b/bin/debops-padlock index a77d8d99bc..3d7959f980 100755 --- a/bin/debops-padlock +++ b/bin/debops-padlock @@ -4,7 +4,7 @@ debops-padlock: encrypt secret directory with EncFS and GPG """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -25,7 +25,7 @@ debops-padlock: encrypt secret directory with EncFS and GPG # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from __future__ import print_function diff --git a/bin/debops-task b/bin/debops-task index 75141faffb..0ccfe6f86b 100755 --- a/bin/debops-task +++ b/bin/debops-task @@ -4,7 +4,7 @@ debops-task: run ansible with some customization """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -25,7 +25,7 @@ debops-task: run ansible with some customization # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from __future__ import print_function diff --git a/bin/debops-update b/bin/debops-update index 1368b21333..12dcc3680a 100755 --- a/bin/debops-update +++ b/bin/debops-update @@ -4,7 +4,7 @@ debops-update: install or update DebOps playbooks and roles """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute @@ -26,7 +26,7 @@ debops-update: install or update DebOps playbooks and roles # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html """ This script can be used to install or update installed DebOps playbooks and diff --git a/debops/__init__.py b/debops/__init__.py index e8a010e673..3ee55a2fa5 100644 --- a/debops/__init__.py +++ b/debops/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -22,7 +22,7 @@ # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from __future__ import print_function diff --git a/debops/cmds/__init__.py b/debops/cmds/__init__.py index de560db7ff..76c00e85c9 100644 --- a/debops/cmds/__init__.py +++ b/debops/cmds/__init__.py @@ -3,7 +3,7 @@ Support functions for command line utilities (scripts). """ # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -24,7 +24,7 @@ # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from __future__ import print_function diff --git a/debops/config.py b/debops/config.py index 1c008c51ae..cfcef43cf4 100644 --- a/debops/config.py +++ b/debops/config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -22,7 +22,7 @@ # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html import os import sys diff --git a/debops/padlock-script b/debops/padlock-script index d3f98e40f7..1c476c1d02 100644 --- a/debops/padlock-script +++ b/debops/padlock-script @@ -1,7 +1,7 @@ #!/bin/sh # # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -22,7 +22,7 @@ # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html if [ -z "$(which debops-padlock 2>/dev/null)" ] ; then echo "Command 'debops-padlock' is missing, please install debops." diff --git a/docs/configuration.rst b/docs/configuration.rst index dcc8c3f49d..bbf5c792d6 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -19,7 +19,7 @@ MacOS X: All others (including Linux): -- ``/etc/debops.cfg`` +- :file:`/etc/debops.cfg` - in each directory of ``$XDG_CONFIG_DIRS``: ``dir/debops.cfg`` @@ -44,9 +44,9 @@ The ``[paths]`` section Default values: - - Linux: ``$XDG_DATA_HOME/debops/`` + - Linux: :file:`$XDG_DATA_HOME/debops/` - - MacOS X: ``~/Library/Application Support/debops/`` + - MacOS X: :file:`~/Library/Application Support/debops/` - MS Windows: ``%APPDTA%\debops`` @@ -63,14 +63,14 @@ The ``[paths]`` section ``template-paths`` List of comma-separated paths where ``template_src`` lookup plugin will look - for custom templates (alternative ``templates/`` directories). You can use + for custom templates (alternative :file:`templates/` directories). You can use this to override templates provided with official roles (when supported). Default value: none ``file-paths`` List of comma-separated paths where ``file_src`` lookup plugin will look for - custom files (alternative ``files/`` directories). You can use this to + custom files (alternative :file:`files/` directories). You can use this to override files provided with official roles (when supported). Default value: none @@ -90,7 +90,7 @@ use: [ansible defaults] ansible_managed = Custom string -For the configuration entries representing paths (e.g. ``roles_path``, +For the configuration entries representing paths (e. g. ``roles_path``, ``action_plugins`` and other ``.._plugins``), your value will be prepended to the values set up by debops. diff --git a/docs/copyright.rst b/docs/copyright.rst index c199ed0433..79e445cf15 100644 --- a/docs/copyright.rst +++ b/docs/copyright.rst @@ -4,7 +4,7 @@ Copyright :: Copyright (C) 2013 Maciej Delmanowski - Copyright (C) 2015 DebOps Project http://debops.org/ + Copyright (C) 2015 DebOps project https://debops.org/ [see Credits for more details] his program is free software; you can redistribute it and/or modify @@ -17,5 +17,5 @@ Copyright General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/ + along with this program. If not, see https://www.gnu.org/licenses/ diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 54bbed052f..be44ad0ab3 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -12,8 +12,8 @@ This script will download playbooks and roles from their GitHub repositories into your user directory. Exact location is dependent upon your operating system: -- on Linux systems, it will be ``$XDG_DATA_HOME/debops/`` which usually is - expanded to ``~/.local/share/debops/``; +- on Linux systems, it will be :file:`$XDG_DATA_HOME/debops/` which usually is + expanded to :file:`~/.local/share/debops/`; - on MacOSX systems, it will be ``~/Library/Application Support/debops``; @@ -32,13 +32,13 @@ unprivileged user account on Ansible Controller, so you don't need to be ``root`` in order to use it - most of the time you can use your existing user account. -After entering your new project directory, you can see an ``ansible/`` +After entering your new project directory, you can see an :command:`ansible/` directory which contains files related to Ansible, mostly inventory, secret directory, playbooks and roles. You can also notice ``.debops.cfg`` configuration file which indicates to the DebOps script that this is indeed a project directory and contains configuration related to it. -Main Ansible inventory file is ``ansible/inventory/hosts``. You should add +Main Ansible inventory file is :command:`ansible/inventory/hosts`. You should add hosts that you want to manage to it, just make sure that you can access them through SSH without issues. It's a good idea to start using groups right away to keep many hosts under control. An example inventory file: @@ -66,8 +66,8 @@ and execute default DebOps playbooks: debops -The ``debops`` command is a wrapper for ``ansible-playbook``, which means that -you can pass any ``ansible-playbook`` parameters to it. For example, to limit +The ``debops`` command is a wrapper for :command:`ansible-playbook`, which means that +you can pass any :command:`ansible-playbook` parameters to it. For example, to limit the Ansible run to a specific host, you can execute command: .. code:: shell diff --git a/docs/includes/all.rst b/docs/includes/all.rst new file mode 100644 index 0000000000..73b2598713 --- /dev/null +++ b/docs/includes/all.rst @@ -0,0 +1 @@ +.. include:: includes/global.rst diff --git a/docs/includes/all_from_subdir.rst b/docs/includes/all_from_subdir.rst new file mode 100644 index 0000000000..0f28d62b47 --- /dev/null +++ b/docs/includes/all_from_subdir.rst @@ -0,0 +1,2 @@ +.. include:: ../includes/global.rst +.. Refer to: https://github.com/debops/docs/issues/155#issuecomment-233184276 diff --git a/docs/installation.rst b/docs/installation.rst index 2b6cfeb3c5..3c31d35e67 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -15,7 +15,7 @@ You can also use ``pip`` to upgrade the scripts themselves: pip install --upgrade debops After the installation is finished, scripts will be available in -``/usr/local/bin/``, which should be in your shell's ``$PATH``. +:file:`/usr/local/bin/`, which should be in your shell's ``$PATH``. .. _PyPI: https://pypi.python.org/pypi/debops @@ -45,7 +45,7 @@ Python ``ldap`` library Python ``passlib`` library This Python library is used to encrypt random passwords generated by Debops - and store them in the ``secret/`` directory. + and store them in the :file:`secret/` directory. ``uuidgen`` This command is used to generate unique identifiers for hosts which are then @@ -54,21 +54,21 @@ Python ``passlib`` library installed. If not, it can be usually found in the ``uuid-runtime`` package. ``encfs`` - This is an optional application, which is used by the ``debops-padlock`` - script to encrypt the ``secret/`` directory within DebOps project + This is an optional application, which is used by the :command:`debops-padlock` + script to encrypt the :file:`secret/` directory within DebOps project directories, which holds confidential data like passwords, private keys and certificates. EncFS is available on Linux distributions, usually as the ``encfs`` package. -``gpg`` +:command:`gpg` GnuPG is used to encrypt the file which holds EncFS password; this allows you - to share the encrypted ``secret/`` directory with other users without sharing + to share the encrypted :file:`secret/` directory with other users without sharing the password, and using private GPG keys instead. ``debops`` script will automatically decrypt the keyfile and use it to open an EncFS volume. GnuPG is usually installed on Linux or MacOSX operating systems. -``git`` +:command:`git` Git is required to be installed for Debops to be used. Git is a version control system. If it is not already install, it can be usually be installed using your favourite package manager. diff --git a/docs/scripts/debops-init.rst b/docs/scripts/debops-init.rst index c9ec978b13..7500fd9f1a 100644 --- a/docs/scripts/debops-init.rst +++ b/docs/scripts/debops-init.rst @@ -2,7 +2,7 @@ The ``debops-init`` command =========================== Creates a project for you at the path you specify. After running this script -you should check out ``ansible/inventory/hosts`` relative to your project path. +you should check out :command:`ansible/inventory/hosts` relative to your project path. Example commands: diff --git a/docs/scripts/debops-padlock.rst b/docs/scripts/debops-padlock.rst index 25fcbb625f..62107666bb 100644 --- a/docs/scripts/debops-padlock.rst +++ b/docs/scripts/debops-padlock.rst @@ -1,25 +1,27 @@ -The ``debops-padlock`` command -============================== +The :command:`debops-padlock` command +===================================== + +.. include:: ../includes/all_from_subdir.rst An optional script that allows you to encrypt your secrets directory using EncFS and GPG. 1. Make sure you have encfs installed, ie. ``apt-get install encfs`` 2. Make sure you have a `GPG keypair `_ -3. Make sure ``$project_dir/ansible/secret/`` is empty +3. Make sure :file:`$project_dir/ansible/secret/` is empty 4. Run ``debops-padlock init`` and enter your GPG password unless you have an agent 5. Run ``debops-padlock unlock`` -6. Do something that would result in adding files to ``secret/``, such +6. Do something that would result in adding files to :file:`secret/`, such as touching a file 7. Run ``debops-padlock lock`` -8. Confirm you have 1 or more sub-folders or files in ``.encfs.secret/`` +8. Confirm you have 1 or more sub-folders or files in :file:`.encfs.secret/` The above steps performed the following tasks: - Setup a project directory to use an encrypted secrets directory - Added files to be encrypted -- Locked it, which unmounts ``secret/`` -- it is now secure +- Locked it, which unmounts :file:`secret/` -- it is now secure That sounds annoying, can it be done better? -------------------------------------------- @@ -28,7 +30,7 @@ When running any play book through the ``debops`` script, it will automatically take care of unlocking/locking it after the run finishes successfully or errors out. There is a catch, make sure you always use ``debops`` to run your plays because -if you run ``ansible-playbook`` directly the unlock/lock process will not +if you run :command:`ansible-playbook` directly the unlock/lock process will not happen automatically. It may change your passwords and whatever else you have stored. If you use the ``debops`` script you won't have to worry about anything being changed. @@ -36,7 +38,7 @@ If you use the ``debops`` script you won't have to worry about anything being ch Delete your secrets ------------------- -Since EncFS mounts ``secret/`` you need to unlock it first. If you +Since EncFS mounts :file:`secret/` you need to unlock it first. If you forgot to unlock it first then you will get a device is busy error. You can fix this by unmounting it yourself before trying to delete it, run: @@ -47,7 +49,7 @@ Migrate an existing secrets directory to be encrypted ----------------------------------------------------- EncFS can only mount empty directories but don't worry. Just move the files -inside of ``secret/`` to somewhere else, then start the steps above. +inside of :file:`secret/` to somewhere else, then start the steps above. Why does it ask for the GPG password twice? ------------------------------------------- @@ -65,11 +67,11 @@ quit and fix your issues. What if you want to keep your encrypted secrets in a git repository? -------------------------------------------------------------------- -Debops by default creates an entry in ``.gitignore`` file to prevent commiting +Debops by default creates an entry in ``.gitignore`` file to prevent committing encrypted files to the git repository. If you are sure that you want to do it, just comment or remove the `.encfs.secret` line from ``.gitignore``. -You can also use ``debops.secret`` role to keep content of the ``secret`` +You can also use debops.secret_ role to keep content of the ``secret`` directory in other sorts of storage - for details please consult the documentation of that role. diff --git a/docs/scripts/debops-task.rst b/docs/scripts/debops-task.rst index 316eaf95c1..917b31c645 100644 --- a/docs/scripts/debops-task.rst +++ b/docs/scripts/debops-task.rst @@ -1,10 +1,10 @@ The ``debops-task`` command =========================== -Wraps ``ansible``, it can accept anything ``ansible`` does. +Wraps :command:`ansible`, it can accept anything :command:`ansible` does. **Note** After ``debops`` is run once and ``ansible.cfg`` is generated, you can -use the ``ansible`` command directly. +use the :command:`ansible` command directly. You could use it to run adhoc tasks against your hosts. diff --git a/docs/scripts/debops.rst b/docs/scripts/debops.rst index 0cc1ed4a55..7e4da5c045 100644 --- a/docs/scripts/debops.rst +++ b/docs/scripts/debops.rst @@ -1,10 +1,10 @@ The ``debops`` command ====================== -Wraps ``ansible-playbook`` and since that's the most commonly ran command we +Wraps :command:`ansible-playbook` and since that's the most commonly ran command we decided it's a good idea to shorten it to ``debops`` instead of ``debops-playbook``. -Any arguments that ``ansible-playbook`` supports can be passed to ``debops``. +Any arguments that :command:`ansible-playbook` supports can be passed to ``debops``. You don't need to specify an inventory or playbook. Part of the benefit of using this tool is that it figures out all of that stuff for you. You can still diff --git a/misc/ansigenome/templates/DebOps-README.rst.j2 b/misc/ansigenome/templates/DebOps-README.rst.j2 index 1d32d11062..e21ce1cf02 100644 --- a/misc/ansigenome/templates/DebOps-README.rst.j2 +++ b/misc/ansigenome/templates/DebOps-README.rst.j2 @@ -4,8 +4,8 @@ |DebOps| {{ role.name }} {{ "#" * title_length }} -.. |DebOps| image:: http://debops.org/images/debops-small.png - :target: http://debops.org +.. |DebOps| image:: https://debops.org/images/debops-small.png + :target: https://debops.org {% endblock %} {% block badges %} {% if ansigenome_info.travis is defined and ansigenome_info.travis %}|Travis CI| |test-suite|{% endif %}{% if ansigenome_info.galaxy_id is defined and ansigenome_info.galaxy_id %} |Ansible Galaxy|{% endif %} @@ -65,6 +65,6 @@ License: `{{ license.type | trim }} <{{ license.url | trim }}>`_ This role is part of the `DebOps`_ project. README generated by `ansigenome`_. -.. _DebOps: http://debops.org/ +.. _DebOps: https://debops.org/ .. _Ansigenome: https://github.com/nickjj/ansigenome/ {% endblock %} diff --git a/misc/api/github/test-roles-on-travis.sh b/misc/api/github/test-roles-on-travis.sh index 0486bc573e..a1aa6dc913 100755 --- a/misc/api/github/test-roles-on-travis.sh +++ b/misc/api/github/test-roles-on-travis.sh @@ -1,7 +1,7 @@ #!/bin/sh # (C) 2015 Maciej Delmanowski -# Homepage: http://debops.org/ +# Homepage: https://debops.org/ # License: GPLv3 # Push GitHub test hooks to Travis-CI on all DebOps roles that have them diff --git a/misc/backup/README.md b/misc/backup/README.md index d2eadd04fb..067d05f015 100644 --- a/misc/backup/README.md +++ b/misc/backup/README.md @@ -1,7 +1,7 @@ ## backup-debops.org.sh This script can be used to backup essential git repositories of the -[DebOps](http://debops.org/) project. +[DebOps](https://debops.org/) project. Current list of git repositories is stored in `backup-data.txt` file (it is a shell script with the list of repositories stored in arrays, sourced by the main diff --git a/misc/backup/backup-data.txt b/misc/backup/backup-data.txt index ecab06627c..86c021436e 100644 --- a/misc/backup/backup-data.txt +++ b/misc/backup/backup-data.txt @@ -1,7 +1,7 @@ # This is a bash script sourced by the backup script, with lists of git # repositories to backup or manage. # Copyright (C) 2014 Maciej Delmanowski -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This file should be signed by a GnuPG key with fingerprint: # diff --git a/misc/backup/backup-debops.org.sh b/misc/backup/backup-debops.org.sh index 5351a51d7d..59c5938f6d 100755 --- a/misc/backup/backup-debops.org.sh +++ b/misc/backup/backup-debops.org.sh @@ -4,7 +4,7 @@ # repositories of DebOps and additional tools # # Copyright (C) 2014 Maciej Delmanowski -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute @@ -26,7 +26,7 @@ # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html # This script clones all repositories of DebOps from GitHub plus diff --git a/misc/scripts/bootstrap-ansible.sh b/misc/scripts/bootstrap-ansible.sh index 8bb74a4407..eadb8a5b61 100755 --- a/misc/scripts/bootstrap-ansible.sh +++ b/misc/scripts/bootstrap-ansible.sh @@ -2,7 +2,7 @@ # bootstrap-ansible.sh: download and build Ansible on Debian/Ubuntu host # Copyright (C) 2014 Maciej Delmanowski -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute @@ -24,7 +24,7 @@ # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html # By default, script will install latest 'devel' branch of Ansible; to specify diff --git a/setup.py b/setup.py index 99aac65fc3..8b3a70a245 100755 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ long_description = README, license = "GPL 3.0", keywords = "ansible", - url = "http://debops.org/", + url = "https://debops.org/", download_url = "https://github.com/debops/debops/archive/v0.4.4.tar.gz", classifiers = [ 'Development Status :: 4 - Beta', diff --git a/tests/test_config.py b/tests/test_config.py index 00614491be..c846cec8ad 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright (C) 2014-2015 Hartmut Goebel -# Part of the DebOps - http://debops.org/ +# Part of the DebOps - https://debops.org/ # This program is free software; you can redistribute # it and/or modify it under the terms of the @@ -22,7 +22,7 @@ # # An on-line copy of the GNU General Public License can # be downloaded from the FSF web page at: -# http://www.gnu.org/copyleft/gpl.html +# https://www.gnu.org/copyleft/gpl.html from unittest import TestCase import os From 2279ff20429b2063ca12c8e22abaed6729d15d69 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 11 Aug 2016 22:35:06 +0200 Subject: [PATCH 3/6] Readd wrongly deleted part in the changelog --- CHANGES.rst | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 395ff56b23..290158a973 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -72,7 +72,83 @@ v0.4.1 - Add :file:`library/` path to default Ansible plugin paths in generated ``ansible.cfg``. [drybjed_] -DebOps mailing list`_ has been moved to `groups.io`_. +- Define default ``ansible_managed`` variable in generated ``ansible.cfg``. [drybjed_] + +- Changelog is rewritten in reStructuredText. [drybjed_] + +v0.4.0 +------ + +*Released: 2015-02-12* + +- DebOps can now use a system-wide configuration file `/etc/debops.cfg`. You + can also install DebOps playbooks and roles in a system-wide location. [htgoebel_] + +v0.3.0 +------ + +*Released: 2015-01-27* + +- Small fixes for bugs in DebOps libraries which prevented corret script + execution on platforms other than Linux. [htgoebel_] + +v0.2.0 +------ + +*Released: 2015-01-26* + +- :command:`debops-padlock` script has been modified to support "lock" and "unlock" + sub-commands and it is now used by the `padlock` wrapper script to lock and + unlock EncFS-encrypted secret directory. [htgoebel_] + +- ``debops`` script can now read configuration from several files:: + + /etc/debops.cfg + $XDG_CONFIG_DIRS/debops.cfg (defaults to ~/etc/xdg/debops.cfg) + $XDG_CONFIG_HOME/debops.cfg (defaults to ~/.config/debops.cfg) + ./.debops.cfg + + Configuration options from different files are merged together. [htgoebel_] + +- Scripts are now tested on Travis-CI using `nosetests`. [drybjed_] + + +v0.1.0 +------ + +*Released: 2014-12-14* + +- Scripts are completely rewritten in Python by Hartmut Goebel. This saves + a lot of code allows for more fertile future changes. + +Notable changed related to the shell-version are: + +- Playbooks are no longer searched in :file:`/usr/local/share/debops` nor in + :file:`/usr/share/debops`. We assume DebOps is used from a user account, + so installing playbooks globally is not the common case. + +- Sourcing ``.debops.cfg`` is no longer supported, ``.debops.cfg`` now is + assumed to be an ini-file. + +- The ``ansible_config_hook`` (which was undocumented anyway) is gone. + Instead you can put sections ``[ansible ...]`` into ``.debops.cfg`` + which will go into ``ansible.cfg``. This allows for easy adding e. g. a + ``[paramiko]`` section to `ansible.cfg`. + +- The padlock-script is no longer used to decide if secrets are + encrypted. This is now done by testing for the encrypted keyfile and + the encrypted encfs-config. + +- The padlock script still exists and has been simplified a lot. Most + functionality has been moved into the DebOps python library. + +Pre-release +----------- + +2014-12-02 +~~~~~~~~~~ + +- `DebOps mailing list`_ has been moved to `groups.io`_. .. _groups.io: https://groups.io/ From 480f182ff9c37edceaa0e18f3a2833b773614759 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 11 Aug 2016 22:39:48 +0200 Subject: [PATCH 4/6] Fix regex replaces in README.rst --- README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 6894c4c7ea..a879c85ea0 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ |debops_logo| `DebOps `_ -=========================================== +============================================ |CII Best Practices| @@ -115,14 +115,14 @@ Authors **Maciej Delmanowski** - Email: drybjed@gmail.com -- Twitter: `@drybjed_ `_ -- Github: `drybjed `_ +- Twitter: `@drybjed `_ +- Github: `drybjed `_ **Nick Janetakis** - Email: nick.janetakis@gmail.com - Twitter: `@nickjanetakis `_ -- Github: `nickjj `_ +- Github: `nickjj `_ **Hartmut Goebel** @@ -133,7 +133,7 @@ Authors - Email: ypid@riseup.net - Website: http://ypid.de/ -- GitHub: `ypid `_ +- GitHub: `ypid `_ .. |Gratipay| image:: https://img.shields.io/gratipay/drybjed.svg?style=flat .. _Gratipay: https://www.gratipay.com/drybjed/ From 55561718f31ee17ce34f8f65b6a57164d9408fbc Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 11 Aug 2016 22:42:19 +0200 Subject: [PATCH 5/6] Fix regex replaces in docs/getting-started.rst --- docs/getting-started.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started.rst b/docs/getting-started.rst index be44ad0ab3..a4865e0aad 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -32,13 +32,13 @@ unprivileged user account on Ansible Controller, so you don't need to be ``root`` in order to use it - most of the time you can use your existing user account. -After entering your new project directory, you can see an :command:`ansible/` +After entering your new project directory, you can see an :file:`ansible/` directory which contains files related to Ansible, mostly inventory, secret directory, playbooks and roles. You can also notice ``.debops.cfg`` configuration file which indicates to the DebOps script that this is indeed a project directory and contains configuration related to it. -Main Ansible inventory file is :command:`ansible/inventory/hosts`. You should add +Main Ansible inventory file is ``ansible/inventory/hosts``. You should add hosts that you want to manage to it, just make sure that you can access them through SSH without issues. It's a good idea to start using groups right away to keep many hosts under control. An example inventory file: From 60f86d9293b584a779775f2b4fdbcc918caea24f Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 11 Aug 2016 22:52:56 +0200 Subject: [PATCH 6/6] Enable docs test on Travis CI --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e472ebe800..18b31fd025 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ --- +sudo: required language: 'python' python: '2.7' @@ -14,4 +15,5 @@ install: True script: - 'nosetests' - + - 'git clone --depth 1 https://github.com/nickjj/rolespec' + - 'cd rolespec ; bin/rolespec -r https://github.com/debops/test-suite'