-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.yml
48 lines (48 loc) · 1.52 KB
/
setup.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
---
- name: Configure Linux Dev Environment
hosts: all
vars_files:
- vars/global.yml
pre_tasks:
- name: "Set facts"
ansible.builtin.set_fact:
dpkg_arch: "{{ 'amd64' if (ansible_architecture == 'x86_64') else ansible_architecture }}"
- name: "Meta: Create tempdir"
ansible.builtin.tempfile:
state: directory
register: tempdir
- name: "Meta: Create applications directory"
ansible.builtin.file:
path: /usr/local/share/applications
state: directory
owner: root
group: root
mode: "0755"
become: true
- name: "Create .bashrc if not exists"
ansible.builtin.file:
path: ~/.bashrc
state: touch
mode: "0644"
modification_time: preserve
access_time: preserve
roles:
# These roles need to run as the root user
- role: packages
become: true
# Packages are currently only supported for Ubuntu, mostly because the names are
# Ubuntu-specific. Not running packages outside Ubuntu will allow for most of the
# remainder of the configuration to work without issues (but some tools may still
# need to be manually installed)
when: ansible_distribution == 'Ubuntu'
- role: aws
become: true
- role: utils
become: true
# These roles need to run as the user running the
# playbook (either for security reasons or due to configuring
# files in the home directory)
- role: nvm
become: false
- role: python
become: false