forked from system-f/fp-course
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also... - change ubuntu pass to 'ubuntu' - move vs-code install into its own YAML - use xubuntu-desktop meta package
- Loading branch information
1 parent
d9f26d7
commit b611a82
Showing
4 changed files
with
66 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
- name: "Install ansible deps (Python 2.7 stuff)" | ||
hosts: all | ||
user: ubuntu | ||
gather_facts: false | ||
tasks: | ||
- name: "Install ansible requirements" | ||
raw: apt-get update && apt-get install -y python2.7 python-simplejson | ||
become: yes | ||
|
||
- name: "Setup Ubuntu 16.04" | ||
hosts: all | ||
user: ubuntu | ||
|
||
tasks: | ||
- name: "Set ubuntu user's password to 'ubuntu'" | ||
user: | ||
name: ubuntu | ||
password: $6$hVCglTDqXKLR45$b4M1N30zbQmieXbHpqm3z1yYCZKNq1jF554WU7AwiBI/z8DkbV1zyE.aYeZvOkCgxsWIJv63IBEwB9riNmdyY/ | ||
become: yes | ||
|
||
- name: "Install packages" | ||
apt: | ||
name: "{{ item }}" | ||
update_cache: yes | ||
state: present | ||
become: yes | ||
with_items: | ||
- emacs | ||
- git | ||
- tmux | ||
- vim | ||
- xubuntu-desktop | ||
|
||
- name: "Automatically login as ubuntu user" | ||
lineinfile: | ||
line: autologin-user=ubuntu | ||
path: /usr/share/lightdm/lightdm.conf.d/60-xubuntu.conf | ||
become: yes | ||
|
||
- include: vs-code.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
- name: "Check if VS Code is installed" | ||
command: which code | ||
ignore_errors: true | ||
register: haz_code | ||
|
||
- name: "Download VS code" | ||
get_url: | ||
url: https://go.microsoft.com/fwlink/?LinkID=760868 | ||
dest: /tmp/vs-code.deb | ||
when: haz_code|failed | ||
|
||
# So the recommended install method is to install a thing with broken/missing | ||
# dependencies, and then fix it. | ||
- name: "Install VS Code deb" | ||
command: dpkg -i /tmp/vs-code.deb | ||
become: yes | ||
ignore_errors: true | ||
when: haz_code|failed | ||
|
||
- name: "Fix VS code installation" | ||
command: apt-get install -fy | ||
become: yes | ||
when: haz_code|failed |