blog/ansible/vagrant.yml

95 lines
1.8 KiB
YAML

---
- hosts: all
tasks:
- name: install deps
apt:
name={{ item }}
state=present
with_items:
- git
- ansible
- python3
- python3-dev
- python3-pip
- python-virtualenv
- libxml2-dev
- libxslt1-dev
- zlib1g-dev
- lftp
- pandoc
- nodejs
- nodejs-legacy
- npm
- mc
sudo: yes
- name: clone batcave
git:
repo=https://github.com/xsteadfastx/batcave.git
dest=~/batcave
- name: run batcave
command:
ansible-playbook -i hosts base.yml -c local
chdir=~/batcave
- name: install blogging packages
pip:
name={{ item }}
executable=pip3
with_items:
- pelican==3.6.3
- markdown
- ipython[notebook]==2.4.1
- beautifulsoup4
- cookiecutter==1.2.1
- tzlocal
sudo: yes
- name: clone pelican-plugins
git:
repo=git@github.com:xsteadfastx/pelican-plugins.git
dest=/vagrant/pelican-plugins
accept_hostkey=yes
- name: set timezone
copy:
content="Europe/Berlin"
dest=/etc/timezone
owner=root
group=root
mode=0644
backup=yes
sudo: yes
notify:
- update timezone
- name: export variables
lineinfile:
dest=~/.zshrc
line="{{ item }}"
with_items:
- export PYTHONIOENCODING=UTF-8
- export LC_ALL=C.UTF-8
- name: install js packages
npm:
name={{ item }}
path=/vagrant
state=present
with_items:
- bower
- gulp
- gulp-rename
- gulp-less
- gulp-minify-css
handlers:
- name: update timezone
command:
dpkg-reconfigure --frontend moninteractive tzdata
sudo: yes