Compare commits

..

No commits in common. "b2ea4ad0d392f3a102fac892958670a978cef2bb" and "27e6e693bc22e1f1c27066c353643d5121a58f49" have entirely different histories.

9 changed files with 29 additions and 68 deletions

View File

@ -24,6 +24,6 @@ Ansible configuration repository for my homelab.
`static_ip` host var set to the desired static IP address `static_ip` host var set to the desired static IP address
8. Comment out `ansible_ssh_user` in `group_vars/all/vars.yml`, as this 8. Comment out `ansible_ssh_user` in `group_vars/all/vars.yml`, as this
overwrites the one set in the hosts file overwrites the one set in the hosts file
9. Run `ansible-playbook -i inventory/initial_hosts.ini first_run.yml`. This command will 9. Run `ansible-playbook -i initial-hosts.ini first_run.yml`. This command will
hang at the `restart networking` step; at this point you can Ctrl-C. hang at the `restart networking` step; at this point you can Ctrl-C.

View File

@ -1,4 +1,4 @@
[defaults] [defaults]
vault_password_file = .ansible-password vault_password_file = .ansible-password
inventory = inventory/local.ini inventory = hosts.ini
roles_path = roles roles_path = roles

View File

@ -70,12 +70,12 @@
- restic-rest - restic-rest
tags: restic-rest tags: restic-rest
# - name: Install Lander - name: Install Lander
# hosts: nas hosts: nas
# become: yes become: yes
# roles: roles:
# - lander - lander
# tags: lander tags: lander
- hosts: nas - hosts: nas
become: yes become: yes

View File

@ -1,9 +1,9 @@
# - hosts: web - hosts: web
# become: yes become: yes
# roles: roles:
# - lander-web - lander-web
# tags: lander tags: lander
- hosts: web - hosts: web
become: yes become: yes
@ -83,8 +83,8 @@
- webdav-web - webdav-web
tags: webdav tags: webdav
- hosts: web # - hosts: web
become: yes # become: yes
roles: # roles:
- otter-web # - otter-web
tags: otter # tags: otter

View File

@ -18,7 +18,7 @@
append: true append: true
create_home: yes create_home: yes
shell: /bin/bash shell: /bin/bash
password: "{{ debian_pass | password_hash('sha512') }}" password: "{{ vault_debian_pass | password_hash('sha512') }}"
update_password: on_create update_password: on_create
- name: Create SSH directory. - name: Create SSH directory.

View File

@ -1,13 +1,13 @@
[Unit] [Unit]
Description=Gpodder.net API implementation Description=Gpodder.net API implementation
After=network.target network-online.target After=docker.service
Requires=docker.service
[Service] [Service]
Type=exec Type=exec
User=otter WorkingDirectory=/etc/otter
Group=otter ExecStart=/usr/bin/docker compose up
ExecStart=/usr/local/bin/otter serve -c /etc/otter/otter.toml ExecStop=/usr/bin/docker compose down
Restart=always
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -1,7 +0,0 @@
data_dir = "/mnt/data1/otter/data"
log_level = "debug"
[net]
type = "tcp"
domain = "0.0.0.0"
port = 8017

View File

@ -1,27 +1,4 @@
--- ---
- name: Ensure binary is present
ansible.builtin.get_url:
url: 'https://git.rustybever.be/api/packages/Chewing_Bever/generic/otter/0.2.1/otter-linux-arm64'
dest: '/usr/local/bin/otter'
owner: 'root'
group: 'root'
mode: '755'
- name: Ensure system group exists
ansible.builtin.group:
name: 'otter'
gid: 204
system: true
state: present
- name: Ensure system user exists
ansible.builtin.user:
name: 'otter'
group: 'otter'
uid: 204
system: true
create_home: false
- name: Ensure data directory is present - name: Ensure data directory is present
ansible.builtin.file: ansible.builtin.file:
path: '/mnt/data1/otter' path: '/mnt/data1/otter'
@ -41,8 +18,8 @@
path: "/mnt/data1/otter/{{ item }}" path: "/mnt/data1/otter/{{ item }}"
state: directory state: directory
mode: '0755' mode: '0755'
owner: '204' owner: '82'
group: '204' group: '82'
loop: loop:
- 'data' - 'data'
@ -52,19 +29,10 @@
state: directory state: directory
mode: '0755' mode: '0755'
# - name: Ensure compose file is present - name: Ensure compose file is present
# ansible.builtin.copy:
# src: 'compose.yml'
# dest: '/etc/otter/compose.yml'
# mode: '0644'
# owner: 'root'
# group: 'root'
# notify: 'restart otter'
- name: Ensure config file is present
ansible.builtin.copy: ansible.builtin.copy:
src: 'otter.toml' src: 'compose.yml'
dest: '/etc/otter/otter.toml' dest: '/etc/otter/compose.yml'
mode: '0644' mode: '0644'
owner: 'root' owner: 'root'
group: 'root' group: 'root'