From e49c9b9b41b85fab99d9757a674d8f454cbb6424 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Fri, 8 Jul 2016 22:40:29 +0200 Subject: [PATCH] Synced playbook. --- docs/getting-started.rst | 13 ++----------- docs/playbooks/unattended_upgrades.yml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 docs/playbooks/unattended_upgrades.yml diff --git a/docs/getting-started.rst b/docs/getting-started.rst index f26ecca..fda0628 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -48,17 +48,8 @@ Example playbook Here's an example playbook that can be used to enable and manage the ``unattended-upgrades`` service on a set of hosts: -.. code:: YAML - - --- - - name: Configure unattended APT upgrades - hosts: [ 'debops_all_hosts', 'debops_service_unattended_upgrades' ] - become: True - - roles: - - - role: debops.unattended_upgrades - tags: [ 'role::unattended_upgrades' ] +.. literalinclude:: playbooks/unattended_upgrades.yml + :language: yaml Use as a role dependency ------------------------ diff --git a/docs/playbooks/unattended_upgrades.yml b/docs/playbooks/unattended_upgrades.yml new file mode 100644 index 0000000..70ed410 --- /dev/null +++ b/docs/playbooks/unattended_upgrades.yml @@ -0,0 +1,15 @@ +--- + +- name: Manage unattended APT upgrades + hosts: [ 'debops_all_hosts', 'debops_service_unattended_upgrades' ] + become: True + + environment: '{{ inventory__environment | d({}) + | combine(inventory__group_environment | d({})) + | combine(inventory__host_environment | d({})) }}' + + roles: + + - role: debops.unattended_upgrades + tags: [ 'role::unattended_upgrades' ] +