Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the requirements.txt in caret is installed with user privileges. #206

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/roles/caret/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
- name: ROS2 (check rosdep file)

Check warning on line 1 in ansible/roles/caret/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
stat:
path: /etc/ros/rosdep/sources.list.d/20-default.list
register: ros_repository

- name: ROS2 (install rosdep)

Check warning on line 6 in ansible/roles/caret/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
apt:
name: python3-rosdep
state: latest
update_cache: true
become: true

- name: ROS2 (initialize rosdep)

Check warning on line 13 in ansible/roles/caret/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
command: rosdep init
when: ros_repository.stat.exists == false
become: true

- name: ROS2 (update rosdep)

Check warning on line 18 in ansible/roles/caret/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
command: rosdep update
become: false

Expand All @@ -39,7 +39,7 @@
pip:
requirements: "{{ requirements_path }}"
executable: pip3
become: true
become: false
args:
chdir: "{{ WORKSPACE_ROOT }}"

Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/caret_iron/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
- name: ROS2 (check rosdep file)

Check warning on line 1 in ansible/roles/caret_iron/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
stat:
path: /etc/ros/rosdep/sources.list.d/20-default.list
register: ros_repository

- name: ROS2 (install rosdep)

Check warning on line 6 in ansible/roles/caret_iron/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
apt:
name: python3-rosdep
state: latest
update_cache: true
become: true

- name: ROS2 (initialize rosdep)

Check warning on line 13 in ansible/roles/caret_iron/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
command: rosdep init
when: ros_repository.stat.exists == false
become: true

- name: ROS2 (update rosdep)

Check warning on line 18 in ansible/roles/caret_iron/tasks/main.yml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
command: rosdep update
become: false

Expand All @@ -39,7 +39,7 @@
pip:
requirements: "{{ requirements_path }}"
executable: pip3
become: true
become: false
args:
chdir: "{{ WORKSPACE_ROOT }}"

Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/ros-tracing/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pip:
requirements: "{{ requirements_path }}"
executable: pip3
become: true
become: false
args:
chdir: "{{ WORKSPACE_ROOT }}"

Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/visualizer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
requirements: "{{ requirements_path }}"
executable: pip3
extra_args: --ignore-installed
become: true
become: false
args:
chdir: "{{ WORKSPACE_ROOT }}"
7 changes: 6 additions & 1 deletion setup_caret.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ fi
# Run ansible
if ansible-playbook "$SCRIPT_DIR/ansible/$PLAYBOOK" -e WORKSPACE_ROOT="$SCRIPT_DIR" "${options[@]}"; then
echo -e "\e[32mCompleted.\e[0m"
exit 0
else
echo -e "\e[31mFailed.\e[0m"
exit 1
fi

# Add PATH
grep -Fxq "export PATH=\$PATH:$HOME/.local/bin" "$HOME/.bashrc" || {
echo "export PATH=\$PATH:$HOME/.local/bin" >>"$HOME/.bashrc"
}
exit 0
Loading