common: unify string escaping style

This commit is contained in:
Markus 2021-11-03 18:29:04 +01:00
parent 3c56af2906
commit 931d97359e
3 changed files with 16 additions and 16 deletions

View File

@ -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]+"

View File

@ -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

View File

@ -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