Start folding

This commit is contained in:
Jake Howard 2020-03-08 15:13:44 +00:00
parent b8e866058f
commit dd956450dc
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,17 @@
version: "3"
services:
folding-at-home:
image: yurinnick/folding-at-home:latest
container_name: folding-at-home
command: --allow 0/0 --web-allow 0/0 --power light --cpu-usage 35
environment:
- USER=TheOrangeOne
- TEAM=223518
- PASSKEY={{ foh_token }}
- ENABLE_GPU=false
- ENABLE_SMP=true
ports:
- 7396:7396
- 36330:36330
restart: unless-stopped

View file

@ -0,0 +1,34 @@
- name: Include foh variables
include_vars: folding-at-home.yml
- name: Create foh directory
file:
path: '/opt/foh'
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
become_user: root
- name: Install foh compose file
template:
src: files/folding-at-home/docker-compose.yml
dest: "/opt/foh/docker-compose.yml"
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: /usr/bin/docker-compose -f %s config
register: compose_file
become: true
become_user: root
- name: Cycle foh container
docker_compose:
project_src: /opt/foh
pull: true
remove_orphans: true
remove_volumes: true
state: "{{ item }}"
when: compose_file.changed
loop:
- absent
- present

View file

@ -60,3 +60,6 @@
- name: Install duplicati
include: duplicati.yml
- name: Install folding-at-home
include: folding-at-home.yml

View file

@ -0,0 +1,8 @@
foh_token: !vault |
$ANSIBLE_VAULT;1.1;AES256
38393937366266353162336339643261613138616135643163393464353339653761623833303334
3136633535616165383561623863346630326264663564360a613733313835646333373464313033
65303338646665346532653232626535363665636132333065343133636332383663393034373863
3437626337666539610a656264653135656566313133383935396233313366633961333637373363
30326130623936383437636465393262633735656563323337666235373834363833396336343866
6362626138313266633032633466386461643737336266623363