diff --git a/ansible/roles/build_tools/tasks/main.yaml b/ansible/roles/build_tools/tasks/main.yaml index 836501f6a94..d7ef9250235 100644 --- a/ansible/roles/build_tools/tasks/main.yaml +++ b/ansible/roles/build_tools/tasks/main.yaml @@ -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 diff --git a/ansible/roles/cuda/tasks/main.yaml b/ansible/roles/cuda/tasks/main.yaml index e683d90da18..796b105d2f5 100644 --- a/ansible/roles/cuda/tasks/main.yaml +++ b/ansible/roles/cuda/tasks/main.yaml @@ -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 diff --git a/ansible/roles/rmw_implementation/tasks/main.yaml b/ansible/roles/rmw_implementation/tasks/main.yaml index e37b94c3146..e7f23557a0f 100644 --- a/ansible/roles/rmw_implementation/tasks/main.yaml +++ b/ansible/roles/rmw_implementation/tasks/main.yaml @@ -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 diff --git a/ansible/roles/ros2/tasks/main.yaml b/ansible/roles/ros2/tasks/main.yaml index 9ad8bb165f9..beeb4cef6b2 100644 --- a/ansible/roles/ros2/tasks/main.yaml +++ b/ansible/roles/ros2/tasks/main.yaml @@ -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