[debops] Philosophical design usage of debops

Maciej Delmanowski drybjed at drybjed.net
Mon Sep 7 11:38:37 CEST 2015

On Sep 07, Hendrik Visage wrote:
> Examples/Guides/How-tos for making own playbooks etc.
> (Not trying to be critical, but just explaining my "fun" today :) )
> examples of playbooks that will "run". ie.
> I have this playbook:
> <code>
> #The file used to bootstrap anything specific that we'll need
> ---
> - hosts: all
>   sudo: yes
>   roles:
>     - role: bootstrap-hv
>     - role: debops.docker
>       tags: [ 'role::docker' ]
> </code>
> running with: "debops bootstrap -l dev-hv2 --ask-sudo-pass"

I'm not sure what exactly happened here, did you create a "bootstrap.yml"
playbook with above contents and tried to use it with above command?

Just a heads up - 'debops.docker' role relies on DebOps-managed environment, for
example 'debops.core' role variables are used to mange common directory paths
and facts about nameserver/search configuration in /etc/resolv.conf are used
to configure Docker; 'debops.pki' environment is used to handle variables.
Above playbook would work fine if you apply it on a host that already has been
configured by DebOps, but you might get issues otherwise.

> Even though I have "ferm: False" in a file in the file
> $PROJECT/ansible/inventory/group_vars/all/dockers, it fails with:
> TASK: [debops.ferm | Install ferm configuration directories] ******************
> ok: [usc-dev-hv2]
> TASK: [debops.ferm | Patch ferm init script] **********************************
> failed: [usc-dev-hv2] => {"failed": true}
> msg: The text leading up to this was:
> --------------------------
> |--- ferm 2015-09-04 12:02:07.843105402 +0200
> |+++ ferm 2015-09-04 11:58:25.159110930 +0200
> --------------------------
> No file to patch.  Skipping patch.
> 2 out of 2 hunks ignored
> FATAL: all hosts have already failed -- aborting

OK, I see the issue. Support for 'ferm' was disabled so it was not installed,
but without it patch cannot be applied because the init script is missing.
Good catch, I'm going to move the patch-related tasks to separate file and add
a condition on it to only do the patching if 'ferm' is enabled.


More information about the debops-users mailing list