diff --git a/main.yml b/main.yml index 5bb3537..f52bcf7 100644 --- a/main.yml +++ b/main.yml @@ -4,18 +4,22 @@ # - ssh # - ubuntu # -#- hosts: prusa.lan -# roles: -# - ssh -# - octoprint -# - ubuntu - -- hosts: docker_cluster +- hosts: prusa roles: - ssh - - docker-cluster + - octoprint - ubuntu +#- hosts: docker_cluster +# roles: +# - ssh +# - docker-cluster +# - ubuntu +# +#- hosts: raspberry +# roles: +# - i2c-clock + #- hosts: router.lan # roles: # - router diff --git a/roles/octoprint/files/octoprint.service b/roles/octoprint/files/octoprint.service index b68269a..fc857a9 100644 --- a/roles/octoprint/files/octoprint.service +++ b/roles/octoprint/files/octoprint.service @@ -6,7 +6,7 @@ After=network.target User=octoprint Group=octoprint Restart=always -ExecStart=/home/octoprint/.local/bin/octoprint +ExecStart=/home/octoprint/bin/octoprint Type=simple [Install] diff --git a/roles/octoprint/tasks/install.yml b/roles/octoprint/tasks/install.yml index d6e37f7..6b2a314 100644 --- a/roles/octoprint/tasks/install.yml +++ b/roles/octoprint/tasks/install.yml @@ -5,44 +5,29 @@ apt: update_cache: yes pkg: - - python-pip - - python-dev - - python-setuptools - - python-virtualenv - - python-pillow + - python3-pip + - python3-all-dev + - python3-setuptools + - python3-virtualenv - git - libyaml-dev - build-essential + - acl + - libjpeg8-dev - name: install octoprint software + become: true become_user: octoprint shell: chdir: /home/octoprint cmd: | virtualenv --system-site-packages . source bin/activate - pip install pip --upgrade - pip install octoprint + pip3 install pip --upgrade + pip3 install octoprint args: executable: /bin/bash - - name: enable system wide packages - file: - path: /home/octoprint/lib/python2.7/no-global-site-packages.txt - state: absent - - - name: Create symbolic link for PIL package - file: - src: /usr/lib/python2.7/dist-packages/PIL - dest: /home/octoprint/lib/python2.7/site-packages/PIL - state: link - - - name: Create symbolic link for pillow package - file: - src: /usr/lib/python2.7/dist-packages/Pillow-5.1.0.egg-info - dest: /home/octoprint/lib/python2.7/site-packages/Pillow-5.1.0.egg-info - state: link - - name: install plugins become_user: octoprint pip: @@ -58,6 +43,4 @@ - https://github.com/paukstelis/OctoPrint-Cancelobject/archive/master.zip - https://github.com/Renaud11232/OctoPrint-Resource-Monitor/archive/master.zip - https://github.com/agrif/OctoPrint-InfluxDB/archive/master.zip - - https://github.com/juergenpabel/OctoPrint-Procastinator/archive/master.zip - - https://github.com/ManuelMcLure/OctoPrint-WiFiStatus/archive/master.zip