First implementation
This commit is contained in:
16
ansible/roles/donkey/tasks/data.yml
Normal file
16
ansible/roles/donkey/tasks/data.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
|
||||
- name: Make data directory
|
||||
file:
|
||||
path: "{{ donkey_data_dir }}"
|
||||
owner: "{{ donkey_username }}"
|
||||
group: "{{ donkey_groupname }}"
|
||||
state: directory
|
||||
|
||||
- name: Make tmpfs
|
||||
mount:
|
||||
path: "{{ donkey_data_dir }}"
|
||||
src: tmpfs
|
||||
fstype: tmpfs
|
||||
opts: defaults
|
||||
state: mounted
|
62
ansible/roles/donkey/tasks/main.yml
Normal file
62
ansible/roles/donkey/tasks/main.yml
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
|
||||
- include_tasks: data.yml
|
||||
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name:
|
||||
- python3-setuptools-git
|
||||
- virtualenv
|
||||
- libopenjp2-7
|
||||
- libtiff5
|
||||
- libblas3
|
||||
- liblapack3
|
||||
- libatlas3-base
|
||||
- libjpeg-dev
|
||||
- libilmbase12
|
||||
- libopenexr22
|
||||
- libgstreamer1.0-0
|
||||
- libavcodec57
|
||||
- libavformat57
|
||||
- libswscale4
|
||||
- libgtk-3-0
|
||||
- i2c-tools
|
||||
- read-edid
|
||||
- libsdl1.2debian
|
||||
- libjasper1
|
||||
- libqtgui4
|
||||
- libqt4-test
|
||||
- python-h5py
|
||||
state: present
|
||||
|
||||
- name: Fetch git repository
|
||||
become_user: "{{ donkey_username }}"
|
||||
git:
|
||||
repo: "{{ donkey_git_repo }}"
|
||||
dest: "{{ donkey_sources }}"
|
||||
version: "{{ donkey_git_branch }}"
|
||||
ssh_opts: "-o StrictHostKeyChecking=no"
|
||||
|
||||
- name: Install donkey
|
||||
become_user: "{{ donkey_username }}"
|
||||
pip:
|
||||
name: "{{ donkey_sources }}"
|
||||
virtualenv_python: python3
|
||||
virtualenv: "{{ donkey_virtualenv_dir }}"
|
||||
editable: yes
|
||||
|
||||
|
||||
#- name: Install dependencies
|
||||
# become_user: "{{ donkey_username }}"
|
||||
# pip:
|
||||
# requirements: "{{ donkey_sources }}/requirements-pi.txt"
|
||||
# virtualenv: "{{ donkey_virtualenv_dir }}"
|
||||
# virtualenv_python: python3
|
||||
|
||||
- name: Load virtualenv at connection
|
||||
template:
|
||||
src: bash_custom
|
||||
dest: "{{ donkey_home_dir }}/.bash_custom"
|
||||
owner: "{{ donkey_username }}"
|
||||
group: "{{ donkey_groupname }}"
|
||||
mode: 0644
|
Reference in New Issue
Block a user