mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
Make sure to use {{ variable }} instead of {{variable}}. Also we need to ensure git is instaled when using the git module.
44 lines
1.7 KiB
YAML
44 lines
1.7 KiB
YAML
---
|
|
|
|
- name: install arch-boxes dependencies
|
|
pacman: name=git,packer,virtualbox,qemu-headless,virtualbox-host-modules-arch,python,python-urllib3 state=present
|
|
|
|
- name: create arch-boxes user
|
|
user: name={{ archboxes_user }} shell=/bin/bash home="{{ archboxes_home }}" createhome=yes
|
|
|
|
- name: clone arch-boxes repository
|
|
git: repo='https://github.com/archlinux/arch-boxes.git' dest="{{ archboxes_git_dir }}" force=yes version="{{ archboxes_version }}"
|
|
|
|
- name: load virtualbox kernel modules
|
|
modprobe: name="{{ item }}" state=present
|
|
with_items: ['vboxdrv', 'vboxnetadp', 'vboxnetflt']
|
|
|
|
- name: add modules-load config for virtualbox
|
|
copy: src=virtualbox.conf dest=/etc/modules-load.d/virtualbox.conf owner=root group=root mode=0644
|
|
|
|
- name: adjust permissions of git checkout
|
|
file: path="{{ archboxes_git_dir }}" state=directory recurse=yes owner="{{ archboxes_user }}" group="{{ archboxes_user }}"
|
|
|
|
- name: ensure controller.py of arch-boxes is executable
|
|
file: path="{{ archboxes_git_dir }}/controller.py" mode='0744'
|
|
|
|
- name: replace placeholder to vagrantcloud API Key
|
|
no_log: true
|
|
replace: path="{{ archboxes_git_dir }}/vagrant.json" regexp='PLACEHOLDER' replace="{{ vault_archboxes_apikey }}"
|
|
|
|
- name: install sudoers file
|
|
template: src=sudoers.d.j2 dest=/etc/sudoers.d/archboxes
|
|
|
|
- name: install arch-boxes service
|
|
template: src='arch-boxes.service.j2' dest='/etc/systemd/system/arch-boxes.service' owner=root group=root mode=0644
|
|
notify:
|
|
- daemon reload
|
|
|
|
- name: install arch-boxes timer
|
|
template: src='arch-boxes.timer.j2' dest='/etc/systemd/system/arch-boxes.timer' owner=root group=root mode=0644
|
|
notify:
|
|
- daemon reload
|
|
|
|
- name: start and enable arch-boxes timer
|
|
service: name='arch-boxes.timer' enabled=yes state=started
|