From 7b96fc3084284f088ad0008d5ee5cd5d0ba38619 Mon Sep 17 00:00:00 2001 From: Lars Beckers <lars.beckers@rwth-aachen.de> Date: Thu, 13 Dec 2018 20:09:23 +0100 Subject: [PATCH] lint yaml files --- .yamllint | 19 +++++++++++++++++++ journal-remote/handlers/main.yml | 2 ++ journal-remote/tasks/main.yml | 15 +++++++++------ journal-upload/handlers/main.yml | 2 ++ journal-upload/tasks/main.yml | 4 +++- 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 .yamllint diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..cca80e2 --- /dev/null +++ b/.yamllint @@ -0,0 +1,19 @@ +--- + +extends: default + +rules: + comments-indentation: + level: warning + document-start: + level: error + empty-lines: + max: 1 + empty-values: + forbid-in-flow-mappings: true + forbid-in-block-mappings: true + line-length: + level: warning + octal-values: + forbid-implicit-octal: true + level: warning diff --git a/journal-remote/handlers/main.yml b/journal-remote/handlers/main.yml index 6fccb1a..2b04fb4 100644 --- a/journal-remote/handlers/main.yml +++ b/journal-remote/handlers/main.yml @@ -1,3 +1,5 @@ +--- + - name: Run systemd-tmpfiles command: systemd-tmpfiles --create --prefix=/var/log/journal/remote diff --git a/journal-remote/tasks/main.yml b/journal-remote/tasks/main.yml index 3f26c76..f8bc7a6 100644 --- a/journal-remote/tasks/main.yml +++ b/journal-remote/tasks/main.yml @@ -1,4 +1,7 @@ -- name: ensure there are no write barriers on the partition for the remote journals +--- + +# yamllint disable-line rule:line-length +- name: ensure there are no write barriers on the partition for the remote journals mount: fstype: ext4 opts: defaults,nobarrier @@ -7,7 +10,7 @@ src: "UUID={{ item.uuid }}" passno: 1 with_items: "{{ ansible_mounts }}" - when: item.mount == "/" + when: item.mount == "/" tags: - journal-remote @@ -24,7 +27,7 @@ path: /etc/systemd/system/systemd-journal-remote.service.d owner: root group: root - mode: 0755 + mode: '0755' state: directory tags: - journal-remote @@ -35,7 +38,7 @@ dest: /etc/systemd/system/systemd-journal-remote.service.d/http.conf owner: root group: root - mode: 0644 + mode: '0644' src: http.conf notify: - Reload systemd @@ -67,8 +70,8 @@ - name: Enable journal-remote service systemd: name: systemd-journal-remote.socket - enabled: yes - daemon_reload: yes + enabled: true + daemon_reload: true state: started tags: - journal-remote diff --git a/journal-upload/handlers/main.yml b/journal-upload/handlers/main.yml index ce61d94..c43c762 100644 --- a/journal-upload/handlers/main.yml +++ b/journal-upload/handlers/main.yml @@ -1,3 +1,5 @@ +--- + - name: Reload systemd systemd: daemon-reload=yes diff --git a/journal-upload/tasks/main.yml b/journal-upload/tasks/main.yml index fbca18f..5ace4c4 100644 --- a/journal-upload/tasks/main.yml +++ b/journal-upload/tasks/main.yml @@ -1,3 +1,5 @@ +--- + - name: Configure only on Debian ≥Stretch when: ansible_distribution_major_version|int >= 9 block: @@ -41,7 +43,7 @@ - name: Enable journal-upload service systemd: name: systemd-journal-upload.service - enabled: yes + enabled: true state: started tags: - journal-upload -- GitLab