From 62adb64fe171ff18ff4417a710b69de256d1fdac Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Sun, 30 Jun 2024 16:35:25 +0100 Subject: Cleanup quotes usage in YAML files Seems quotes in YAML is a mess. Official guidelines (see explanation here [1]) are following. 1. If you can get away without quotes, do not use them. 2. Use single quotes if you need quotes. 3. Use double quotes if you can't use single quotes for some reason. Common reason for double quotes in this repository is line breaks for long lines and control characters (\n, \t) in replacement patterns. Hope, I didn't break anything. Tested with following commands, because there are no changes in others. $ ansible-playbook dotfiles.yml $ ansible-playbook master.yml [1]: https://stackoverflow.com/a/69850618/1313516 --- roles/sshd/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roles/sshd') diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index 1991564..1c099ad 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -2,9 +2,9 @@ ansible.builtin.lineinfile: dest: /etc/ssh/sshd_config state: present - regexp: '^#?PasswordAuthentication' - line: 'PasswordAuthentication no' - validate: "/usr/sbin/sshd -t -f %s" + regexp: ^#?PasswordAuthentication + line: PasswordAuthentication no + validate: /usr/sbin/sshd -t -f %s owner: root group: root mode: u+r,g+r,o+r -- cgit v1.2.3-70-g09d2