diff options
author | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-06-30 16:35:25 +0100 |
---|---|---|
committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2024-06-30 16:39:20 +0100 |
commit | 62adb64fe171ff18ff4417a710b69de256d1fdac (patch) | |
tree | a0e8a69be189a6795b9b2dca5b3e70ee87edcede /roles/sshd/tasks/main.yml | |
parent | 855e4219fd54f66a304e1701be785be8ed1f724d (diff) | |
download | infra-62adb64fe171ff18ff4417a710b69de256d1fdac.tar.gz infra-62adb64fe171ff18ff4417a710b69de256d1fdac.tar.bz2 infra-62adb64fe171ff18ff4417a710b69de256d1fdac.zip |
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
Diffstat (limited to 'roles/sshd/tasks/main.yml')
-rw-r--r-- | roles/sshd/tasks/main.yml | 6 |
1 files changed, 3 insertions, 3 deletions
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 |