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

feat(ansible): add envs to local user .bashrc (#4923) #1

Merged
merged 1 commit into from
Aug 7, 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
9 changes: 9 additions & 0 deletions ansible/roles/build_tools/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
create: true
mode: 0644

- name: Add CCACHE_DIR to .bashrc of local user
become: true
ansible.builtin.lineinfile:
dest: /etc/skel/.bashrc
line: export CCACHE_DIR="$HOME/.ccache"
state: present
create: true
mode: 0644

- name: Export CC to ccache
ansible.builtin.lineinfile:
dest: ~/.bashrc
Expand Down
12 changes: 10 additions & 2 deletions ansible/roles/cuda/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,28 @@
when: cuda_install_drivers | bool

- name: Add PATH to .bashrc
become: true
ansible.builtin.lineinfile:
dest: ~/.bashrc
dest: "{{ item }}"
line: export PATH="/usr/local/cuda/bin:$PATH"
state: present
create: true
mode: 0644
loop:
- ~/.bashrc
- /etc/skel/.bashrc

- name: Add LD_LIBRARY_PATH to bashrc
become: true
ansible.builtin.lineinfile:
dest: ~/.bashrc
dest: "{{ item }}"
line: export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
state: present
create: true
mode: 0644
loop:
- ~/.bashrc
- /etc/skel/.bashrc

- name: Create Vulkan directory
become: true
Expand Down
6 changes: 5 additions & 1 deletion ansible/roles/rmw_implementation/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
when: not install_result.changed

- name: Add RMW_IMPLEMENTATION to .bashrc
become: true
ansible.builtin.lineinfile:
dest: ~/.bashrc
dest: "{{ item }}"
line: export RMW_IMPLEMENTATION={{ rmw_implementation }}
state: present
create: true
mode: 0644
loop:
- ~/.bashrc
- /etc/skel/.bashrc
6 changes: 5 additions & 1 deletion ansible/roles/ros2/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@
when: not install_result.changed

- name: Add PATH to .bashrc
become: true
ansible.builtin.lineinfile:
dest: ~/.bashrc
dest: "{{ item }}"
line: source /opt/ros/{{ rosdistro }}/setup.bash
state: present
create: true
mode: 0644
loop:
- ~/.bashrc
- /etc/skel/.bashrc