diff --git a/ansible/roles/autoware/defaults/main.yaml b/ansible/roles/autoware/defaults/main.yaml
index f4c77b2..37c8d78 100644
--- a/ansible/roles/autoware/defaults/main.yaml
+++ b/ansible/roles/autoware/defaults/main.yaml
@@ -1,2 +1,2 @@
autoware_env_dir: /opt/autoware/env
-ros_domain_id: 1
+autoware_ros_domain_id: 1
diff --git a/ansible/roles/autoware/tasks/main.yaml b/ansible/roles/autoware/tasks/main.yaml
index ecb6e08..285fa2d 100644
--- a/ansible/roles/autoware/tasks/main.yaml
+++ b/ansible/roles/autoware/tasks/main.yaml
@@ -6,7 +6,7 @@
mode: 0644
marker: "# {mark} autoware"
block: |
- export ROS_DOMAIN_ID={{ ros_domain_id }}
+ export ROS_DOMAIN_ID={{ autoware_ros_domain_id }}
become: true
- name: Add sourcing command in user's bashrc
diff --git a/ansible/roles/calibration_tools/defaults/main.yaml b/ansible/roles/calibration_tools/defaults/main.yaml
index 2f9059a..0380524 100644
--- a/ansible/roles/calibration_tools/defaults/main.yaml
+++ b/ansible/roles/calibration_tools/defaults/main.yaml
@@ -1,3 +1,3 @@
-pyside2_url_base: https://github.com/hiroyuki-s1/PySide2InstallForJetson/raw/main/dist
-pyside2_wheel: PySide2-5.9.0a1-5.9.5-cp36-cp36m-linux_aarch64.whl
-pyside2_download_dir: /tmp
+calibration_tools_pyside2_url_base: https://github.com/hiroyuki-s1/PySide2InstallForJetson/raw/main/dist
+calibration_tools_pyside2_wheel: PySide2-5.9.0a1-5.9.5-cp36-cp36m-linux_aarch64.whl
+calibration_tools_pyside2_download_dir: /tmp
diff --git a/ansible/roles/calibration_tools/tasks/main.yaml b/ansible/roles/calibration_tools/tasks/main.yaml
index 4d3a345..b471231 100644
--- a/ansible/roles/calibration_tools/tasks/main.yaml
+++ b/ansible/roles/calibration_tools/tasks/main.yaml
@@ -1,14 +1,14 @@
- name: Fix python interpreter version to 3
- set_fact:
+ ansible.builtin.set_fact:
ansible_python_interpreter: /usr/bin/python3.6
- name: Upgrade pip
- pip:
+ ansible.builtin.pip:
name: pip
state: latest
- name: Install dependencies
- pip:
+ ansible.builtin.pip:
name:
- dt-apriltags
- ruamel.yaml
@@ -16,11 +16,11 @@
- name: Download PySide2 wheel
ansible.builtin.uri:
- url: "{{ pyside2_url_base }}/{{ pyside2_wheel }}"
- dest: "{{ pyside2_download_dir }}/{{ pyside2_wheel }}"
+ url: "{{ calibration_tools_pyside2_url_base }}/{{ calibration_tools_pyside2_wheel }}"
+ dest: "{{ calibration_tools_pyside2_download_dir }}/{{ calibration_tools_pyside2_wheel }}"
mode: 0644
- name: Install PySide2
- pip:
- name: "{{ pyside2_download_dir }}/{{ pyside2_wheel }}"
+ ansible.builtin.pip:
+ name: "{{ calibration_tools_pyside2_download_dir }}/{{ calibration_tools_pyside2_wheel }}"
state: latest
diff --git a/ansible/roles/cyclonedds/defaults/main.yaml b/ansible/roles/cyclonedds/defaults/main.yaml
index 6ab6c0c..39f8a10 100644
--- a/ansible/roles/cyclonedds/defaults/main.yaml
+++ b/ansible/roles/cyclonedds/defaults/main.yaml
@@ -1,6 +1,5 @@
-cyclonedds:
- minimum_socket_receive_buffer_size: 20MB
- ipfrag_time: 3
- ipfrag_high_thresh: 134217728
- rmem_max: 2147483647
- rmem_default: 8388608
+cyclonedds_minimum_socket_receive_buffer_size: 20MB
+cyclonedds_ipfrag_time: 3
+cyclonedds_ipfrag_high_thresh: 134217728
+cyclonedds_rmem_max: 2147483647
+cyclonedds_rmem_default: 8388608
diff --git a/ansible/roles/cyclonedds/tasks/main.yaml b/ansible/roles/cyclonedds/tasks/main.yaml
index c8c00a8..6fef34d 100644
--- a/ansible/roles/cyclonedds/tasks/main.yaml
+++ b/ansible/roles/cyclonedds/tasks/main.yaml
@@ -37,10 +37,10 @@
reload: true
sysctl_file: /etc/sysctl.d/60-cyclonedds.conf
with_dict:
- net.ipv4.ipfrag_time: "{{ cyclonedds.ipfrag_time }}"
- net.ipv4.ipfrag_high_thresh: "{{ cyclonedds.ipfrag_high_thresh }}"
- net.core.rmem_max: "{{ cyclonedds.rmem_max }}"
- net.core.rmem_default: "{{ cyclonedds.rmem_default }}"
+ net.ipv4.ipfrag_time: "{{ cyclonedds_ipfrag_time }}"
+ net.ipv4.ipfrag_high_thresh: "{{ cyclonedds_ipfrag_high_thresh }}"
+ net.core.rmem_max: "{{ cyclonedds_rmem_max }}"
+ net.core.rmem_default: "{{ cyclonedds_rmem_default }}"
become: true
- name: Add settings to autoware.env
diff --git a/ansible/roles/cyclonedds/templates/cyclonedds.xml.jinja2 b/ansible/roles/cyclonedds/templates/cyclonedds.xml.jinja2
index 50398dc..246a84d 100644
--- a/ansible/roles/cyclonedds/templates/cyclonedds.xml.jinja2
+++ b/ansible/roles/cyclonedds/templates/cyclonedds.xml.jinja2
@@ -15,7 +15,7 @@
true
-
+
diff --git a/ansible/roles/enlarge_txqueue/defaults/main.yaml b/ansible/roles/enlarge_txqueue/defaults/main.yaml
index 41196e7..7b12c5e 100644
--- a/ansible/roles/enlarge_txqueue/defaults/main.yaml
+++ b/ansible/roles/enlarge_txqueue/defaults/main.yaml
@@ -1 +1 @@
-txqueue_length: 20000
+enlarge_txqueue_length: 20000
diff --git a/ansible/roles/enlarge_txqueue/templates/99-enlarge-txqueuelen.rules.jinja2 b/ansible/roles/enlarge_txqueue/templates/99-enlarge-txqueuelen.rules.jinja2
index e6703ab..c45a994 100644
--- a/ansible/roles/enlarge_txqueue/templates/99-enlarge-txqueuelen.rules.jinja2
+++ b/ansible/roles/enlarge_txqueue/templates/99-enlarge-txqueuelen.rules.jinja2
@@ -1,5 +1,5 @@
{% for key in network_config %}
{% if 'dhcp' not in key %}
-SUBSYSTEM=="net",ACTION=="add|change",KERNEL=="{{ network_config[key].interface_name }}",ATTR{tx_queue_len}="{{ txqueue_length }}"
+SUBSYSTEM=="net",ACTION=="add|change",KERNEL=="{{ network_config[key].interface_name }}",ATTR{tx_queue_len}="{{ enlarge_txqueue_length }}"
{% endif %}
{% endfor %}
diff --git a/ansible/roles/netplan/tasks/main.yaml b/ansible/roles/netplan/tasks/main.yaml
index 401da90..ed67a3b 100644
--- a/ansible/roles/netplan/tasks/main.yaml
+++ b/ansible/roles/netplan/tasks/main.yaml
@@ -12,5 +12,6 @@
become: true
- name: Netplan apply
- command: netplan apply
+ ansible.builtin.command: netplan apply
become: true
+ changed_when: false
diff --git a/ansible/roles/ptp4l_client/tasks/main.yaml b/ansible/roles/ptp4l_client/tasks/main.yaml
index 510ac86..d161005 100644
--- a/ansible/roles/ptp4l_client/tasks/main.yaml
+++ b/ansible/roles/ptp4l_client/tasks/main.yaml
@@ -9,6 +9,7 @@
ansible.builtin.copy:
src: ptp4l@.service
dest: /etc/systemd/system/
+ mode: 0755
become: true
- name: Install ptp4l client service file
diff --git a/ansible/roles/ros2/tasks/main.yaml b/ansible/roles/ros2/tasks/main.yaml
index 9672e3c..770ce69 100644
--- a/ansible/roles/ros2/tasks/main.yaml
+++ b/ansible/roles/ros2/tasks/main.yaml
@@ -1,8 +1,9 @@
- name: Fix python interpreter version to 3
- set_fact:
+ ansible.builtin.set_fact:
ansible_python_interpreter: /usr/bin/python3.6
- name: Setup dependencies
+ become: true
block:
- name: Apt install
ansible.builtin.apt:
@@ -18,7 +19,8 @@
install_recommends: false
update_cache: true
- name: Add ROS 2 source list
- shell: echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
+ ansible.builtin.shell: set -o pipefail && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
+ changed_when: false
- name: Download gpg key
ansible.builtin.uri:
url: https://raw.githubusercontent.com/ros/rosdistro/master/ros.key
@@ -49,10 +51,9 @@
- libflann-dev
install_recommends: false
update_cache: true
- become: true
-- name: add CUDA into PATH
- set_fact:
+- name: Add CUDA into PATH
+ ansible.builtin.set_fact:
environment:
PATH: /usr/local/cuda/bin:{{ ansible_env.PATH }}
@@ -80,7 +81,7 @@
- name: Prepare for dependencies' source build
block:
- name: Define directory name
- set_fact:
+ ansible.builtin.set_fact:
source_build_dir: "{{ ansible_env.HOME }}/source_builds"
- name: Create directory
ansible.builtin.file:
diff --git a/ansible/roles/tier4_hdr_camera_driver/tasks/main.yaml b/ansible/roles/tier4_hdr_camera_driver/tasks/main.yaml
index 5b77a21..5d4ebb5 100644
--- a/ansible/roles/tier4_hdr_camera_driver/tasks/main.yaml
+++ b/ansible/roles/tier4_hdr_camera_driver/tasks/main.yaml
@@ -63,27 +63,27 @@
- name: Setup C1 configuration
block:
- - name: "{{ block_name }} : Change trigger mode to Fsync mode"
- include_tasks: mod_or_add.yaml
+ - name: Change trigger mode to Fsync mode
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: trigger_mode
target_val: "1"
# Set the same value to min/mid/max exposure time
# so that exposure time can be estimated under any brightness condition
- - name: "{{ block_name }} : Fix exposure time"
+ - name: Fix exposure time
block:
- - name: "{{ block_name }} : Set min exposure"
- include_tasks: mod_or_add.yaml
+ - name: Set min exposure
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: shutter_time_min
target_val: "{{ exposure_time }}"
- - name: "{{ block_name }} : Set mid exposure"
- include_tasks: mod_or_add.yaml
+ - name: Set mid exposure
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: shutter_time_mid
target_val: "{{ exposure_time }}"
- - name: "{{ block_name }} : Set max exposure"
- include_tasks: mod_or_add.yaml
+ - name: Set max exposure
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: shutter_time_max
target_val: "{{ exposure_time }}"
@@ -94,28 +94,28 @@
- name: Setup C2 configuration
block:
- - name: "{{ block_name }} : Change trigger mode to Fsync mode"
- include_tasks: mod_or_add.yaml
+ - name: Change trigger mode to Fsync mode
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: trigger_mode
target_val: "1"
# Set the same value to min/mid/max exposure time
# so that exposure time can be estimated under any brightness condition
- - name: "{{ block_name }} : Fix exposure time"
+ - name: Fix exposure time
block:
- - name: "{{ block_name }} : Set min exposure"
- include_tasks: mod_or_add.yaml
+ - name: Set min exposure
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: shutter_time_min
target_val: "{{ exposure_time }}"
- - name: "{{ block_name }} : Set mid exposure"
- include_tasks: mod_or_add.yaml
+ - name: Set mid exposure
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: shutter_time_mid
target_val: "{{ exposure_time }}"
- - name: "{{ block_name }} : Set max exposure"
- include_tasks: mod_or_add.yaml
+ - name: Set max exposure
+ ansible.builtin.include_tasks: mod_or_add.yaml
vars:
target_item: shutter_time_max
target_val: "{{ exposure_time }}"
diff --git a/ansible/roles/tier4_hdr_camera_driver/tasks/mod_or_add.yaml b/ansible/roles/tier4_hdr_camera_driver/tasks/mod_or_add.yaml
index e6065ba..6efcd5e 100644
--- a/ansible/roles/tier4_hdr_camera_driver/tasks/mod_or_add.yaml
+++ b/ansible/roles/tier4_hdr_camera_driver/tasks/mod_or_add.yaml
@@ -3,7 +3,7 @@
# or add it to the end of line starting with {{ config_prefix }} if it not exist
#
- name: Check item existence
- lineinfile:
+ ansible.builtin.lineinfile:
dest: "{{ target_file }}"
regexp: ^(.*){{ target_item }}={{ target_val }}(.*)$
state: absent
@@ -13,7 +13,7 @@
become: true
- name: Modify
- lineinfile:
+ ansible.builtin.lineinfile:
dest: "{{ target_file }}"
regexp: ^(.*) {{ target_item }}=[a-z0-9]* (.*)$
line: \1 {{ target_item }}={{ target_val }} \2 # Yaml requires escaping backslashes in double quotes but not in single quotes
@@ -22,7 +22,7 @@
become: true
- name: Add
- lineinfile:
+ ansible.builtin.lineinfile:
dest: "{{ target_file }}"
regexp: ^({{ config_prefix }})(.*)$
line: \1\2 {{ target_item }}={{ target_val }}
diff --git a/ansible/roles/vcstool/defaults/main.yaml b/ansible/roles/vcstool/defaults/main.yaml
index 832ca2e..d08393b 100644
--- a/ansible/roles/vcstool/defaults/main.yaml
+++ b/ansible/roles/vcstool/defaults/main.yaml
@@ -1 +1 @@
-script_download_dir: /tmp
+vcstool_script_download_dir: /tmp
diff --git a/ansible/roles/vcstool/tasks/main.yaml b/ansible/roles/vcstool/tasks/main.yaml
index 1ed6660..cda9eea 100644
--- a/ansible/roles/vcstool/tasks/main.yaml
+++ b/ansible/roles/vcstool/tasks/main.yaml
@@ -3,11 +3,11 @@
- name: Download setup script
ansible.builtin.uri:
url: https://packagecloud.io/install/repositories/dirk-thomas/vcstool/script.deb.sh
- dest: "{{ script_download_dir }}"
+ dest: "{{ vcstool_script_download_dir }}"
mode: 0755
register: script_deb_sh
- name: Execute setup script
- ansible.builtin.command: bash {{ script_download_dir }}/script.deb.sh
+ ansible.builtin.command: bash {{ vcstool_script_download_dir }}/script.deb.sh
become: true
# noqa no-changed-when
# TODO: check vcstool existing