From 4b7ac0157484bfbf9e77dd647cc4f5e9b8f188e6 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 24 Apr 2017 10:01:57 +0200 Subject: [PATCH] "Ansible managed" in Conventions and Evolinux.yml --- CONVENTIONS.md | 6 ++++++ playbooks/evolinux.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CONVENTIONS.md b/CONVENTIONS.md index 1fe9455..309598b 100644 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@ -1,5 +1,11 @@ # Conventions +## Ansible managed, or not? + +When a server has just a few modifications made via Ansible, it's often enough to put a block marker (if just a section of a file is managed by Ansible) or a `{{ ansible_managed }}` tag at the top of the files (if this file is fully managed by Ansible). + +When a server is fully managed by Ansible, it's even better to use the `ansible-managed` role. It can be found in the **ansible-roles** repository. For the moment it only changes the "Message Of The Day" file (in `/etc/motd`). Don't forget to customize the `project_repositopy` variable ; it is used in this file. + ## Roles We can use the `ansible-galaxy init` command to bootstrap a new role : diff --git a/playbooks/evolinux.yml b/playbooks/evolinux.yml index f62b606..a6ac8aa 100644 --- a/playbooks/evolinux.yml +++ b/playbooks/evolinux.yml @@ -17,6 +17,8 @@ - "{{ roles }}/nagios-nrpe" - "{{ roles }}/listupgrade" - "{{ roles }}/evomaintenance" +# Consider enabling the ansible-managed role +# - "{{ roles }}/ansible-managed" post_tasks: