aboutsummaryrefslogtreecommitdiff
path: root/examples/webserver.yaml
blob: 7dd937cbf2dd78e2504bfe238bbbbab7d6dfb91d (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
27
28
29
30
31
32
33
34
35
36
37
38
# YAML
template: 
    name: webserver
    description: |
        Basic webserver template
    roles:
        # Define my roles here
        - webserver
    services:
        # This is where we define the 
        # services/dependencies needed
        use:
            - network
            - ssh
            - accounts:
                users:
                    - bsmith
                groups:
                    - bsmith
        disable:
            - selinux
    software_packages:
        apache:
            - version: 2.2.14
        python:
            - version: 2.6.2
    python_modules: python_modules.all
    runtime_script: |
        #!/usr/bin/env python
        """ Make subset of runtime methods available
        """
        from mrbelvedere import module

        module.do_stuff(arg)
    # Nice thing about YAML/PyYAML is defining variables
    # And calling code in-line.  Can do tricks like below
    dir: &DIR /tmp
    adhoc: !!python/object/apply:os.listdir [*DIR]