Skip to content

Commit

Permalink
ci(pre-commit-ansible): autoupdate (#3500)
Browse files Browse the repository at this point in the history
* ci(pre-commit-ansible): autoupdate

Signed-off-by: GitHub <[email protected]>

* apply var-naming[no-role-prefix]

Signed-off-by: Kenji Miyake <[email protected]>

* ignore colcon directories

Signed-off-by: Kenji Miyake <[email protected]>

* fixup

Signed-off-by: Kenji Miyake <[email protected]>

---------

Signed-off-by: GitHub <[email protected]>
Signed-off-by: Kenji Miyake <[email protected]>
Co-authored-by: kenji-miyake <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
  • Loading branch information
3 people authored May 18, 2023
1 parent fb89617 commit 713dfa1
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
exclude_paths:
- src/
- build/
- install/
- log/

skip_list:
- galaxy # We don't publish to Ansible Galaxy.
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config-ansible.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
20 changes: 10 additions & 10 deletions ansible/roles/cuda/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/docker_engine/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/git_lfs/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions ansible/roles/nvidia_docker/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/pacmod/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/rmw_implementation/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/rocker/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/ros2/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 713dfa1

Please sign in to comment.