From 8bd4f52b7c861f344a84f9f0139cdc4821ec1ac0 Mon Sep 17 00:00:00 2001 From: Raimund Konz Date: Sun, 15 Sep 2024 15:32:51 +0000 Subject: [PATCH] lint fixes --- .ansible-lint | 7 ++++--- tasks/main.yml | 5 +++-- tests/example.yml | 5 +++++ tests/test.yml | 6 ++++-- 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 tests/example.yml diff --git a/.ansible-lint b/.ansible-lint index 2394b2a..cf736ad 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,6 +1,7 @@ +--- # .ansible-lint warn_list: - - '204' # Lines should be less than 160 characters - - '701' # meta/main.yml should contain relevant info + - "204" # Lines should be less than 160 characters + - "701" # meta/main.yml should contain relevant info skip_list: - - '106' # Role name must match ^[a-z][a-z0-9_]+$ pattern + - "106" # Role name must match ^[a-z][a-z0-9_]+$ pattern diff --git a/tasks/main.yml b/tasks/main.yml index 68a6567..3cedb70 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,5 @@ --- # No tasks -- debug: msg="No tasks are provided here. Please import the task as needed in your playbook." -... +- name: Nothing here + ansible.builtin.debug: + msg: No tasks are provided here. Please import the task as needed in your playbook. diff --git a/tests/example.yml b/tests/example.yml new file mode 100644 index 0000000..2eb6873 --- /dev/null +++ b/tests/example.yml @@ -0,0 +1,5 @@ +--- +# No tasks +- name: Here we do something nothing + ansible.builtin.debug: + msg: No tasks are provided here. Please import the task as needed in your playbook. diff --git a/tests/test.yml b/tests/test.yml index 27fe873..a0e9b1d 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -1,5 +1,7 @@ --- -- hosts: localhost +- name: Testing example + hosts: localhost remote_user: root tasks: - - import_tasks: example.yml + - name: Importing + ansible.builtin.import_tasks: example.yml