As we do not have any pypi server here, I usually deliver the following
deploy.yml with every python application I write:
- hosts: {{ my_host }}
vars:
version: "0.1"
venv_location: /path/to/venv
tasks:
- name: assure virtualenv
sudo: yes
pip:
name=virtualenv
- name: create sdist
local_action:
command python setup.py sdist
- name: copy sdist to target
copy:
src=/dist/myapp-{{ version }}.tar.gz
dest=/tmp/
- name: uninstall myapp
sudo: yes
pip:
virtualenv={{ venv_location }}
name=myapp
state=absent
- name: install myapp
sudo: yes
pip:
virtualenv={{ venv_location }}
name=/tmp/myapp
state=present
There are two problems there:
1. There seems to be no way to always install the latest version, so as it
is now, I have to update the version in at least two places: playbook and
my setup.py
2. I have to uninstall and to install the app (two tasks)
Is there any less fragile way to deliver applications with a deployment
possibility?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8b8f988e-397e-48f8-a2f3-4b215ef67b29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.