diff options
| author | Luke Hoersten <[email protected]> | 2020-07-04 12:47:25 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2020-07-04 12:47:25 -0500 |
| commit | 648958323886bd768dcafc513a8680322291ce9e (patch) | |
| tree | eb2bf21ec36fcb8824744b4b8c7784d6b7661432 /oragono/tasks/main.yaml | |
| parent | 173b1554013ec29dd60b701d4d49e1161fed2523 (diff) | |
Added oragono role.
Diffstat (limited to 'oragono/tasks/main.yaml')
| -rw-r--r-- | oragono/tasks/main.yaml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/oragono/tasks/main.yaml b/oragono/tasks/main.yaml new file mode 100644 index 0000000..f3cca91 --- /dev/null +++ b/oragono/tasks/main.yaml @@ -0,0 +1,66 @@ +--- + +- name: add oragono user + become: yes + user: name="oragono" + +- name: download oragono + become: yes + unarchive: + remote_src: yes + src: "{{oragono_url}}" + dest: "/tmp" + creates: "/tmp/{{oragono_tar_name}}/" + +- name: install oragono + become: yes + copy: + src: "/tmp/{{oragono_tar_name}}/oragono" + dest: "/usr/local/bin/" + remote_src: yes + owner: "root" + group: "root" + mode: "0755" + notify: restart oragono + +- name: create oragono dirs + become: yes + file: + path: "{{item}}/oragono" + owner: "oragono" + group: "oragono" + mode: "0755" + state: "directory" + loop: + - "/etc" + - "/var" + - "/run" + +- name: configure oragono + become: yes + template: + src: "oragono.yaml.j2" + dest: "/etc/oragono/oragono.yaml" + owner: "oragono" + group: "oragono" + mode: "0644" + notify: restart oragono + +- name: copy motd file + become: yes + copy: + src: "{{oragono_motd}}" + dest: "/etc/oragono/oragono.motd" + notify: restart oragono + +- name: install oragono service + become: yes + template: + src: "oragono.service.j2" + dest: "/lib/systemd/system/oragono.service" + mode: "0644" + notify: restart oragono + +- name: ensure oragono is started + become: yes + systemd: service="oragono.service" enabled="yes" state="started" daemon_reload="yes" |
