Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
Signed-off-by: wep21 <[email protected]>
  • Loading branch information
wep21 committed Nov 28, 2023
1 parent b1c8150 commit 43355dd
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 56 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/autoware/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
autoware_env_dir: /opt/autoware/env
ros_domain_id: 1
autoware_ros_domain_id: 1
2 changes: 1 addition & 1 deletion ansible/roles/autoware/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/calibration_tools/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 7 additions & 7 deletions ansible/roles/calibration_tools/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
- 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
state: latest

- 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
11 changes: 5 additions & 6 deletions ansible/roles/cyclonedds/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions ansible/roles/cyclonedds/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/cyclonedds/templates/cyclonedds.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<DontRoute>true</DontRoute>
</General>
<Internal>
<SocketReceiveBufferSize min="{{ cyclonedds.minimum_socket_receive_buffer_size }}" />
<SocketReceiveBufferSize min="{{ cyclonedds_minimum_socket_receive_buffer_size }}" />
</Internal>
</Domain>
</CycloneDDS>
2 changes: 1 addition & 1 deletion ansible/roles/enlarge_txqueue/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
txqueue_length: 20000
enlarge_txqueue_length: 20000
Original file line number Diff line number Diff line change
@@ -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 %}
3 changes: 2 additions & 1 deletion ansible/roles/netplan/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
become: true

- name: Netplan apply
command: netplan apply
ansible.builtin.command: netplan apply
become: true
changed_when: false
1 change: 1 addition & 0 deletions ansible/roles/ptp4l_client/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ansible.builtin.copy:
src: [email protected]
dest: /etc/systemd/system/
mode: 0755
become: true

- name: Install ptp4l client service file
Expand Down
13 changes: 7 additions & 6 deletions ansible/roles/ros2/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:

Check failure on line 57 in ansible/roles/ros2/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

var-naming[no-reserved]

Variables names must not be Ansible reserved names. (environment) (set_fact: environment)
PATH: /usr/local/cuda/bin:{{ ansible_env.PATH }}

Expand Down Expand Up @@ -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

Check failure on line 86 in ansible/roles/ros2/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
ansible.builtin.file:
Expand Down
36 changes: 18 additions & 18 deletions ansible/roles/tier4_hdr_camera_driver/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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 }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/tier4_hdr_camera_driver/tasks/mod_or_add.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/vcstool/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
script_download_dir: /tmp
vcstool_script_download_dir: /tmp
4 changes: 2 additions & 2 deletions ansible/roles/vcstool/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43355dd

Please sign in to comment.