Commit ae1b435d authored by Kristopher Ruzic's avatar Kristopher Ruzic

Fixes former issues in test-suite playbook

also adds a bit to log-uploader. Currently can correctly request erp5-standalon
parent 71545053
......@@ -23,8 +23,8 @@ def fmt_date():
return time.strftime("[ %Y%m%d %H:%M:%S ]")
class uploader():
system_name = ""
url = 'LATER'
system_name = "first-machine" # possibly generate later?
url = 'https://[2001:67c:1254:e:a9::bafb]:???/post'
# takes a file handler and a name (where it should be saved on server)
def upload_file(file_name, contents):
......
---
- stat: path=/tmp/playbook_software_name
register: software_release
- name: download software_release name
get_url: url=https://lab.nexedi.cn/krruzic/test-repository/raw/master/software
dest=software_release
dest=/tmp/playbook_software_name
- name: create log-uploader
copy: src=log-uploader dest=/usr/local/bin/log-uploader mode=755
- name: add log_uploader to cron
cron: name="Ensure log_uploader is running"
- name: add log-uploader to cron
cron: name="Ensure log-uploader is running"
minute="*/6"
job="usr/local/bin/log_uploader"
job="usr/local/bin/log-uploader"
- name: run ansible playbook
shell: ansible-playbook "{{ lookup('file', {{ software_release }}) }}" -i hosts
shell: ansible-playbook "{{ lookup('file', '/tmp/playbook_software_name') }}" -i hosts
# install dependencies
- easy_install: name=watchdog state=latest
- easy_install: name=pip state=latest
- easy_install: name=pip
- pip: name=requests
- pip: name=watchdog
---
- name: a play that runs entirely on the ansible host
hosts: 127.0.0.1
connection: local
roles:
- test-suite
- standalone-shared
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment