-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.playbook.yml
73 lines (65 loc) · 2.31 KB
/
dev.playbook.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
---
- hosts: all
gather_facts: false
vars:
- deb_gpg_keyrings: /usr/share/keyrings
- deb_sha_dest: /opt
- deb_sig_keyrings: /usr/share/debsig/keyrings
- deb_sig_policies: /etc/debsig/policies
- deb_sig_dest: /opt
- dpkg_sig_dest: /opt
pre_tasks:
- name: APT · Updates
become: true
block:
- name: APT · Update cache if needed
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
- name: APT · Update all packages to the latest version
ansible.builtin.apt:
name: "*"
- name: APT · Upgrade all packages to the latest version
ansible.builtin.apt:
upgrade: safe
update_cache: true
tags: always
tasks:
- name: Install packages defined in config.yml
become: true
block:
- name: APT · Install essential packages
ansible.builtin.apt:
name:
- curl
- gpg
- python-pip3
# https://www.virtualbox.org/wiki/Linux_Downloads
- name: VirtualBox · Installation
ansible.builtin.include_role:
name: install_package_deb_gpg
vars:
deb_gpg_name: virtualbox-7.0
deb_gpg_key_url: https://www.virtualbox.org/download/oracle_vbox_2016.asc
deb_gpg_keyring: oracle-virtualbox-2016.asc
deb_gpg_url: https://download.virtualbox.org/virtualbox/debian
deb_gpg_release: jammy
deb_gpg_section: contrib
deb_gpg_source: oracle-virtualbox
# https://developer.hashicorp.com/vagrant/downloads
- name: Vagrant · Installation
ansible.builtin.include_role:
name: install_package_deb_gpg
vars:
deb_gpg_name: vagrant
deb_gpg_key_url: https://apt.releases.hashicorp.com/gpg
deb_gpg_keyring: hashicorp-archive-keyring.asc
deb_gpg_url: https://apt.releases.hashicorp.com
deb_gpg_release: jammy
deb_gpg_section: main
deb_gpg_source: hashicorp
- name: Python - Install psutil
ansible.builtin.command: "pip3 install psutil"
register: install_psutil_result
failed_when: install_psutil_result.rc != 0
changed_when: install_psutil_result.rc == 0