From 931d97359e101e0ad38881950887eab2a4c07a18 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Wed, 3 Nov 2021 18:29:04 +0100 Subject: [PATCH] common: unify string escaping style --- roles/common/tasks/Debian.yml | 16 ++++++++-------- roles/common/tasks/Proxmox.yml | 8 ++++---- roles/common/tasks/main.yml | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/roles/common/tasks/Debian.yml b/roles/common/tasks/Debian.yml index 2197cd8..950f084 100644 --- a/roles/common/tasks/Debian.yml +++ b/roles/common/tasks/Debian.yml @@ -28,10 +28,10 @@ copy: src={{ item.src }} dest={{ item.dest }} diff: no with_items: - - { src: '.zshrc', dest: '/root/.zshrc' } - - { src: '.zshrc.local', dest: '/root/.zshrc.local' } - - { src: 'motd', dest: '/etc/motd' } - - { src: 'vimrc.local', dest: '/etc/vim/vimrc.local' } + - { src: ".zshrc", dest: "/root/.zshrc" } + - { src: ".zshrc.local", dest: "/root/.zshrc.local" } + - { src: "motd", dest: "/etc/motd" } + - { src: "vimrc.local", dest: "/etc/vim/vimrc.local" } - name: Set shell for root user user: name=root shell=/bin/zsh @@ -52,8 +52,8 @@ - name: Prevent normal users from running su lineinfile: path: /etc/pam.d/su - regexp: '^.*auth\s+required\s+pam_wheel.so$' - line: 'auth required pam_wheel.so' + regexp: "^.*auth\\s+required\\s+pam_wheel.so$" + line: "auth required pam_wheel.so" - name: Configure journald retention lineinfile: @@ -88,14 +88,14 @@ set_fact: logrotateconfigpaths: "{{ alllogrotateconfigpaths | difference(logrotate_excludes) }}" -- name: 'Set logrotate.d/* to daily' +- name: "Set logrotate.d/* to daily" replace: path: "{{ item }}" regexp: "(?:weekly|monthly)" replace: "daily" loop: "{{ logrotateconfigpaths }}" -- name: 'Set /etc/logrotate.d/* rotation to 7' +- name: "Set /etc/logrotate.d/* rotation to 7" replace: path: "{{ item }}" regexp: "rotate [0-9]+" diff --git a/roles/common/tasks/Proxmox.yml b/roles/common/tasks/Proxmox.yml index 3a4f3e3..1564dd1 100644 --- a/roles/common/tasks/Proxmox.yml +++ b/roles/common/tasks/Proxmox.yml @@ -15,10 +15,10 @@ copy: src={{ item.src }} dest={{ item.dest }} diff: no with_items: - - { src: '.zshrc', dest: '/root/.zshrc' } - - { src: '.zshrc.local', dest: '/root/.zshrc.local' } - - { src: 'motd', dest: '/etc/motd' } - - { src: 'vimrc.local', dest: '/etc/vim/vimrc.local' } + - { src: ".zshrc", dest: "/root/.zshrc" } + - { src: ".zshrc.local", dest: "/root/.zshrc.local" } + - { src: "motd", dest: "/etc/motd" } + - { src: "vimrc.local", dest: "/etc/vim/vimrc.local" } - name: Set shell for root user user: name=root shell=/bin/zsh diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 7d41272..a285da6 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -2,20 +2,20 @@ - name: Cleanup apt: autoclean=yes - when: ansible_os_family == 'Debian' + when: ansible_os_family == "Debian" - name: Gather package facts package_facts: manager: apt - when: ansible_os_family == 'Debian' + when: ansible_os_family == "Debian" - name: Proxmox include: Proxmox.yml - when: ansible_os_family == 'Debian' and 'pve-manager' in ansible_facts.packages + when: ansible_os_family == "Debian" and "pve-manager" in ansible_facts.packages - name: Debian include: Debian.yml - when: ansible_os_family == 'Debian' and 'pve-manager' not in ansible_facts.packages + when: ansible_os_family == "Debian" and "pve-manager" not in ansible_facts.packages - name: Setup chrony include: chrony.yml