I did also that one for role installation and another play for the roles and then run them like there
- include_playbook: requirements.yml - include_playbook: project.yml but same error.. roles are not founded ( which of course are not because the requirements.yaml hasn't done the installation) I tried requirement.yamls installing from GitHub but the playbook error was src is cannot be in a play and then with a task same as above but that didn't install the roles first neither. On Friday, March 20, 2020 at 4:25:13 PM UTC+1, Stefan Hornburg (Racke) wrote: > > On 3/20/20 4:17 PM, Johanna Galarza wrote: > > This is my current setup > > --- > > - hosts: all > > pre-tasks: > > - local_action: > > command ansible-galaxy install -r requirements.yml -p . (this > install roles roleA, roleB, roleC) > > roles: > > - role1 > > - role2 > > > > I have always an error message that it says that role1 doesn't exist... > and I cannot see the first command being > > executed even with a debug message - so I have the feeling it is always > executing roles first and then pre-tasks, > > however, I read that pre-task will be run first.... why does this > doesn't apply here? > > > > Any idea? > > No, I think it checks whether the roles are available before running the > playbook. So if they are not accessible, > it terminates before performing any tasks. > > I would use separate playbooks for the module installation and the > execution of the roles. > > Regards > Racke > > > > > -- > > 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] <javascript:> <mailto: > [email protected] <javascript:>>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/884e2977-1bdc-480b-a434-cf820b456815%40googlegroups.com > > > < > https://groups.google.com/d/msgid/ansible-project/884e2977-1bdc-480b-a434-cf820b456815%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > > > -- > Ecommerce and Linux consulting + Perl and web application programming. > Debian and Sympa administration. Provisioning with Ansible. > > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ccb960c3-2e6a-4050-94a1-41e303375ab2%40googlegroups.com.
