-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-ros.yml
executable file
·89 lines (79 loc) · 2.21 KB
/
install-ros.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
- hosts: all
become: true
remote_user: vagrant
any_errors_fatal: true
vars:
distro: melodic
package: desktop
shell: zsh
tasks:
- name: Install gantsign.oh-my-zsh role
shell:
cmd: ansible-galaxy install gantsign.oh-my-zsh
become: false
- name: Install oh-my-zsh
include_role:
name: gantsign.oh-my-zsh
vars:
users:
- username: vagrant
oh_my_zsh:
theme: agnoster
plugins:
- git
- name: Add user to group vboxsf
user:
name: '{{ ansible_user }}'
groups: vboxsf
append: yes
- name: Add ROS apt key
apt_key:
id: C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
state: present
- name: Add ROS repo
apt_repository:
repo: "deb http://packages.ros.org/ros/ubuntu {{ ansible_distribution_release }} main"
mode: "0644"
- name: Install packages
apt:
update_cache: true
state: latest
pkg:
- 'ros-{{ distro }}-{{ package }}'
- python-rosdep
- python-rosinstall
- python-rosinstall-generator
- python-wstool
- build-essential
- powerline
- name: Setup environment
lineinfile:
dest: '/home/{{ ansible_user }}/.{{ shell }}rc'
regexp: '^source \/opt\/ros\/{{ distro }}\/setup.{{ shell }}'
line: 'source /opt/ros/{{ distro }}/setup.{{ shell }}'
- name: Initialize rosdep
command: rosdep init
args:
creates: /etc/ros/rosdep/sources.list.d/20-default.list
- name: Update rosdep
command: rosdep update
become: false
args:
creates: '/home/{{ ansible_user }}/.ros/rosdep/sources.cache'
- name: Install VSCode
snap:
name: code
classic: yes
- name: Install VSCode Extensions
shell:
cmd: "code --install-extension {{ item }} --force"
become: false
loop:
- ms-python.python
- ms-vscode.cpptools
- ms-vscode.cmake-tools
- twxs.cmake
- xaver.clang-format
- streetsidesoftware.code-spell-checker
- ms-iot.vscode-ros