I'd put both those plays into site.yml , just targeting different host groups, and have a single roles/ directory.
If you'd prefer, there's nothing wrong with a jenkins.yml and gerrit.yml up in the same folder as site.yml. On 1 September 2016 at 21:13, Alan Evangelista <[email protected]> wrote: > I current have one playbook for each application in my infrastructure: one > for Gerrit, one for Jenkins, etc. Current filesystem structure: > > playbooks > | > ---- gerrit > | > --- roles > | > ---- postfix > ---- jenkins > | > --- master.yml > --- roles > | > ---- postfix > > My Jenkins master node setup playbook has something like: > > - name: Setup Jenkins master node > hosts: jenkins-master > remote_user: root > roles: > - selinux > - epel > - packages > - user > - sudo > - jenkins > - nginx > - systemd > - firewalld > - nfs > - ssh > - postfix > > The gerrit setup playbook is similar. > > > - name: Setup Gerrit > hosts: gerrit > remote_user: root > roles: > - selinux > - epel > - packages > - gerrit > - systemd > - firewalld > - postfix > > I'd like to reuse the postfix email server role used in Gerrit playbook in > the Jenkins playbook. Currently, it is duplicated. Is that possible or > should I use a different Ansible files organization to achieve the reuse I > desire? > > -- > 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/2b9ff3ae-78a3-4239-a6c1-cb6a854a066e%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/CAK5eLPSNHSNdk%3DRWKwb5ccJQrUq02yxgXoOFPCO4iQ-iFwDfwA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
