What are the basic files (dirs and regular file) in Ansible-Galaxy roles? [closed]
Clash Royale CLAN TAG#URR8PPP
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
Why is Ansible-Galaxy role by our beloved Geerling (and some other similar roles) all include in GitHub the directories defaults/
, meta/
and templates
and the .travis.yml
file? in other words, Why a single playbook such as the one I wrote isn't enough?
apache-httpd php ansible syntax stability
closed as unclear what you're asking by Rui F Ribeiro, Mr Shunz, schily, Thomas, Scott Dec 19 at 4:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
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
Why is Ansible-Galaxy role by our beloved Geerling (and some other similar roles) all include in GitHub the directories defaults/
, meta/
and templates
and the .travis.yml
file? in other words, Why a single playbook such as the one I wrote isn't enough?
apache-httpd php ansible syntax stability
closed as unclear what you're asking by Rui F Ribeiro, Mr Shunz, schily, Thomas, Scott Dec 19 at 4:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
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
Why is Ansible-Galaxy role by our beloved Geerling (and some other similar roles) all include in GitHub the directories defaults/
, meta/
and templates
and the .travis.yml
file? in other words, Why a single playbook such as the one I wrote isn't enough?
apache-httpd php ansible syntax stability
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
Why is Ansible-Galaxy role by our beloved Geerling (and some other similar roles) all include in GitHub the directories defaults/
, meta/
and templates
and the .travis.yml
file? in other words, Why a single playbook such as the one I wrote isn't enough?
apache-httpd php ansible syntax stability
apache-httpd php ansible syntax stability
asked Dec 18 at 8:55
JohnDoea
901132
901132
closed as unclear what you're asking by Rui F Ribeiro, Mr Shunz, schily, Thomas, Scott Dec 19 at 4:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by Rui F Ribeiro, Mr Shunz, schily, Thomas, Scott Dec 19 at 4:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
meta
contains meta-data used for the Galaxy registry. .travis.yml
contains configuration for Travis CI, which ensures that the project is continuously integrated. The other directories embody the typical structure of an Ansible role: defaults
contains the default settings, tasks
contains the playbooks, and templates
contains the templates for generated files.
ansible-galaxy init
will create the default structure for you; see the documentation for details. Currently, this is
README.md
.travis.yml
defaults/
main.yml
files/
handlers/
main.yml
meta/
main.yml
templates/
tests/
inventory
test.yml
vars/
main.yml
but you won’t see all this in all roles since few roles require every file and directory listed here.
If you look at the files in tasks
, you’ll see that this particular role handles many more cases than your own playbook. That doesn’t mean that your own playbook isn’t “enough”; it explains why a structured approach is useful.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
meta
contains meta-data used for the Galaxy registry. .travis.yml
contains configuration for Travis CI, which ensures that the project is continuously integrated. The other directories embody the typical structure of an Ansible role: defaults
contains the default settings, tasks
contains the playbooks, and templates
contains the templates for generated files.
ansible-galaxy init
will create the default structure for you; see the documentation for details. Currently, this is
README.md
.travis.yml
defaults/
main.yml
files/
handlers/
main.yml
meta/
main.yml
templates/
tests/
inventory
test.yml
vars/
main.yml
but you won’t see all this in all roles since few roles require every file and directory listed here.
If you look at the files in tasks
, you’ll see that this particular role handles many more cases than your own playbook. That doesn’t mean that your own playbook isn’t “enough”; it explains why a structured approach is useful.
add a comment |
meta
contains meta-data used for the Galaxy registry. .travis.yml
contains configuration for Travis CI, which ensures that the project is continuously integrated. The other directories embody the typical structure of an Ansible role: defaults
contains the default settings, tasks
contains the playbooks, and templates
contains the templates for generated files.
ansible-galaxy init
will create the default structure for you; see the documentation for details. Currently, this is
README.md
.travis.yml
defaults/
main.yml
files/
handlers/
main.yml
meta/
main.yml
templates/
tests/
inventory
test.yml
vars/
main.yml
but you won’t see all this in all roles since few roles require every file and directory listed here.
If you look at the files in tasks
, you’ll see that this particular role handles many more cases than your own playbook. That doesn’t mean that your own playbook isn’t “enough”; it explains why a structured approach is useful.
add a comment |
meta
contains meta-data used for the Galaxy registry. .travis.yml
contains configuration for Travis CI, which ensures that the project is continuously integrated. The other directories embody the typical structure of an Ansible role: defaults
contains the default settings, tasks
contains the playbooks, and templates
contains the templates for generated files.
ansible-galaxy init
will create the default structure for you; see the documentation for details. Currently, this is
README.md
.travis.yml
defaults/
main.yml
files/
handlers/
main.yml
meta/
main.yml
templates/
tests/
inventory
test.yml
vars/
main.yml
but you won’t see all this in all roles since few roles require every file and directory listed here.
If you look at the files in tasks
, you’ll see that this particular role handles many more cases than your own playbook. That doesn’t mean that your own playbook isn’t “enough”; it explains why a structured approach is useful.
meta
contains meta-data used for the Galaxy registry. .travis.yml
contains configuration for Travis CI, which ensures that the project is continuously integrated. The other directories embody the typical structure of an Ansible role: defaults
contains the default settings, tasks
contains the playbooks, and templates
contains the templates for generated files.
ansible-galaxy init
will create the default structure for you; see the documentation for details. Currently, this is
README.md
.travis.yml
defaults/
main.yml
files/
handlers/
main.yml
meta/
main.yml
templates/
tests/
inventory
test.yml
vars/
main.yml
but you won’t see all this in all roles since few roles require every file and directory listed here.
If you look at the files in tasks
, you’ll see that this particular role handles many more cases than your own playbook. That doesn’t mean that your own playbook isn’t “enough”; it explains why a structured approach is useful.
edited Dec 18 at 9:07
answered Dec 18 at 9:00
Stephen Kitt
164k24365444
164k24365444
add a comment |
add a comment |