Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an error when the role ansible-role-powertools doesn't exists and the role is not targeting a server running CentOS/RH #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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