68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
---
|
|
- name: "Creates /opt/wannat/toroad directory"
|
|
file:
|
|
path: /opt/wannat/toroad
|
|
state: directory
|
|
|
|
- name: "Creates /var/log/toroad directory"
|
|
file:
|
|
path: /var/log/toroad
|
|
state: directory
|
|
|
|
- name: "copy toroad_rpm_file to destination server"
|
|
synchronize:
|
|
src: "{{ role_path }}/files/rpm/{{ wannat_global.rpm_files.toroad_rpm_file }}"
|
|
dest: "/tmp/"
|
|
|
|
- name: "Creates /opt/wannat/toroad/etc directory"
|
|
file:
|
|
path: /opt/wannat/toroad/etc
|
|
state: directory
|
|
|
|
- name: "install toroad"
|
|
yum:
|
|
name: "{{ packages }}"
|
|
state: present
|
|
vars:
|
|
packages:
|
|
- /tmp/{{ wannat_global.rpm_files.toroad_rpm_file }}
|
|
|
|
- name: "Template the toroad.conf"
|
|
template:
|
|
src: "{{ role_path }}/templates/toroad.conf.j2"
|
|
dest: /opt/tsg/wannat/toroad/etc/toroad.conf
|
|
tags: template
|
|
|
|
- name: Template the toroad_tmpfile.conf
|
|
template:
|
|
src: "{{ role_path }}/templates/toroad_tmpfile.conf.j2"
|
|
dest: /usr/lib/tmpfiles.d/toroad_tmpfile.conf
|
|
tags: template
|
|
|
|
- name: Template the toroad_log.conf
|
|
template:
|
|
src: "{{ role_path }}/templates/toroad_log.conf.j2"
|
|
dest: /opt/tsg/wannat/toroad/etc/toroad_log.conf
|
|
tags: template
|
|
|
|
|
|
- name: "Template the toroad.service"
|
|
template:
|
|
src: "{{ role_path }}/templates/toroad.service.j2"
|
|
dest: /usr/lib/systemd/system/toroad.service
|
|
tags: template
|
|
|
|
- name: create symbolic link /opt/tsg/wannat/toroad/log -> /var/log/toroad
|
|
file:
|
|
src: /var/log/toroad
|
|
dest: /opt/tsg/wannat/toroad/log
|
|
state: link
|
|
force: yes
|
|
|
|
- name: "enable toroad service"
|
|
systemd:
|
|
name: toroad
|
|
enabled: yes
|
|
daemon_reload: yes
|
|
state: started
|