Sha256: 4b0be1b9209a921306fa816172cf63bf530394923ab2097d9ad053aeb565db48

Contents?: true

Size: 1.43 KB

Versions: 4

Compression:

Stored size: 1.43 KB

Contents

---
# playbook to setup the dev env for this repo
- name: dev setup for {{ project_owner }}/{{ project_name }}
{% raw %}
  hosts: localhost

  vars:
    # repos that are co-developed
    repos: []
    # example:
    # - owner: nrser
    #   name: qb

    # repos that are used for reference only
    ref_repos: []
    # example:
    # - owner: ansible
      # name: ansible
      # version: v1.9.4-1
      # dir_name: ansible-v1.9.4
      # depth: 1

  tasks:
  - name: clone co-dev repos
    git:
      repo: git@github.com:{{ item.owner }}/{{ item.name }}.git
      dest: ./repos/{{ item.dir_name | default(item.name) }}
      version: "{{ item.version | default('HEAD') }}"
      update: no
    with_items: repos

  - name: see if the repos have a Gemfile
    stat:
      path: "./repos/{{ item.dir_name | default(item.name) }}/Gemfile"
    with_items: repos
    register: gemfile_stats

  - name: install bunlde for any that have a Gemfile
    shell: bash -lc "bundle install --path=./.bundle"
    args:
      chdir: "{{ item.invocation.module_complex_args.path | dirname }}"
    when: item.stat.exists
    with_items: gemfile_stats.results | default([])

  - name: clone ref repos
    git:
      repo: git@github.com:{{ item.owner }}/{{ item.name }}.git
      dest: ./ref/repos/{{ item.dir_name | default(item.name) }}
      version: "{{ item.version | default('HEAD') }}"
      depth: "{{ item.depth | default(0) }}"
    with_items: ref_repos
{% endraw %}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
qb-0.1.3 roles/qb.project/templates/setup.yml.j2
qb-0.1.2 roles/qb.project/templates/setup.yml.j2
qb-0.1.1 roles/qb.project/templates/setup.yml.j2
qb-0.1.0 roles/qb.project/templates/setup.yml.j2