Is it a best practice to use Ansible-Galaxy roles in playbooks instead ansible-modules in playbooks? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1














I have an Ansible playbook for establishing LAMP environments on remote machines.



Part of this playbook deals with installing Composer:



- name: Install Composer
get_url:
url: https://getcomposer.org/installer
dest: /tmp/composer-setup.php
command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer


My consideration



Instead these 5-lines structure I was thinking of using this ansible-galaxy command inside the playbook:



ansible-galaxy install geerlingguy.composer


geerlingguy.composer is the most communally supported AG role with more than million users (so I assume that if there is a problem and Jeff isn't around at the moment - say, took vacation in Hawaii or something, there will be many community members to fix the problem and ensure stability.



Using this will also shorten my already quite-long playbook.



My question



In general, is it a best practice to use Ansible-Galaxy roles with tasks and tests in an Ansible playbook instead a set of ansible-modules in playbooks that should apparently achieve the same goal (maybe some redundant extras that might not matter and wouldn't interrupt being there as part of the AG role)? I would assume that yes, because it's more communal and stabler.










share|improve this question















closed as primarily opinion-based by Rui F Ribeiro, muru, Mr Shunz, schily, Thomas Dec 18 at 20:31


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.



















    1














    I have an Ansible playbook for establishing LAMP environments on remote machines.



    Part of this playbook deals with installing Composer:



    - name: Install Composer
    get_url:
    url: https://getcomposer.org/installer
    dest: /tmp/composer-setup.php
    command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer


    My consideration



    Instead these 5-lines structure I was thinking of using this ansible-galaxy command inside the playbook:



    ansible-galaxy install geerlingguy.composer


    geerlingguy.composer is the most communally supported AG role with more than million users (so I assume that if there is a problem and Jeff isn't around at the moment - say, took vacation in Hawaii or something, there will be many community members to fix the problem and ensure stability.



    Using this will also shorten my already quite-long playbook.



    My question



    In general, is it a best practice to use Ansible-Galaxy roles with tasks and tests in an Ansible playbook instead a set of ansible-modules in playbooks that should apparently achieve the same goal (maybe some redundant extras that might not matter and wouldn't interrupt being there as part of the AG role)? I would assume that yes, because it's more communal and stabler.










    share|improve this question















    closed as primarily opinion-based by Rui F Ribeiro, muru, Mr Shunz, schily, Thomas Dec 18 at 20:31


    Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

















      1












      1








      1







      I have an Ansible playbook for establishing LAMP environments on remote machines.



      Part of this playbook deals with installing Composer:



      - name: Install Composer
      get_url:
      url: https://getcomposer.org/installer
      dest: /tmp/composer-setup.php
      command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer


      My consideration



      Instead these 5-lines structure I was thinking of using this ansible-galaxy command inside the playbook:



      ansible-galaxy install geerlingguy.composer


      geerlingguy.composer is the most communally supported AG role with more than million users (so I assume that if there is a problem and Jeff isn't around at the moment - say, took vacation in Hawaii or something, there will be many community members to fix the problem and ensure stability.



      Using this will also shorten my already quite-long playbook.



      My question



      In general, is it a best practice to use Ansible-Galaxy roles with tasks and tests in an Ansible playbook instead a set of ansible-modules in playbooks that should apparently achieve the same goal (maybe some redundant extras that might not matter and wouldn't interrupt being there as part of the AG role)? I would assume that yes, because it's more communal and stabler.










      share|improve this question















      I have an Ansible playbook for establishing LAMP environments on remote machines.



      Part of this playbook deals with installing Composer:



      - name: Install Composer
      get_url:
      url: https://getcomposer.org/installer
      dest: /tmp/composer-setup.php
      command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer


      My consideration



      Instead these 5-lines structure I was thinking of using this ansible-galaxy command inside the playbook:



      ansible-galaxy install geerlingguy.composer


      geerlingguy.composer is the most communally supported AG role with more than million users (so I assume that if there is a problem and Jeff isn't around at the moment - say, took vacation in Hawaii or something, there will be many community members to fix the problem and ensure stability.



      Using this will also shorten my already quite-long playbook.



      My question



      In general, is it a best practice to use Ansible-Galaxy roles with tasks and tests in an Ansible playbook instead a set of ansible-modules in playbooks that should apparently achieve the same goal (maybe some redundant extras that might not matter and wouldn't interrupt being there as part of the AG role)? I would assume that yes, because it's more communal and stabler.







      apache-httpd php ansible syntax stability






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 18 at 8:30

























      asked Dec 18 at 8:04









      JohnDoea

      901132




      901132




      closed as primarily opinion-based by Rui F Ribeiro, muru, Mr Shunz, schily, Thomas Dec 18 at 20:31


      Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.






      closed as primarily opinion-based by Rui F Ribeiro, muru, Mr Shunz, schily, Thomas Dec 18 at 20:31


      Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Whether to use a Galaxy-provided role is a decision you need to evaluate in your specific context (for every role you’re considering).



          Good roles on Galaxy will often handle many more situations than your specific role (look at the contents of tasks here, compared to your playbook), but those capabilities come at a cost: you’re adding an external dependency to your system, and relying on a community to handle your requirements.



          You need to look at the cost of evaluating a Galaxy role compared to developing a playbook (or your own Galaxy role); both now, and in the future. There’s no hard-and-fast rule.






          share|improve this answer





























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Whether to use a Galaxy-provided role is a decision you need to evaluate in your specific context (for every role you’re considering).



            Good roles on Galaxy will often handle many more situations than your specific role (look at the contents of tasks here, compared to your playbook), but those capabilities come at a cost: you’re adding an external dependency to your system, and relying on a community to handle your requirements.



            You need to look at the cost of evaluating a Galaxy role compared to developing a playbook (or your own Galaxy role); both now, and in the future. There’s no hard-and-fast rule.






            share|improve this answer



























              2














              Whether to use a Galaxy-provided role is a decision you need to evaluate in your specific context (for every role you’re considering).



              Good roles on Galaxy will often handle many more situations than your specific role (look at the contents of tasks here, compared to your playbook), but those capabilities come at a cost: you’re adding an external dependency to your system, and relying on a community to handle your requirements.



              You need to look at the cost of evaluating a Galaxy role compared to developing a playbook (or your own Galaxy role); both now, and in the future. There’s no hard-and-fast rule.






              share|improve this answer

























                2












                2








                2






                Whether to use a Galaxy-provided role is a decision you need to evaluate in your specific context (for every role you’re considering).



                Good roles on Galaxy will often handle many more situations than your specific role (look at the contents of tasks here, compared to your playbook), but those capabilities come at a cost: you’re adding an external dependency to your system, and relying on a community to handle your requirements.



                You need to look at the cost of evaluating a Galaxy role compared to developing a playbook (or your own Galaxy role); both now, and in the future. There’s no hard-and-fast rule.






                share|improve this answer














                Whether to use a Galaxy-provided role is a decision you need to evaluate in your specific context (for every role you’re considering).



                Good roles on Galaxy will often handle many more situations than your specific role (look at the contents of tasks here, compared to your playbook), but those capabilities come at a cost: you’re adding an external dependency to your system, and relying on a community to handle your requirements.



                You need to look at the cost of evaluating a Galaxy role compared to developing a playbook (or your own Galaxy role); both now, and in the future. There’s no hard-and-fast rule.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 18 at 9:11









                JohnDoea

                901132




                901132










                answered Dec 18 at 8:14









                Stephen Kitt

                164k24365444




                164k24365444












                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay