blob: 248b504fe4aea8ce5d617368517d0ea4b9447ca3 [file] [log] [blame]
---
- hosts: '{{ hosts }}'
vars:
ansible_config: ~/.ansible
apigee_config: ~/.apigee
workspace: ~/apigee-workspace/opdk-workspace
# vars_prompt:
# - name: license_path
# prompt: "Enter path to license file"
# private: no
tasks:
# - name: Copy license file in .apigee folder
# copy:
# src: '{{ license_path }}'
# dest: '{{ apigee_config}}/license.txt'
- name: Create ansible configuration folders
file:
path: '{{ item }}'
state: directory
with_items:
- '{{ ansible_config }}/configurations'
- '{{ ansible_config }}/inventory'
- '{{ apigee_config }}'
- name: Yum packages
become: yes
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/apigee-opdk-playbook-samples.git
dest: "{{ workspace }}/apigee-opdk-playbook-samples"
- name: Add empty credentials.yml file to .apigee
copy:
src: resources/credentials.yml
dest: '{{ apigee_config }}/credentials.yml'
force: no