Skip to content

Conversation

@ohmer1
Copy link

@ohmer1 ohmer1 commented Jan 20, 2023

With import_tasks, ansible still evaluate the code and throws an error if the role doesn't exists. Replaced with include_tasks instead.

This fix this error :

TASK [Exécution du rôle coffeeitworks.ansible_burp2_server] ****************************************************************************************************************************
vendredi 20 janvier 2023  13:48:20 -0500 (0:00:01.831)       0:00:07.183 ****** 
vendredi 20 janvier 2023  13:48:20 -0500 (0:00:01.831)       0:00:07.182 ****** 
ERROR! the role 'ansible-role-powertools' was not found in /home/xxxx/git/conformite/playbooks/roles:/home/xxxx/git/conformite/roles:/home/xxxx/git/conformite/playbooks

The error appears to be in '/home/xxxx/git/conformite/roles/coffeeitworks.ansible_burp2_server/tasks/1_2_redhat.yml': line 24, column 11, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  import_role:
    name: ansible-role-powertools
          ^ here

… the role is not targeting a server running CentOS/RH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant