CoffeeITWorks / ansible_burp2_server

Ansible role to deploy burp2 server
MIT License
10 stars 9 forks source link

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 ohmer1 opened 1 year ago

ohmer1 commented 1 year ago

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