From e18649d2d2ef464f9df22fa8c4e1a6ea0f56a0b4 Mon Sep 17 00:00:00 2001 From: Samuel-BF <36996277+Samuel-BF@users.noreply.github.com> Date: Mon, 2 Nov 2020 10:09:28 +0100 Subject: [PATCH] Doc / Deployment with ansible: pacman -> package Using "package" ansible module make the ansible playbook able to run against most unix OSes. Pacman module only works with Arch and derivatives. Also : changing state from "latest" to "present". Ansible should not be a way to keep your system up-to-date : it's a configuration management system and, as such, should not change anything if neither the playbook nor the machine changed its state (idempotency). Reference : https://github.com/ansible/ansible-lint/blob/master/lib/ansiblelint/rules/PackageIsNotLatestRule.py#L24 --- docs/deployment/central-backup-server.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/deployment/central-backup-server.rst b/docs/deployment/central-backup-server.rst index 90d58eaee..bc20b20f2 100644 --- a/docs/deployment/central-backup-server.rst +++ b/docs/deployment/central-backup-server.rst @@ -124,9 +124,7 @@ folder. Even when the configuration is changed the repository server configurati satisfied and reproducible. Automate setting up an repository server with the user, group, folders and -permissions a Ansible playbook could be used. Keep in mind the playbook -uses the Arch Linux `pacman `_ -package manager to install and keep borg up-to-date. +permissions a Ansible playbook could be used. :: @@ -144,7 +142,7 @@ package manager to install and keep borg up-to-date. - host: app01.clnt.local key: "{{ lookup('file', '/path/to/keys/app01.clnt.local.pub') }}" tasks: - - pacman: name=borg state=latest update_cache=yes + - package: name=borg state=present - group: name="{{ group }}" state=present - user: name="{{ user }}" shell=/bin/bash home="{{ home }}" createhome=yes group="{{ group }}" groups= state=present - file: path="{{ home }}" owner="{{ user }}" group="{{ group }}" mode=0700 state=directory