diff --git a/.ansible-lint b/.ansible-lint index 5b4ec4a058d..a1083e74c61 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,5 +1,8 @@ exclude_paths: - src/ + - build/ + - install/ + - log/ skip_list: - galaxy # We don't publish to Ansible Galaxy. diff --git a/.pre-commit-config-ansible.yaml b/.pre-commit-config-ansible.yaml index 34c4e92b66a..cfad1ff9d68 100644 --- a/.pre-commit-config-ansible.yaml +++ b/.pre-commit-config-ansible.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/ansible/ansible-lint.git - rev: v6.16.0 + rev: v6.16.1 hooks: - id: ansible-lint additional_dependencies: diff --git a/ansible/roles/cuda/tasks/main.yaml b/ansible/roles/cuda/tasks/main.yaml index 8060d455c9d..30e19d41d00 100644 --- a/ansible/roles/cuda/tasks/main.yaml +++ b/ansible/roles/cuda/tasks/main.yaml @@ -38,22 +38,22 @@ - name: Get dash-case name of cuda_version ansible.builtin.shell: bash -c 'sed -e "s/\./-/g" <<< $(echo {{ cuda_version }})' - register: dash_case_cuda_version + register: cuda__dash_case_cuda_version changed_when: false - name: Install CUDA libraries except for cuda-drivers become: true ansible.builtin.apt: name: - - cuda-cudart-dev-{{ dash_case_cuda_version.stdout }} - - cuda-command-line-tools-{{ dash_case_cuda_version.stdout }} - - cuda-minimal-build-{{ dash_case_cuda_version.stdout }} - - cuda-libraries-dev-{{ dash_case_cuda_version.stdout }} - - cuda-nvml-dev-{{ dash_case_cuda_version.stdout }} - - cuda-nvprof-{{ dash_case_cuda_version.stdout }} - - libnpp-dev-{{ dash_case_cuda_version.stdout }} - - libcusparse-dev-{{ dash_case_cuda_version.stdout }} - - libcublas-dev-{{ dash_case_cuda_version.stdout }} + - cuda-cudart-dev-{{ cuda__dash_case_cuda_version.stdout }} + - cuda-command-line-tools-{{ cuda__dash_case_cuda_version.stdout }} + - cuda-minimal-build-{{ cuda__dash_case_cuda_version.stdout }} + - cuda-libraries-dev-{{ cuda__dash_case_cuda_version.stdout }} + - cuda-nvml-dev-{{ cuda__dash_case_cuda_version.stdout }} + - cuda-nvprof-{{ cuda__dash_case_cuda_version.stdout }} + - libnpp-dev-{{ cuda__dash_case_cuda_version.stdout }} + - libcusparse-dev-{{ cuda__dash_case_cuda_version.stdout }} + - libcublas-dev-{{ cuda__dash_case_cuda_version.stdout }} - libnccl-dev update_cache: true diff --git a/ansible/roles/docker_engine/tasks/main.yaml b/ansible/roles/docker_engine/tasks/main.yaml index fffd86c3e3e..6fe822fa575 100644 --- a/ansible/roles/docker_engine/tasks/main.yaml +++ b/ansible/roles/docker_engine/tasks/main.yaml @@ -37,24 +37,24 @@ - name: Save result of 'dpkg --print-architecture' ansible.builtin.command: dpkg --print-architecture - register: deb_architecture + register: docker_engine__deb_architecture changed_when: false - name: Save result of 'lsb_release -cs' ansible.builtin.command: lsb_release -cs - register: lsb_release_cs + register: docker_engine__lsb_release_cs changed_when: false - name: Save result of 'lsb_release -is' ansible.builtin.command: lsb_release -is - register: lsb_release_is + register: docker_engine__lsb_release_is changed_when: false # echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - name: Add Docker apt repository to source list become: true ansible.builtin.apt_repository: - repo: deb [arch={{ deb_architecture.stdout }} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/{{ lsb_release_is.stdout | lower }} {{ lsb_release_cs.stdout }} stable + repo: deb [arch={{ docker_engine__deb_architecture.stdout }} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/{{ docker_engine__lsb_release_is.stdout | lower }} {{ docker_engine__lsb_release_cs.stdout }} stable filename: docker state: present update_cache: true diff --git a/ansible/roles/git_lfs/tasks/main.yaml b/ansible/roles/git_lfs/tasks/main.yaml index f2f617d5e1d..b416dc3237d 100644 --- a/ansible/roles/git_lfs/tasks/main.yaml +++ b/ansible/roles/git_lfs/tasks/main.yaml @@ -11,9 +11,9 @@ community.general.git_config: list_all: true scope: global - register: git_global_config + register: git_lfs__git_global_config - name: Setup Git LFS ansible.builtin.command: git lfs install - when: "'filter.lfs.required' not in git_global_config.config_values" + when: "'filter.lfs.required' not in git_lfs__git_global_config.config_values" changed_when: true diff --git a/ansible/roles/nvidia_docker/tasks/main.yaml b/ansible/roles/nvidia_docker/tasks/main.yaml index 7193324b356..215354fbffe 100644 --- a/ansible/roles/nvidia_docker/tasks/main.yaml +++ b/ansible/roles/nvidia_docker/tasks/main.yaml @@ -5,12 +5,12 @@ - name: Save result of '. /etc/os-release;echo $ID$VERSION_ID' ansible.builtin.shell: . /etc/os-release;echo $ID$VERSION_ID - register: distribution + register: nvidia_docker__distribution changed_when: false - name: Save result of 'curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list' ansible.builtin.uri: - url: https://nvidia.github.io/nvidia-docker/{{ distribution.stdout }}/nvidia-docker.list + url: https://nvidia.github.io/nvidia-docker/{{ nvidia_docker__distribution.stdout }}/nvidia-docker.list return_content: true register: nvidia_docker_list diff --git a/ansible/roles/pacmod/tasks/main.yaml b/ansible/roles/pacmod/tasks/main.yaml index d7d96c549b5..ed96c249ef4 100644 --- a/ansible/roles/pacmod/tasks/main.yaml +++ b/ansible/roles/pacmod/tasks/main.yaml @@ -6,14 +6,14 @@ - name: Save result of 'lsb_release -sc' ansible.builtin.command: lsb_release -sc - register: lsb_release + register: pacmod__lsb_release changed_when: false # echo "deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/autonomoustuff-public.list - name: Add AutonomouStuff apt repository to source list become: true ansible.builtin.apt_repository: - repo: deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ {{ lsb_release.stdout }} main + repo: deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ {{ pacmod__lsb_release.stdout }} main filename: autonomoustuff-public state: present update_cache: true diff --git a/ansible/roles/rmw_implementation/tasks/main.yaml b/ansible/roles/rmw_implementation/tasks/main.yaml index 91ff34cd2d0..bdbb7fa8a01 100644 --- a/ansible/roles/rmw_implementation/tasks/main.yaml +++ b/ansible/roles/rmw_implementation/tasks/main.yaml @@ -1,12 +1,12 @@ - name: Get dash-case name of rmw_implementation ansible.builtin.shell: bash -c 'sed -e "s/_/-/g" <<< $(echo {{ rmw_implementation }})' - register: dash_case_rmw_implementation + register: rmw_implementation__dash_case_rmw_implementation changed_when: false -- name: Install ros-{{ rosdistro + '-' + dash_case_rmw_implementation.stdout }} +- name: Install ros-{{ rosdistro + '-' + rmw_implementation__dash_case_rmw_implementation.stdout }} become: true ansible.builtin.apt: - name: ros-{{ rosdistro }}-{{ dash_case_rmw_implementation.stdout }} + name: ros-{{ rosdistro }}-{{ rmw_implementation__dash_case_rmw_implementation.stdout }} state: latest update_cache: true diff --git a/ansible/roles/rocker/tasks/main.yaml b/ansible/roles/rocker/tasks/main.yaml index 5c9144bd3b3..885d2895342 100644 --- a/ansible/roles/rocker/tasks/main.yaml +++ b/ansible/roles/rocker/tasks/main.yaml @@ -8,19 +8,19 @@ - name: Save result of 'dpkg --print-architecture' ansible.builtin.command: dpkg --print-architecture - register: deb_architecture + register: rocker__deb_architecture changed_when: false - name: Save result of 'lsb_release -cs' ansible.builtin.command: lsb_release -cs - register: lsb_release_cs + register: rocker__lsb_release_cs changed_when: false # echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null - name: Add ROS 2 apt repository to source list become: true ansible.builtin.apt_repository: - repo: deb [arch={{ deb_architecture.stdout }} signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu {{ lsb_release_cs.stdout }} main + repo: deb [arch={{ rocker__deb_architecture.stdout }} signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu {{ rocker__lsb_release_cs.stdout }} main filename: ros2 state: present update_cache: true diff --git a/ansible/roles/ros2/tasks/main.yaml b/ansible/roles/ros2/tasks/main.yaml index f276f04dcd4..679f5dc4c90 100644 --- a/ansible/roles/ros2/tasks/main.yaml +++ b/ansible/roles/ros2/tasks/main.yaml @@ -17,19 +17,19 @@ - name: Save result of 'dpkg --print-architecture' ansible.builtin.command: dpkg --print-architecture - register: deb_architecture + register: ros2__deb_architecture changed_when: false - name: Save result of 'source /etc/os-release && echo $UBUNTU_CODENAME' ansible.builtin.shell: bash -c 'source /etc/os-release && echo $UBUNTU_CODENAME' - register: ubuntu_codename + register: ros2__ubuntu_codename changed_when: false # echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null - name: Add ROS 2 apt repository to source list become: true ansible.builtin.apt_repository: - repo: deb [arch={{ deb_architecture.stdout }} signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu {{ ubuntu_codename.stdout }} main + repo: deb [arch={{ ros2__deb_architecture.stdout }} signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu {{ ros2__ubuntu_codename.stdout }} main filename: ros2 state: present update_cache: true