From 7e617bc471639a00a79bbf055a2316b485faa4e7 Mon Sep 17 00:00:00 2001 From: NaeiKinDus Date: Mon, 11 Dec 2023 00:00:00 +0000 Subject: [PATCH] feat(development): added vagrant and virtualbox --- .../roles/development/tasks/main.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml b/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml index e0f13e0..3c86599 100644 --- a/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml +++ b/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml @@ -4,6 +4,7 @@ gather_subset: - distribution - distribution_release + - kernel - virtualization_type - name: '[setup] merge with custom vars' @@ -53,6 +54,8 @@ - libtool - libxss1 # draw.io - libxtst6 # draw.io + - linux-headers-amd64 + - "linux-headers-{{ ansible_facts['kernel'] }}" - make - mariadb-client - pipx @@ -62,6 +65,7 @@ - python3-virtualenv - shellcheck - sqlite3 + - vagrant - valgrind - xdg-utils # draw.io state: present @@ -214,6 +218,30 @@ state: absent when: helm_stat.state is match("absent") +- name: '[vbox] install Virtualbox' + become: true + block: + - name: '[vbox] add repository key' + ansible.builtin.get_url: + url: https://www.virtualbox.org/download/oracle_vbox_2016.asc + dest: /etc/apt/trusted.gpg.d/virtualbox.asc + mode: '0644' + + - name: '[apt key] add repository' + ansible.builtin.apt_repository: + repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/virtualbox.asc] https://download.virtualbox.org/virtualbox/{{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_release']}} contrib" + state: present + filename: virtualbox + update_cache: true + + - name: '[apt] install Virtualbox' + ansible.builtin.apt: + force_apt_get: true + cache_valid_time: 3600 + pkg: + - "virtualbox-{{ development.virtualbox_version }}" + state: present + - name: '[custom] install Docker CE repository' become: true block: