Browse Source

Feste MAC Adresse, Order ~/Projekte der Nutzer liegen im Vagrant Share

master
Christian Aust 1 year ago
parent
commit
ab657ec9a9
4 changed files with 28 additions and 3 deletions
  1. 3
      .gitignore
  2. 0
      Projekte/.keep
  3. 10
      Vagrantfile
  4. 18
      provision/setup_user.yml

3
.gitignore

@ -6,3 +6,6 @@
# Ansible artefacts
*.retry
# User files
/Projekte/user*

skel/Projekte/.keep → Projekte/.keep

10
Vagrantfile

@ -26,6 +26,12 @@ Vagrant.configure("2") do |config|
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
if Vagrant.has_plugin?('vagrant-proxyconf')
config.proxy.http = ENV['HTTP_PROXY']
config.proxy.https = ENV['HTTPS_PROXY']
config.proxy.no_proxy = ENV['NO_PROXY']
end
config.vm.provision 'ansible_local' do |ansible|
ansible.become = true
ansible.playbook = 'provision/setup.yml'
@ -34,8 +40,6 @@ Vagrant.configure("2") do |config|
config.vm.provider :lxc do |lxc, override|
lxc.container_name = :machine
lxc.customize 'cgroup.memory.limit_in_bytes', "#{8*1024}M"
# FIXME: Use fixed MAC address
# lxc.customize 'volatile.eth0.hwaddr', '00:16:3e:89:d8:6b'
lxc.customize 'net.0.hwaddr', '00:16:3e:89:d8:6b'
end
end

18
provision/setup_user.yml

@ -23,3 +23,21 @@
owner: "{{ item }}"
group: "{{ group }}"
mode: 0644
- name: Create geany config directory
file:
path: "/vagrant/Projekte/{{ item }}"
state: directory
owner: "{{ item }}"
group: "{{ group }}"
mode: 0775
- name: Create Projekte link
file:
src: "/vagrant/Projekte/{{ item }}"
dest: "/home/{{ item }}/Projekte"
state: link
owner: "{{ item }}"
group: "{{ group }}"
mode: 0775
Loading…
Cancel
Save