From acfb0c25314f6d78efd4befb82a5fded0a18bf04 Mon Sep 17 00:00:00 2001 From: jo Date: Fri, 22 Sep 2023 10:09:38 +0200 Subject: [PATCH] refactor: fix forbidden implicit octal value Fix ansible-lint yaml[octal-values] https://ansible.readthedocs.io/projects/lint/rules/risky-octal/ --- molecule/default/create.yml | 2 +- molecule/default/destroy.yml | 2 +- src/molecule/data/templates/scenario/create.yml.j2 | 3 +-- src/molecule/data/templates/scenario/destroy.yml.j2 | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/molecule/default/create.yml b/molecule/default/create.yml index b33ceb6c8..c847720b3 100644 --- a/molecule/default/create.yml +++ b/molecule/default/create.yml @@ -34,4 +34,4 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" diff --git a/molecule/default/destroy.yml b/molecule/default/destroy.yml index f4493abea..37137c3de 100644 --- a/molecule/default/destroy.yml +++ b/molecule/default/destroy.yml @@ -20,5 +20,5 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" when: server.changed | default(false) | bool # noqa no-handler diff --git a/src/molecule/data/templates/scenario/create.yml.j2 b/src/molecule/data/templates/scenario/create.yml.j2 index d589bc2db..1c9456a8e 100644 --- a/src/molecule/data/templates/scenario/create.yml.j2 +++ b/src/molecule/data/templates/scenario/create.yml.j2 @@ -6,7 +6,6 @@ gather_facts: false # no_log: "{{ molecule_no_log }}" tasks: - # TODO: Developer must implement and populate 'server' variable - name: Create instance config @@ -34,5 +33,5 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" {%- endraw %} diff --git a/src/molecule/data/templates/scenario/destroy.yml.j2 b/src/molecule/data/templates/scenario/destroy.yml.j2 index 08b95b329..d1bd41897 100644 --- a/src/molecule/data/templates/scenario/destroy.yml.j2 +++ b/src/molecule/data/templates/scenario/destroy.yml.j2 @@ -21,6 +21,6 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" when: server.changed | default(false) | bool # noqa no-handler {%- endraw %}