Compare commits

..

4 commits

5 changed files with 69 additions and 35 deletions

View file

@ -96,3 +96,23 @@ Vagrant will bootstrap a VM, install Ansible und run the provisioning from withi
## Default user
By default, a `vagrant` user will be provisioned (if not already available) and used throughout the provisioning. The default password is `vagrant`.
## Tips
### Run the provisioning from within the VM on demand
Open a terminal and run:
```
ansible-playbook -i /vagrant/provisioning/inventory.sample /vagrant/provisioning/playbook.yml -c local
```
This will not try to connect to itself via SSH using the defined IP address but instead uses the local connection.
### Keep the Virtualbox Guest Additions up to date with Vagrant
Install the Vagrant plugin `vagrant-vbguest`:
```
vagrant plugin install vagrant-vbguest
```

View file

@ -2,7 +2,7 @@
gathering = smart
fact_caching_connection = ./facts_cache
fact_caching = jsonfile
ansible_roles_path = ./roles
roles_path = ./roles
# The timeout is defined in seconds
# This is 2 hours
@ -11,4 +11,4 @@ fact_caching_timeout = 7200
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=18000 -o PreferredAuthentications=publickey
control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
pipelining = True
pipelining = True

View file

@ -3,10 +3,6 @@
become: yes
vars:
locales_gen:
- en_US.UTF-8
- de_DE.UTF-8
locales_default: de_DE.UTF-8
ansible_version: "2.9.4"
pip_install_packages:
- name: docker
@ -20,34 +16,6 @@
- vagrant
pre_tasks:
- name: Generate locals
locale_gen:
name: "{{ item }}"
state: present
loop: "{{ locales_gen }}"
- name: Get current locale
command: localectl status
register: locale_status
changed_when: false
- name: Extract LANG from current locale configuration
set_fact:
locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}"
- debug:
msg: "{{ locale_lang }}"
- name: Set default locale
command: localectl set-locale LANG={{ locales_default }}
when: locale_lang != locales_default
- name: Replace US repo with DE mirror
replace:
path: /etc/apt/sources.list
regexp: 'us(\.archive\.ubuntu\.com)'
replace: 'de\1'
- name: Install Python3
raw: test -e /usr/bin/python3 || (apt update && apt install -y --force-yes python3)
changed_when: false
@ -97,5 +65,7 @@
when: desktop_installed.changed
roles:
- jotbe.common
- geerlingguy.pip
- geerlingguy.docker
- geerlingguy.docker
- jotbe.dev-tools

View file

@ -5,3 +5,8 @@
- name: jotbe.common
src: https://git.jotbe.io/jotbe/ansible-role-common.git
scm: git
- name: jotbe.dev-tools
src: https://git.jotbe.io/jotbe/ansible-role-dev-tools.git
scm: git

View file

@ -0,0 +1,39 @@
---
# tasks file for jotbe.dev-tools
- name: Add key for Sublime Text repo
apt_key:
url: https://download.sublimetext.com/sublimehq-pub.gpg
state: present
- name: Add repository for Sublime Text
apt_repository:
repo: deb https://download.sublimetext.com/ apt/stable/
state: present
- name: Add key for VSCodium repo
apt_key:
url: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg
state: present
- name: Add repository for VSCodium
apt_repository:
repo: deb https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/repos/debs/ vscodium main
state: present
- name: Update apt cache
apt:
update_cache: yes
cache_valid_time: 7200
- name: Install Sublime Text
apt:
pkg:
- sublime-text
register: sublime_text_installed
- name: Install VSCodium
apt:
pkg:
- codium
register: vscodium_installed