From 8c20a54ff587a62283dd815f1546ea0818496b1d Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Fri, 21 Sep 2018 22:32:15 -0700 Subject: [PATCH] Adding support for installing on ubuntu 18 (#8) Updating the defaults variable to the latest released version of Jackett --- README.md | 4 ++-- Vagrantfile | 5 +++-- defaults/main.yml | 2 +- playbook.yml | 4 ++++ tasks/main.yml | 9 ++++++++- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3e17a1f..7fab1c7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Jackett ========= -This is an ansible role to install [**Jackett**][1] on Ubuntu 16.04 +This is an ansible role to install [**Jackett**][1] on Ubuntu 16.04 or 18.04 Requirements ------------ @@ -42,7 +42,7 @@ MIT Contributing ------- -I use [vagrant][2] to test my changes on my local, in order to do this effectivly I need to create a symbolic link so ansible knows how to find the role under `./roles/chrisjohnson00.jacket`, on my local I do something like `ln -s ~/IdeaProjects/ansible-role-jackett ~/IdeaProjects/ansible-role-jackett/roles/chrisjohnson00.jackett`. If you do choose to contribute, thank you, please ensure the tests pass before submitting a PR. +I use [vagrant][2] to test my changes on my local, in order to do this effectively I need to create a symbolic link so ansible knows how to find the role under `./roles/chrisjohnson00.jacket`, on my local I do something like `ln -s ~/IdeaProjects/ansible-role-jackett ~/IdeaProjects/ansible-role-jackett/roles/chrisjohnson00.jackett`. If you do choose to contribute, thank you, please ensure the tests pass before submitting a PR. [1]: https://github.com/Jackett/Jackett [2]: http://www.vagrantup.com \ No newline at end of file diff --git a/Vagrantfile b/Vagrantfile index 804cb13..dd939eb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,7 +6,8 @@ # backwards compatibility). Please don't change it unless you know what # you're doing. Vagrant.configure("2") do |config| - config.vm.box = "bento/ubuntu-16.04" + #config.vm.box = "bento/ubuntu-16.04" + config.vm.box = "ubuntu/bionic64" #jacket config.vm.network "forwarded_port", guest: 9117, host: 9117 @@ -25,7 +26,7 @@ Vagrant.configure("2") do |config| config.vm.provision "ansible" do |ansible| ansible.playbook = "playbook.yml" ansible.sudo = true - ansible.verbose = true #set this to true if you want to see all the output + ansible.verbose = false #set this to true if you want to see all the output ansible.limit = "all" end diff --git a/defaults/main.yml b/defaults/main.yml index 4ef9b91..14a4d16 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,7 @@ # defaults file for chrisjohnson00.jacket chrisjohnson00_jackett_packages: ["mono-devel","libcurl4-openssl-dev","ca-certificates-mono"] -chrisjohnson00_jackett_version: "v0.9.41" # found on https://github.com/Jackett/Jackett/releases +chrisjohnson00_jackett_version: "v0.10.198" # found on https://github.com/Jackett/Jackett/releases # jackett.service.ini values chrisjohnson00_jackett_no_update: "true" # since we want to manage the version upgrades/etc as part of the playbook, we disable auto updates chrisjohnson00_jackett_user: "jackett" diff --git a/playbook.yml b/playbook.yml index 918023e..3eff0c6 100644 --- a/playbook.yml +++ b/playbook.yml @@ -4,5 +4,9 @@ - name: with yourself hosts: all + gather_facts: False + pre_tasks: + - raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) + - setup: # aka gather_fact roles: - { role: chrisjohnson00.jackett, tags: ["jackett"]} \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index aace012..59b201e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,10 +24,17 @@ keyserver: hkp://keyserver.ubuntu.com:80 id: 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF -- name: "adding repo for mono5" +- name: "adding repo for mono5 for ubuntu 16" apt_repository: repo: deb http://download.mono-project.com/repo/ubuntu xenial main state: present + when: ansible_distribution_major_version == "16" + +- name: "adding repo for mono5 for ubuntu 18" + apt_repository: + repo: deb http://download.mono-project.com/repo/ubuntu stable-bionic main + state: present + when: ansible_distribution_major_version == "18" - name: Only run apt-get update if the last one is more than 3600 seconds ago apt: