summaryrefslogtreecommitdiffstats
path: root/docs/docsite/rst/tips_tricks/shared_snippets/role_directory.txt
blob: 25aa1784b190fa5af9847b1ae917147c1d1c778d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.. code-block:: yaml

  roles/
      common/               # this hierarchy represents a "role"
          tasks/            #
              main.yml      #  <-- tasks file can include smaller files if warranted
          handlers/         #
              main.yml      #  <-- handlers file
          templates/        #  <-- files for use with the template resource
              ntp.conf.j2   #  <------- templates end in .j2
          files/            #
              bar.txt       #  <-- files for use with the copy resource
              foo.sh        #  <-- script files for use with the script resource
          vars/             #
              main.yml      #  <-- variables associated with this role
          defaults/         #
              main.yml      #  <-- default lower priority variables for this role
          meta/             #
              main.yml      #  <-- role dependencies and optional Galaxy info
          library/          # roles can also include custom modules
          module_utils/     # roles can also include custom module_utils
          lookup_plugins/   # or other types of plugins, like lookup in this case

      webtier/              # same kind of structure as "common" was above, done for the webtier role
      monitoring/           # ""
      fooapp/               # ""