diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9908de26d..1d918fd4fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: python-version: "3.x" - name: Install test dependencies - run: pip3 install ansible yamllint==1.35.1 ansible-lint==24.2.0 + run: pipx install ansible yamllint==1.35.1 ansible-lint==24.2.0 - name: Ansible-lint run: ansible-lint nas.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91aa1400aa..71986b1367 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ Contributing to Ansible-NAS is easy! Add your functionality, then raise a pull r ## Development Environment * Development of Ansible-NAS is carried out in [JetBrains PyCharm](https://www.jetbrains.com/?from=Ansible-NAS) on Linux - you'll get some nice recommended extensions and task setups if you do the same. -* You'll need a working Python 3 environment, Docker (to run tests) and [pre-commit](https://pre-commit.com) installed - `pip install -r requirements-dev.txt`. +* You'll need a working Python 3 environment, Docker (to run tests) and [pre-commit](https://pre-commit.com) installed - `pipx install -r requirements-dev.txt`. ## General Stuff diff --git a/README.md b/README.md index 2f96fb9b8a..b41804ef95 100644 --- a/README.md +++ b/README.md @@ -296,7 +296,7 @@ Read the [migrating from FreeNAS](https://ansible-nas.io/docs/further-configurat ## Requirements -* Ansible NAS targets the latest Ubuntu LTS release, which is currently Ubuntu Server 22.04 LTS. +* Ansible NAS targets the latest Ubuntu LTS release, which is currently Ubuntu Server 24.04 LTS. * You can run Ansible-NAS on whatever hardware you like, read the docs for more info. I use an HP Microserver. ## Getting Help diff --git a/roles/ansible-nas-docker/tasks/main.yml b/roles/ansible-nas-docker/tasks/main.yml index b772a5a4ab..e2286fe96d 100644 --- a/roles/ansible-nas-docker/tasks/main.yml +++ b/roles/ansible-nas-docker/tasks/main.yml @@ -1,24 +1,22 @@ --- -- name: Install python3-pip +- name: Install pipx ansible.builtin.apt: - name: python3-pip + name: pipx state: present register: result until: result is succeeded - name: Remove docker-py python module - ansible.builtin.pip: + community.general.pipx: name: docker-py state: absent - break_system_packages: true register: result until: result is succeeded - name: Install docker python module - ansible.builtin.pip: + community.general.pipx: name: docker - state: present - break_system_packages: true + state: install_all register: result until: result is succeeded diff --git a/roles/booksonic/molecule/default/prepare.yml b/roles/booksonic/molecule/default/prepare.yml index e876916ac3..b494712f6e 100644 --- a/roles/booksonic/molecule/default/prepare.yml +++ b/roles/booksonic/molecule/default/prepare.yml @@ -3,10 +3,11 @@ hosts: all tasks: - name: Install docker python module - ansible.builtin.pip: - name: - - docker - - urllib3<2 + community.general.pipx: + name: "{{ item }}" + with_items: + - docker + - urllib3<2 - name: Create a dummy booksonic onfig directory ansible.builtin.file: diff --git a/roles/drone-ci/molecule/default/prepare.yml b/roles/drone-ci/molecule/default/prepare.yml index 4b6d0773cd..983980c52d 100644 --- a/roles/drone-ci/molecule/default/prepare.yml +++ b/roles/drone-ci/molecule/default/prepare.yml @@ -3,10 +3,11 @@ hosts: all tasks: - name: Install docker python module - ansible.builtin.pip: - name: - - docker - - urllib3<2 + community.general.pipx: + name: "{{ item }}" + with_items: + - docker + - urllib3<2 - name: Create a dummy gitea config directory ansible.builtin.file: diff --git a/roles/livehelperchat/molecule/default/prepare.yml b/roles/livehelperchat/molecule/default/prepare.yml index 13780bd2fa..10235ada23 100644 --- a/roles/livehelperchat/molecule/default/prepare.yml +++ b/roles/livehelperchat/molecule/default/prepare.yml @@ -3,11 +3,12 @@ hosts: all tasks: - name: Install docker python module - ansible.builtin.pip: - name: - - docker - - urllib3<2 - - molecule-plugins[docker] + community.general.pipx: + name: "{{ item }}" + with_items: + - docker + - urllib3<2 + - molecule-plugins[docker] - name: Install unzip ansible.builtin.apt: name: unzip diff --git a/roles/openldap/molecule/default/prepare.yml b/roles/openldap/molecule/default/prepare.yml index 3d111e2b41..8de043cb15 100644 --- a/roles/openldap/molecule/default/prepare.yml +++ b/roles/openldap/molecule/default/prepare.yml @@ -3,10 +3,11 @@ hosts: all tasks: - name: Install docker python module - ansible.builtin.pip: - name: - - docker - - urllib3<2 + community.general.pipx: + name: "{{ item }}" + with_items: + - docker + - urllib3<2 - name: Update repositories cache and install "gnupg" package ansible.builtin.apt: diff --git a/roles/restic/molecule/default/prepare.yml b/roles/restic/molecule/default/prepare.yml index 9e82dc12a2..44c6dc6fbd 100644 --- a/roles/restic/molecule/default/prepare.yml +++ b/roles/restic/molecule/default/prepare.yml @@ -3,14 +3,15 @@ hosts: localhost tasks: - name: Install jmespath - ansible.builtin.pip: + community.general.pipx: name: jmespath - name: Prepare instance hosts: all tasks: - name: Install docker python module - ansible.builtin.pip: - name: - - docker - - urllib3<2 + community.general.pipx: + name: "{{ item }}" + with_items: + - docker + - urllib3<2 diff --git a/roles/woodpecker-ci/molecule/default/prepare.yml b/roles/woodpecker-ci/molecule/default/prepare.yml index 4b6d0773cd..983980c52d 100644 --- a/roles/woodpecker-ci/molecule/default/prepare.yml +++ b/roles/woodpecker-ci/molecule/default/prepare.yml @@ -3,10 +3,11 @@ hosts: all tasks: - name: Install docker python module - ansible.builtin.pip: - name: - - docker - - urllib3<2 + community.general.pipx: + name: "{{ item }}" + with_items: + - docker + - urllib3<2 - name: Create a dummy gitea config directory ansible.builtin.file: diff --git a/tests/molecule/resources/playbooks/prepare.yml b/tests/molecule/resources/playbooks/prepare.yml index 8f17e535df..dc736cfbdb 100644 --- a/tests/molecule/resources/playbooks/prepare.yml +++ b/tests/molecule/resources/playbooks/prepare.yml @@ -3,8 +3,9 @@ hosts: all tasks: - name: Install docker python module - ansible.builtin.pip: - name: - - docker - - urllib3<2 - - molecule-plugins[docker] + community.general.pipx: + name: "{{ item }}" + with_items: + - docker + - urllib3<2 + - molecule-plugins[docker] diff --git a/website/docs/contributing/development-environment.md b/website/docs/contributing/development-environment.md index 7fb9514755..95abd9276b 100644 --- a/website/docs/contributing/development-environment.md +++ b/website/docs/contributing/development-environment.md @@ -17,7 +17,7 @@ Developing Ansible-NAS features require a few things: ## Setup - Ansible requirements - `ansible-galaxy install -r requirements.yml` -- Python requirements - `pip install -r requirements-dev.txt` +- Python requirements - `pipx install -r requirements-dev.txt` - Node.js requirements - `pushd website && npm install && popd` ## IDE diff --git a/website/docs/getting-started/installation.md b/website/docs/getting-started/installation.md index 8aaab400e1..937da06110 100644 --- a/website/docs/getting-started/installation.md +++ b/website/docs/getting-started/installation.md @@ -8,8 +8,8 @@ Ansible-NAS is an Ansible playbook that sets up applications of your choice on y ## Requirements -- A Linux environment with Ansible installed (in Ansible terms the "control node"). See the official [Installing Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) docs for more info. -- SSH access to an Ubuntu 22.04 server that'll become your Ansible-NAS box. It's recommended to use a fresh Ubuntu Server 22.04 installation. Do not use non-LTS releases. Do not install Docker during the Ubuntu installation. +- A Linux environment with Ansible installed (in Ansible terms the "control node"). See the official [Installing Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) docs for more info. Use `pipx` install method to avoid problems with virtual environments on Ubuntu 24+. +- SSH access to an Ubuntu 24.04 server that'll become your Ansible-NAS box. It's recommended to use a fresh Ubuntu Server 24.04 installation. Do not use non-LTS releases. Do not install Docker during the Ubuntu installation. :::tip