Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Use template module instead of copy
Browse files Browse the repository at this point in the history
According to the documentation using copy with variables can lead to
unpredictable output. This is now also reflected in ansible-lint.
Comparr with /~https://github.com/ansible/ansible-lint/blob/ac7284252d744318a446e3a4e9c788b923b767e7/src/ansiblelint/rules/template-instead-of-copy.md
  • Loading branch information
tobiashuste committed Sep 20, 2022
1 parent 4ae3620 commit d9d9cd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/separate-runner-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
changed_when: false

- name: Copy isolated runner configuration
ansible.builtin.copy:
ansible.builtin.template:
src: "runner_config.j2"
dest: "{{ tmp_runner_config_file.path }}"
content: "{{ runner_config }}"
owner: "root"
group: "root"
mode: "0600"
Expand Down
7 changes: 7 additions & 0 deletions templates/runner_config.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{#
# SPDX-FileCopyrightText: 2020 Helmholtz Centre for Environmental Research (UFZ)
# SPDX-FileCopyrightText: 2020 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
#
# SPDX-License-Identifier: Apache-2.0
#}
{{ runner_config }}

0 comments on commit d9d9cd8

Please sign in to comment.