diff --git a/menu/dependency/dependencydeb.yml b/menu/dependency/dependencydeb.yml index 53a5e788..23752716 100644 --- a/menu/dependency/dependencydeb.yml +++ b/menu/dependency/dependencydeb.yml @@ -47,7 +47,6 @@ - { package: 'acl' } - { package: 'bc' } - { package: 'python-docker' } - - { package: 'gnupg2' } - name: Update pip packages for python3 pip: diff --git a/menu/functions/install.sh b/menu/functions/install.sh index 0d261d45..802ba24e 100644 --- a/menu/functions/install.sh +++ b/menu/functions/install.sh @@ -423,36 +423,27 @@ pgui() { # } dockerinstall() { - ospgversion=$(cat /var/plexguide/os.version) - if [ "$ospgversion" == "debian" ]; then +osname=$(lsb_release -si) + if [ $osname == "Debian" 2>&1 >> /dev/null ]; then ansible-playbook /opt/plexguide/menu/pg.yml --tags dockerdeb - else + elif [ $osname == "Ubuntu" 2>&1 >> /dev/null ]; then ansible-playbook /opt/plexguide/menu/pg.yml --tags docker - # If Docker FAILED, Emergency Install - file="/usr/bin/docker" - if [ ! -e "$file" ]; then - clear - echo "Installing Docker the Old School Way - (Please Be Patient)" - sleep 2 - clear - curl -fsSL get.docker.com -o get-docker.sh - sh get-docker.sh - echo "" - echo "Starting Docker (Please Be Patient)" - sleep 2 - systemctl start docker - sleep 2 - fi +elif [ $osname == "Rasbian" || "Fedora" || "CentOS" ]; then - ##### Checking Again, if fails again; warns user - file="/usr/bin/docker" - if [ -e "$file" ]; then - sleep 5 - else - echo "INFO - FAILED: Docker Failed to Install! Exiting PGBlitz!" - exit - fi - fi +tee <<-EOF +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +⛔ Argggggg ...... System Warning! +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Supported: UBUNTU 16.xx - 18.10 ~ LTS/SERVER and Debian 9.* / 10 + +This server may not be supported due to having the incorrect OS detected! + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +EOF + sleep 10 +fi } serverid() { diff --git a/menu/roles/dockerdeb/tasks/main.yml b/menu/roles/dockerdeb/tasks/main.yml index dccc131f..2e1d253f 100644 --- a/menu/roles/dockerdeb/tasks/main.yml +++ b/menu/roles/dockerdeb/tasks/main.yml @@ -28,9 +28,11 @@ - name: Install required packages apt: 'name={{item}} state=present' with_items: - - apt-transport-https - - ca-certificates - - software-properties-common + - { package: 'apt-transport-https' } + - { package: 'ca-certificates' } + - { package: 'gnupg2' } + - { package: 'software-properties-common' } + - { package: 'curl' } when: switch == "on" - name: Add official gpg signing key @@ -48,7 +50,7 @@ - name: Official Repo apt_repository: - repo: 'deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} edge' + repo: 'deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable' register: apt_docker_repositories when: switch == "on" @@ -57,25 +59,33 @@ update_cache: yes when: apt_docker_repositories.changed and switch == "on" -- name: Release docker-ce from hold - dpkg_selections: - name: docker-ce - selection: install - when: switch == "on" - -- name: Install docker-ce - apt: - name: docker-ce - state: present - update_cache: yes - when: switch == "on" - -- name: Put docker-ce into hold - dpkg_selections: - name: docker-ce - selection: hold +# - name: Release docker-ce from hold + # dpkg_selections: + # name: docker-ce + # selection: install + # when: switch == "on" + +# - name: Install docker-ce + # apt: + # name: docker-ce + # state: present + # update_cache: yes + # when: switch == "on" + +# - name: Put docker-ce into hold + # dpkg_selections: + # name: docker-ce + # selection: hold + # when: switch == "on" + +- name: Install Docker Parts + apt: 'name={{item}} state=present' + with_items: + - { package: 'docker-ce' } + - { package: 'docker-ce-cli' } + - { package: 'containerd.io' } when: switch == "on" - + - name: Uninstall docker-py pip module pip: name: docker-py