blob: 371b24e093a784016e207404ecff65cb02b0eecd [file] [log] [blame]
---
- hosts: localhost
connection: local
vars:
ansible_config: ~/.ansible
apigee_config: ~/.apigee
workspace: ~/apigee-workspace/opdk-workspace
repos:
- apigee-opdk-playbook-installation-single-region
- apigee-opdk-playbook-maintenance-aws-management
- apigee-opdk-playbook-samples
tasks:
- name: Create ansible configuration folders
file:
path: '{{ item }}'
state: directory
with_items:
- '{{ ansible_config }}/configurations'
- '{{ ansible_config }}/inventory'
- '{{ ansible_config }}/tmp/logs'
- '{{ apigee_config }}'
- name: Yum packages
yum:
name: '{{ item }}'
state: present
with_items:
- git
- tree
when: ansible_os_family | lower == 'redhat'
- name: Git checkout of sample configurations
ignore_errors: yes
git:
repo: https://github.com/carlosfrias/apigee-opdk-ansible-configuration-samples.git
dest: "{{ ansible_config }}/configurations"
- name: Git checkout of sample inventories
ignore_errors: yes
git:
repo: https://github.com/carlosfrias/apigee-opdk-ansible-inventory-samples.git
dest: "{{ ansible_config }}/inventory"
- name: Git checkout of sample playbooks
ignore_errors: yes
git:
repo: https://github.com/carlosfrias/{{ item }}.git
dest: "{{ workspace }}/{{ item }}"
with_items: "{{ repos }}"
- name: Add empty credentials.yml file to .apigee
copy:
src: resources/credentials.yml
dest: '{{ apigee_config }}/credentials.yml'
force: no