jenkins.plone.org/master: Make the file more readable

Gil Forcada <jenkins-z4DKO/[email protected]> Sat, 29 Jul 2017 15:00:40 -0700 (PDT)
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: jenkins.plone.org
Branch: refs/heads/master
Date: 2017-07-30T00:00:19+02:00
Author: Gil Forcada (gforcada) <[email protected]>
Commit: https://github.com/plone/jenkins.plone.org/commit/bdb734b67f5f281a98bcfd7f821ccf88c5363cc2

Make the file more readable

Files changed:
M ansible/server.yml

diff --git a/ansible/server.yml b/ansible/server.yml
index 8f150eb..cabfe0d 100644
--- a/ansible/server.yml
+++ b/ansible/server.yml
@@ -63,31 +63,56 @@
     # Install mr.roboto
     - name: Install nginx-extras
       apt: name=nginx-extras state=present
+
     - name: Install supervisor
       pip: name=supervisor
+
     - name: Checkout mr.roboto
       git: repo=https://github.com/plone/mr.roboto.git dest=/srv/mr.roboto
+
     - name: Create a virtualenv for mr.roboto
       pip:
         requirements=/srv/mr.roboto/requirements.txt
         virtualenv=/srv/mr.roboto
         virtualenv_command=/srv/python2.7.11/bin/virtualenv
+
     - name: Run mr.roboto bootstrap
       shell: bin/python2.7 bootstrap.py
         chdir=/srv/mr.roboto/
         creates=/srv/mr.roboto/bin/buildout
+
     - name: Run mr.roboto buildout
       shell: bin/buildout
         chdir=/srv/mr.roboto/
       notify: Restart mr.roboto
-    - lineinfile: dest=/usr/lib/python2.7/sitecustomize.py line="import sys; sys.setdefaultencoding('utf-8');"
+
+    - name: Ensure system encoding is utf-8
+      lineinfile:
+        dest=/usr/lib/python2.7/sitecustomize.py
+        line="import sys; sys.setdefaultencoding('utf-8');"
 
     # Install munin
     - name: Install munin
       apt: name=munin state=present
-    - lineinfile: dest=/etc/munin/munin.conf regexp=^#htmldir line="htmldir /var/cache/munin/www"
-    - lineinfile: dest=/etc/munin/munin.conf regexp=^#tmpldir line="tmpldir /etc/munin/templates"
-    - lineinfile: dest=/etc/munin/munin.conf regexp=^[localhost.localdomain] line="[jenkins.plone.org]"
+
+    - name: Set htmldir variable
+      lineinfile:
+        dest=/etc/munin/munin.conf
+        regexp=^#htmldir
+        line="htmldir /var/cache/munin/www"
+
+    - name: Set tmpldir variable
+      lineinfile:
+        dest=/etc/munin/munin.conf
+        regexp=^#tmpldir
+        line="tmpldir/etc/munin/templates"
+
+    - name: Set domain in configuration
+      lineinfile:
+        dest=/etc/munin/munin.conf
+        regexp=^[localhost.localdomain]
+        line="[jenkins.plone.org]"
+
     # XXX: not sure if we want to protect munin with pw yet.
     #- htpasswd: path=/etc/nginx/passwdfile name=guest password=guest owner=root group=www-data mode=0640
 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot