Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions roles/jwflory.teleirc/tasks/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@
- name: git clone/pull RITlug/teleirc
git:
repo: "https://github.com/RITlug/teleirc.git"
dest: "/tmp/teleirc"
version: "{{ default_version }}"
dest: "/tmp/teleirc/{{ item.value.cn }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does /tmp/teleirc/ need to be created first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it creates /tmp/teleirc/ if it doesn't exist yet (pretty sure I blew away that directory during testing).

version: "{{ item.value.version }}"
accept_hostkey: yes
force: yes
loop: "{{ bots|dict2items }}"

- name: build teleirc binary
command:
cmd: bash build_binary.sh
chdir: "/tmp/teleirc/"
chdir: "/tmp/teleirc/{{ item.value.cn }}"
loop: "{{ bots|dict2items }}"

- name: push teleirc binary to /usr/local/bin
copy:
remote_src: true
src: "/tmp/teleirc/teleirc"
dest: "/usr/local/bin/teleirc"
src: "/tmp/teleirc/{{ item.value.cn }}/teleirc"
dest: "/usr/local/bin/{{ item.value.cn }}"
mode: 0755
setype: bin_t
seuser: system_u
loop: "{{ bots|dict2items }}"
notify: restart teleirc
2 changes: 1 addition & 1 deletion roles/jwflory.teleirc/templates/teleirc.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=multi-user.target
[Service]
Type=simple
User=teleirc
ExecStart=/usr/local/bin/teleirc -conf /etc/teleirc/env-{{ item.value.cn }}
ExecStart=/usr/local/bin/{{ item.value.cn }} -conf /etc/teleirc/env-{{ item.value.cn }}
Restart=always
RestartSec=60

Expand Down