Hello everyone, I did not found a elegant way of sharing tasks list between roles. I explain my problem : 1 I have a first role in which i include tasks (IE create_user.yml) so i put the file in my_firt_role/tasks/create_user.yml 2 I am writing an other role in which i would like to use the tasks create_user.yml too
The only solutions i found to use it in both playbooks are : hardcode the path of a common dir in my roles includes ( /var/ansible/common/create_user.yml) duplicate the tasks in each playbook I was expecting a way to configure tasks lookup directories (like role_path for roles) in ansible.cfg I try also to add a role dependencies but it seems that the pulled roles are not sharing tasks to upper roles. Am I missing an Ansible feature or good practice ? Any ideas to improve tasks re-usability and avoid duplication ? Regards, Efflam -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6db3bceb-597c-491c-a0d3-00ff21f02a59%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
