Fix ansible-lint name[template]

ansible-lint's name[template] check looks for templates and says they
should only be at the end of the string.  This is because in many
circumstances, including errors, the name can't be templated in -- so
the message has a chance of not making sense.  Honestly I can never
remember when it's safe to use templates in names and not; this seems
reasonable enough compromise.

Change-Id: I3a415c7706494f393b126b36d7eec7193638a3f1
This commit is contained in:
Ian Wienand 2022-10-17 13:50:10 +11:00
parent af3f79121a
commit 9d8cdfaaad
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
manage_dir: yes manage_dir: yes
key: "{{ lookup('file', zuul_temp_ssh_key ~ '.pub') }}" key: "{{ lookup('file', zuul_temp_ssh_key ~ '.pub') }}"
- name: Get the {{ copy_sshkey_target_user }} user home folder - name: 'Get the user home folder for {{ copy_sshkey_target_user }}'
user: user:
name: "{{ copy_sshkey_target_user }}" name: "{{ copy_sshkey_target_user }}"
register: target_user_registered register: target_user_registered

View File

@ -11,7 +11,7 @@
vars: vars:
opendev_url: https://opendev.org/zuul/zuul-jobs/src/branch/master/ opendev_url: https://opendev.org/zuul/zuul-jobs/src/branch/master/
- name: "Install origin{{ origin_repo_name }} pass repository" - name: "Install origin pass repository {{ origin_repo_name }}"
become: true become: true
copy: copy:
content: | content: |