Skip to content

Commit

Permalink
Merge branch 'ypid-feat/debops-dev-patchset-14'
Browse files Browse the repository at this point in the history
  • Loading branch information
drybjed committed Jan 12, 2023
2 parents 0ef1486 + c69e040 commit 95b0277
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ansible/playbooks/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# debops run upgrade reboot -l <host>
#
# THe 'reboot' DebOps role will check if the reboot is required and do it only
# The 'reboot' DebOps role will check if the reboot is required and do it only
# when needed.

- name: Upgrade a machine using APT
Expand Down
17 changes: 7 additions & 10 deletions docs/user-guide/playbooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ order of layers is defined in the :file:`site.yml` playbook, but if needed,
each layer can be executed in the order specified by the user.

Check the playbooks in the :file:`ansible/playbooks/layer/` directory to see
order of execution of specific services.
the order of execution of specific services.

.. note:: This setup applies since DebOps v3.1.0, older releases use a set of
symlinks to achieve a similar result.
Expand All @@ -158,10 +158,10 @@ configure a :command:`nginx` webserver:
# ansible/inventory/hosts
[debops_all_hosts]
webserver ansible_host=server.example.org
server.example.org
[debops_service_nginx]
webserver
server.example.org
You can apply a specific playbook using the :command:`ansible-playbook` command
by specifying it directly. For example, with the cloned :command:`git`
Expand Down Expand Up @@ -257,7 +257,7 @@ either via the command line or imported into other playbooks, must exist before
Ansible execution can proceed. So in DebOps there's no way to provide some kind
of hooks where external playbooks can be plugged in later.

Let's create an exmaple playbook in the DebOps project directory,
Let's create an example playbook in the DebOps project directory,
:file:`ansible/playbooks/custom.yml`:

.. code-block:: yaml
Expand All @@ -266,12 +266,11 @@ Let's create an exmaple playbook in the DebOps project directory,
- name: Custom playbook
hosts: 'debops_all_hosts'
become: True
tasks:
- name: Message the user that we are in a custom playbook
ansible.builtin.debug:
msg: 'Hello from a custom playbook"
msg: 'Hello from a custom playbook'
This playbook can be executed by the :command:`debops` script very easily:

Expand Down Expand Up @@ -311,12 +310,11 @@ Here, we import a playbook from the cloned DebOps :command:`git` repository
- name: Custom playbook
hosts: 'debops_all_hosts'
become: True
tasks:
- name: Message the user that we are in a custom playbook
ansible.builtin.debug:
msg: 'Hello from a custom playbook"
msg: 'Hello from a custom playbook'
If DebOps Collection has been installed from Ansible Galaxy, or the Python
package has been installed, the playbooks can be referenced using the Fully
Expand All @@ -331,12 +329,11 @@ Qualified Collection Name of the playbook:
- name: Custom playbook
hosts: 'debops_all_hosts'
become: True
tasks:
- name: Message the user that we are in a custom playbook
ansible.builtin.debug:
msg: 'Hello from a custom playbook"
msg: 'Hello from a custom playbook'
This way the custom playbook is a lot more portable and doesn't depend on the
location of the imported playbooks in the filesystem.
Expand Down

0 comments on commit 95b0277

Please sign in to comment.