1. 20 Aug, 2013 10 commits
  2. 19 Aug, 2013 13 commits
  3. 18 Aug, 2013 2 commits
  4. 17 Aug, 2013 5 commits
  5. 16 Aug, 2013 7 commits
  6. 15 Aug, 2013 3 commits
    • Adding support for role dependencies. · 9a401e73
      Fixes #3686
      
      Dependencies are enabled by adding a new directory/file named
      meta/main.yml to the role. The format of the dependencies are:
      
      dependencies:
      - { role: foo, x: 1, y: 2 }
      - { role: bar, x: 3, y: 4 }
      ...
      
      Dependencies inherit variables as they are seen at the time of the
      dependency inclusion. For example, if foo(x=1, y=2) has a dependency
      on bar(x=3,z=4), then bar will have variables (x=3,y=2,z=4).
      
      Different roles can have dependencies on the same role, and this
      variable inheritence allows for the reuse of generic roles quite easily.
      For example:
      
      Role 'car' has the following dependencies:
      dependencies:
        - { role: wheel, n: 1 }
        - { role: wheel, n: 2 }
        - { role: wheel, n: 3 }
        - { role: wheel, n: 4 }
      
      Role 'wheel' has the following dependencies:
      dependencies:
      - { role: tire }
      - { role: brake }
      
      The role 'car' is then used as follows:
      - { role: car, type: honda }
      
      And tasks/main.yml in each role simply contains the following:
      - name: {{ type }} whatever {{ n }}
        command: echo ''
      
      TASK: [honda tire 1]
      TASK: [honda brake 1]
      TASK: [honda wheel 1]
      TASK: [honda tire 2]
      TASK: [honda brake 2]
      TASK: [honda wheel 2]
      TASK: [honda tire 3]
      TASK: [honda brake 3]
      TASK: [honda wheel 3]
      TASK: [honda tire 4]
      TASK: [honda brake 4]
      TASK: [honda wheel 4]
      TASK: [I'm a honda]  <- (this is in roles/car/tasks/main.yml)
      James Cammarata committed