diff --git a/.ansible-lint b/.ansible-lint index 61bd4a2c58c..5b4ec4a058d 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -2,7 +2,7 @@ exclude_paths: - src/ skip_list: - - meta-no-info # We don't publish to Ansible Galaxy. + - galaxy # We don't publish to Ansible Galaxy. - package-latest # Since this is a development environment, we allow the latest versions. warn_list: [] diff --git a/.pre-commit-config-ansible.yaml b/.pre-commit-config-ansible.yaml index fba8f72df0b..34c4e92b66a 100644 --- a/.pre-commit-config-ansible.yaml +++ b/.pre-commit-config-ansible.yaml @@ -3,3 +3,5 @@ repos: rev: v6.16.0 hooks: - id: ansible-lint + additional_dependencies: + - ansible diff --git a/ansible/playbooks/core.yaml b/ansible/playbooks/core.yaml index 4f63b33bf9e..dd37be36253 100644 --- a/ansible/playbooks/core.yaml +++ b/ansible/playbooks/core.yaml @@ -1,4 +1,5 @@ -- hosts: localhost +- name: Set up source development environments for Autoware Core + hosts: localhost connection: local pre_tasks: - name: Verify OS diff --git a/ansible/playbooks/docker.yaml b/ansible/playbooks/docker.yaml index 538315cd3e8..434d800c106 100644 --- a/ansible/playbooks/docker.yaml +++ b/ansible/playbooks/docker.yaml @@ -1,4 +1,5 @@ -- hosts: localhost +- name: Set up Docker development environments for Autoware + hosts: localhost connection: local vars_prompt: - name: prompt_install_nvidia diff --git a/ansible/playbooks/universe.yaml b/ansible/playbooks/universe.yaml index e062a29308b..43333357743 100644 --- a/ansible/playbooks/universe.yaml +++ b/ansible/playbooks/universe.yaml @@ -1,4 +1,5 @@ -- hosts: localhost +- name: Set up source development environments for Autoware Universe + hosts: localhost connection: local vars_prompt: - name: prompt_install_nvidia diff --git a/ansible/roles/git_lfs/tasks/main.yaml b/ansible/roles/git_lfs/tasks/main.yaml index fa1700913d1..f2f617d5e1d 100644 --- a/ansible/roles/git_lfs/tasks/main.yaml +++ b/ansible/roles/git_lfs/tasks/main.yaml @@ -8,11 +8,12 @@ # ref: https://github.com/ansible/ansible-lint/issues/1780 - name: Check if git lfs is installed # https://github.com/git-lfs/git-lfs/issues/901 - git_config: + community.general.git_config: list_all: true scope: global register: git_global_config - name: Setup Git LFS - command: git lfs install + ansible.builtin.command: git lfs install when: "'filter.lfs.required' not in git_global_config.config_values" + changed_when: true diff --git a/ansible/roles/rmw_implementation/tasks/main.yaml b/ansible/roles/rmw_implementation/tasks/main.yaml index 1c5faea1d70..91ff34cd2d0 100644 --- a/ansible/roles/rmw_implementation/tasks/main.yaml +++ b/ansible/roles/rmw_implementation/tasks/main.yaml @@ -3,7 +3,7 @@ register: dash_case_rmw_implementation changed_when: false -- name: Install ros-{{ rosdistro }}-{{ dash_case_rmw_implementation.stdout }} +- name: Install ros-{{ rosdistro + '-' + dash_case_rmw_implementation.stdout }} become: true ansible.builtin.apt: name: ros-{{ rosdistro }}-{{ dash_case_rmw_implementation.stdout }} diff --git a/ansible/roles/rocker/tasks/main.yaml b/ansible/roles/rocker/tasks/main.yaml index 57f1432710c..5c9144bd3b3 100644 --- a/ansible/roles/rocker/tasks/main.yaml +++ b/ansible/roles/rocker/tasks/main.yaml @@ -4,6 +4,7 @@ ansible.builtin.get_url: url: https://raw.githubusercontent.com/ros/rosdistro/master/ros.key dest: /usr/share/keyrings/ros-archive-keyring.gpg + mode: 644 - name: Save result of 'dpkg --print-architecture' ansible.builtin.command: dpkg --print-architecture diff --git a/ansible/roles/ros2/tasks/main.yaml b/ansible/roles/ros2/tasks/main.yaml index 1e208cf7015..f276f04dcd4 100644 --- a/ansible/roles/ros2/tasks/main.yaml +++ b/ansible/roles/ros2/tasks/main.yaml @@ -13,6 +13,7 @@ ansible.builtin.get_url: url: https://raw.githubusercontent.com/ros/rosdistro/master/ros.key dest: /usr/share/keyrings/ros-archive-keyring.gpg + mode: 644 - name: Save result of 'dpkg --print-architecture' ansible.builtin.command: dpkg --print-architecture @@ -33,7 +34,7 @@ state: present update_cache: true -- name: Install ros-{{ rosdistro }}-{{ installation_type }} +- name: Install ros-{{ rosdistro + '-' + installation_type }} become: true ansible.builtin.apt: name: ros-{{ rosdistro }}-{{ installation_type }}