Initial Commit - Kumonoboru with working Actions
This commit is contained in:
32
kumonoboru.yaml
Normal file
32
kumonoboru.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
- hosts: takahe
|
||||
gather_facts: no
|
||||
become: yes
|
||||
vars:
|
||||
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
|
||||
ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}"
|
||||
|
||||
tasks:
|
||||
- name: Install Restic
|
||||
ansible.builtin.package:
|
||||
name: restic
|
||||
state: latest
|
||||
|
||||
- name: Install kumonoboru
|
||||
ansible.builtin.copy:
|
||||
src: kumonoboru.sh
|
||||
dest: /usr/local/bin/kumonoboru.sh
|
||||
mode: 'a+x'
|
||||
|
||||
- name: Template service and timer to host
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: /etc/systemd/system/{{ item }}
|
||||
with_items:
|
||||
- kumonoboru.service
|
||||
- kumonoboru.timer
|
||||
|
||||
- name: Start kumonoboru timer
|
||||
ansible.builtin.systemd:
|
||||
name: kumonoboru.timer
|
||||
state: started
|
||||
daemon_reload: true
|
||||
Reference in New Issue
Block a user