diff options
Diffstat (limited to 'roles/install_respondd_poller/tasks/main.yml')
-rw-r--r-- | roles/install_respondd_poller/tasks/main.yml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/roles/install_respondd_poller/tasks/main.yml b/roles/install_respondd_poller/tasks/main.yml new file mode 100644 index 0000000..aa03558 --- /dev/null +++ b/roles/install_respondd_poller/tasks/main.yml @@ -0,0 +1,48 @@ +--- +- name: install respondd_poller dependencies + pacman: + name: + - git + - python-virtualenv + - python-setuptools + state: present + +- name: create venv + command: + cmd: "python -m venv /opt/respondd_poller/venv" + creates: /opt/respondd_poller/venv + +- name: install respondd_poller requirements + copy: + src: requirements.txt + dest: /opt/respondd_poller/requirements.txt + mode: 0644 + +- name: install respondd_poller script + copy: + src: respondd_poller.py + dest: /opt/respondd_poller/respondd_poller.py + mode: 0644 + +- name: install requirements + pip: + requirements: /opt/respondd_poller/requirements.txt + virtualenv: /opt/respondd_poller/venv + +- name: install respondd_poller config + template: + src: respondd_poller.json.j2 + dest: /etc/respondd_poller.json + mode: 0644 + +- name: create respondd_poller service + copy: + src: respondd_poller.service + dest: /etc/systemd/system/respondd_poller.service + mode: 0644 + +- name: start and enable respondd_poller service + systemd: + name: respondd_poller + state: started + enabled: yes |