diff --git a/deno/playbook.yaml b/deno/playbook.yaml index a62ba1d..6d3868b 100644 --- a/deno/playbook.yaml +++ b/deno/playbook.yaml @@ -61,6 +61,15 @@ name: sourcemap executable: pip3 state: present + when: ansible_facts['distribution_major_version'] | int < 22 + + - name: Install pyodbc + apt: + pkg: + - python3-pyodbc + state: present + update_cache: true + when: ansible_facts['distribution_major_version'] | int >= 22 - name: Install requests become: true @@ -68,3 +77,12 @@ name: requests executable: pip3 state: present + when: ansible_facts['distribution_major_version'] | int < 22 + + - name: Install requests + apt: + pkg: + - python3-requests + state: present + update_cache: true + when: ansible_facts['distribution_major_version'] | int >= 22 diff --git a/helper_mssql/playbook.yaml b/helper_mssql/playbook.yaml index ee9a90e..68adc42 100644 --- a/helper_mssql/playbook.yaml +++ b/helper_mssql/playbook.yaml @@ -29,6 +29,15 @@ become_user: codio pip: name: pyodbc + when: ansible_facts['distribution_major_version'] | int < 22 + + - name: Install pyodbc + apt: + pkg: + - python3-pyodbc + state: present + update_cache: true + when: ansible_facts['distribution_major_version'] | int >= 22 - name: Creates directory become_user: codio diff --git a/helper_mysql/playbook.yaml b/helper_mysql/playbook.yaml index 30a59f1..0866c4d 100644 --- a/helper_mysql/playbook.yaml +++ b/helper_mysql/playbook.yaml @@ -25,7 +25,16 @@ - name: Install mysql-connector-python become_user: codio pip: - name: mysql-connector-python==8.2.0 + name: mysql-connector-python==26.7.0 + when: ansible_facts['distribution_major_version'] | int < 22 + + - name: Install mysql-connector-python + apt: + pkg: + - python3-mysql.connector + state: present + update_cache: true + when: ansible_facts['distribution_major_version'] | int >= 22 - name: Creates directory become_user: codio diff --git a/helper_postgres/playbook.yaml b/helper_postgres/playbook.yaml index e5f3702..87dd673 100644 --- a/helper_postgres/playbook.yaml +++ b/helper_postgres/playbook.yaml @@ -33,6 +33,15 @@ become_user: codio pip: name: psycopg2 + when: ansible_facts['distribution_major_version'] | int < 22 + + - name: Install psycopg2 + apt: + pkg: + - python3-psycopg2 + state: present + update_cache: true + when: ansible_facts['distribution_major_version'] | int >= 22 - name: Creates directory become_user: codio diff --git a/package_list.json b/package_list.json index 945fdcc..6cf4faa 100644 --- a/package_list.json +++ b/package_list.json @@ -202,7 +202,7 @@ "name": "R Studio", "description": "R is an open-source programming language and free environment that specializes in statistical computing and graphical representation. (Ubuntu 22.04 required)", "script": "r-studio", - "version": "2023.12.1", + "version": "2026.07.1-147", "category": "IDE" }, "jupyter-codio-extension": { diff --git a/python-lsp/playbook.yaml b/python-lsp/playbook.yaml index cdaf75d..2b6c181 100644 --- a/python-lsp/playbook.yaml +++ b/python-lsp/playbook.yaml @@ -26,8 +26,19 @@ update_cache: true when: ansible_facts['distribution_major_version'] | int >= 22 - name: install python-language-server for ubuntu >= 22 - pip: name=python-language-server version=0.36.2 + apt: + name: python3-pylsp + state: present + update_cache: true when: ansible_facts['distribution_major_version'] | int >= 22 - name: install pycodestyle pip: name=pycodestyle + when: ansible_facts['distribution_major_version'] | int < 22 + + - name: install pycodestyle for ubuntu >= 22 + apt: + name: pycodestyle + state: present + update_cache: true + when: ansible_facts['distribution_major_version'] | int >= 22 diff --git a/python2/playbook.yaml b/python2/playbook.yaml index 1dd1994..9341af8 100644 --- a/python2/playbook.yaml +++ b/python2/playbook.yaml @@ -3,6 +3,11 @@ become: yes become_user: root tasks: + - name: Fail if running on Ubuntu > 22.04 + fail: + msg: "These tasks should only be run on Ubuntu 22.04 or earlier" + when: ansible_distribution != "Ubuntu" or ansible_distribution_version is version('22.04', '>') + - apt: name=python state=present - apt: name=python-dev state=present - apt: name=python-pip state=present diff --git a/r-studio/playbook.yaml b/r-studio/playbook.yaml index e197efa..f966b59 100644 --- a/r-studio/playbook.yaml +++ b/r-studio/playbook.yaml @@ -3,10 +3,10 @@ become: yes become_user: root tasks: - - name: Fail if not running on Ubuntu 22.04 + - name: Fail if running on Ubuntu < 22.04 fail: - msg: "These tasks should only be run on Ubuntu 22.04" - when: ansible_distribution != "Ubuntu" or ansible_distribution_version != "22.04" + msg: "These tasks should only be run on Ubuntu 22.04 or later" + when: ansible_distribution != "Ubuntu" or ansible_distribution_version is version('22.04', '<') - name: Install essential packages ansible.builtin.apt: @@ -14,6 +14,9 @@ - build-essential - software-properties-common - dirmngr + - wget + - ca-certificates + - gnupg update_cache: true - name: Cpan apt key @@ -31,6 +34,41 @@ - name: Add CRAN Packages ansible.builtin.apt_repository: repo: ppa:c2d4u.team/c2d4u4.0+ + when: ansible_distribution == "Ubuntu" and ansible_distribution_version is version('22.04', '==') + + # https://github.com/eddelbuettel/r2u + # https://eddelbuettel.github.io/r2u/ + + - name: Create temporary directory for R2U keys + ansible.builtin.file: + path: /tmp/r2ukeys + state: directory + mode: "0700" + when: ansible_distribution == "Ubuntu" and ansible_distribution_version is version('26.04', '==') + + - name: Download R2U keys into temporary directory + ansible.builtin.shell: | + gpg --homedir /tmp/r2ukeys \ + --keyserver hkps://keyserver.ubuntu.com \ + --recv-keys A1489FE2AB99A21A 67C2D66C4B1D4339 51716619E084DAB9 + when: ansible_distribution == "Ubuntu" and ansible_distribution_version is version('26.04', '==') + + - name: Export R2U keys + ansible.builtin.shell: | + gpg --homedir /tmp/r2ukeys --export | gpg --dearmor -o /usr/share/keyrings/r2u.gpg + when: ansible_distribution == "Ubuntu" and ansible_distribution_version is version('26.04', '==') + + - name: Add R2U repository into sources list + ansible.builtin.copy: + dest: /etc/apt/sources.list.d/r2u.sources + content: | + Types: deb + URIs: https://r2u.stat.illinois.edu/ubuntu + Suites: resolute + Components: main + Arch: amd64, arm64 + Signed-By: /usr/share/keyrings/r2u.gpg + when: ansible_distribution == "Ubuntu" and ansible_distribution_version is version('26.04', '==') - name: Install R Base ansible.builtin.apt: @@ -39,7 +77,7 @@ - name: Install r studio .deb package ansible.builtin.apt: - deb: https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2026.01.0-392-amd64.deb + deb: https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2026.07.1-147-amd64.deb - name: Create systemd Rstudio config ansible.builtin.copy: