Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cmcornejocrespo/0e28c6151a2a60b97790cabb00402df4 to your computer and use it in GitHub Desktop.
Save cmcornejocrespo/0e28c6151a2a60b97790cabb00402df4 to your computer and use it in GitHub Desktop.
enos-ansible
- name: Clean ENOS folder
file: path={{enos_project_path}} state=absent
tags: clean
- name: Download ENOS project
git:
repo: 'https://github.com/BeyondTheClouds/enos.git'
dest: "{{enos_project_path}}"
version: "{{enos_version}}"
force: true
- name: Install virtualenv
command: pip install virtualenv --user
- name: Initiate virtualenv
pip:
chdir: "{{enos_project_path}}"
virtualenv: "{{enos_project_path}}/venv"
requirements: "{{enos_project_path}}/requirements.txt"
virtualenv_command: "~/.local/bin/virtualenv"
- name: Define g5k/OpenStack resource reservation options
template:
src: ./files/reservation.yaml
dest: "{{enos_project_path}}/reservation.yaml"
- name: Install virtualenv and shade lib
shell: source venv/bin/activate && pip install {{item}}
args:
chdir: "{{enos_project_path}}"
with_items:
- shade
- name: Deploy OpenStack using ENOS
shell: source venv/bin/activate && python -m enos.enos deploy 2>&1
args:
chdir: "{{enos_project_path}}"
register: openstack_deployment
failed_when: openstack_deployment.rc != 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment