-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathubuntuascode.yml
45 lines (37 loc) · 1.48 KB
/
ubuntuascode.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
---
- hosts: localhost
connection: local
vars_files:
- "{{ manuscript | default('./manuscripts/default-ubuntu.yml')}}"
tasks:
- name: Add apt repositories
apt_repository:
"{{ item.parameters }}"
become: "{{ item.become | default('false')}}"
with_items: "{{ installs | selectattr('module', 'equalto', 'apt_repository') | list }}"
- name: Install using apt
apt:
"{{ item.parameters }}"
become: "{{ item.become | default('false')}}"
with_items: "{{ installs | selectattr('module', 'equalto', 'apt') | list }}"
- name: Install Ruby gems
gem:
"{{ item.parameters }}"
become: "{{ item.become | default('false')}}"
with_items: "{{ installs | selectattr('module', 'equalto', 'gem') | list }}"
- name: Shell executions
shell: "{{ item.shell }} > {{ item.name }}.log"
args:
"{{ item.parameters }}"
become: "{{ item.become | default('false')}}"
with_items: "{{ installs | selectattr('module', 'equalto', 'shell') | list }}"
- name: Configure git
git_config:
"{{ item.parameters }}"
become: "{{ item.become | default('false')}}"
with_items: "{{ installs | selectattr('module', 'equalto', 'git_config') | list }}"
- name: Configuration file manipulations
lineinfile:
"{{ item.parameters }}"
become: "{{ item.become | default('false')}}"
with_items: "{{ installs | selectattr('module', 'equalto', 'lineinfile') | list }}"