From e634add084d7d565f14db70996f28511436557ad Mon Sep 17 00:00:00 2001 From: Reto Gantenbein Date: Fri, 24 Jun 2016 23:24:35 +0200 Subject: [PATCH] Remove hard role dependency on debops.ferm Don't hard-depend on `debops.ferm` but only include it via playbook dependency. See debops/debops-playbooks#192 for more details. --- README.md | 7 ------- defaults/main.yml | 8 -------- docs/getting-started.rst | 15 +++++---------- docs/index.rst | 1 - docs/installation.rst | 14 -------------- docs/introduction.rst | 8 ++++++++ docs/playbooks/checkmk_server.yml | 16 ++++++++++++++++ meta/main.yml | 8 +------- 8 files changed, 30 insertions(+), 47 deletions(-) delete mode 100644 docs/installation.rst create mode 100644 docs/playbooks/checkmk_server.yml diff --git a/README.md b/README.md index 0189c46..66039a6 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,6 @@ into your playbook. [Try DebOps now](https://github.com/debops/debops) for a complete solution to run your Debian-based infrastructure. -### Role dependencies - -- `debops.ferm` - - - - ### Authors and license `checkmk_server` role was written by: diff --git a/defaults/main.yml b/defaults/main.yml index ed2a4f2..96665ec 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -35,14 +35,6 @@ checkmk_server__patches: file: '/omd/versions/{{ checkmk_server__version_label }}/skel/etc/apache/conf.d/omd.conf' -# .. envvar:: checkmk_server__dependencies -# -# Enable execution of ``debops.checkmk_server`` role dependencies. This -# variable can be used in playbooks to disable hardcoded dependencies during -# transition to playbook-based ones. -checkmk_server__dependencies: True - - # .. envvar:: checkmk_server__ferm_dependent_rules # # Firewall configuration using the ``debops.ferm`` Ansible role. diff --git a/docs/getting-started.rst b/docs/getting-started.rst index ed6077f..c78b0c5 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -4,20 +4,15 @@ Getting started Example playbook ---------------- -Here's an example playbook that uses the ``debops.checkmk_server`` role:: +Here's an example playbook that uses the ``debops.checkmk_server`` role: - --- - - - name: Manage Check_MK server - hosts: [ 'debops_service_checkmk_server', 'debops_checkmk_server' ] - become: True - - roles: - - role: debops.checkmk_server - tags: [ 'role::checkmk_server' ] +.. literalinclude:: playbooks/checkmk_server.yml + :language: yaml This playbook will install the Check_MK server package along with its dependencies, and configure a minimal monitoring service with default values generated by Ansible. +The inclusion of the ``debops.ferm`` is optional. + Ansible tags ------------ diff --git a/docs/index.rst b/docs/index.rst index 42e9f6b..5f055e2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,7 +5,6 @@ Ansible role: debops.checkmk_server :maxdepth: 2 introduction - installation getting-started defaults defaults-configuration diff --git a/docs/installation.rst b/docs/installation.rst deleted file mode 100644 index da1a997..0000000 --- a/docs/installation.rst +++ /dev/null @@ -1,14 +0,0 @@ -Installation -============ - -This role requires at least Ansible ``v1.9.0``. To install it, clone it -into your `DebOps`_ project roles directory or ``/etc/ansible/roles``:: - - git clone https://github.com/debops-contrib/ansible-checkmk_server.git debops.checkmk_srever - -.. _DebOps: http://debops.org/ - -Role dependencies -~~~~~~~~~~~~~~~~~ - -- ``debops.ferm`` diff --git a/docs/introduction.rst b/docs/introduction.rst index 1858826..5d83129 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -10,3 +10,11 @@ a powerful configuration language for creating check inventories. .. _Check_MK: http://mathias-kettner.com/check_mk.html .. _Nagios: https://www.nagios.org/ .. _Icinga: https://www.icinga.org/ + + +Installation +~~~~~~~~~~~~ + +This role requires at least Ansible ``v2.0``. To install it, run:: + + ansible-galaxy install debops-contrib.checkmk_server diff --git a/docs/playbooks/checkmk_server.yml b/docs/playbooks/checkmk_server.yml new file mode 100644 index 0000000..f5a246f --- /dev/null +++ b/docs/playbooks/checkmk_server.yml @@ -0,0 +1,16 @@ +--- + +- name: Manage Check_MK server + hosts: [ 'debops_service_checkmk_server', 'debops_checkmk_server' ] + become: True + + roles: + + - role: debops.ferm + tags: [ 'depend::ferm', 'depend::ferm:checkmk_server', 'depend-of::checkmk_server', 'type::dependency' ] + ferm__dependent_rules: + - '{{ checkmk_server__ferm_dependent_rules }}' + + - role: debops-contrib.checkmk_server + tags: [ 'role::checkmk_server' ] + diff --git a/meta/main.yml b/meta/main.yml index 7796778..2bcc957 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,12 +1,6 @@ --- -dependencies: - - - role: debops.ferm - tags: [ 'depend::ferm', 'depend::ferm:checkmk_server', 'depend-of::checkmk_server', 'type::dependency' ] - ferm__dependent_rules: '{{ checkmk_server__ferm_dependent_rules }}' - when: checkmk_server__dependencies | bool - +dependencies: [] galaxy_info: