blog/ansible/vagrant.yml
Marvin Steadfast 8039f054f9 some stack refactoring
added miniconda and worked on the Dockerfile and ansible playbooks.
2016-02-05 14:54:41 +01:00

107 lines
2.2 KiB
YAML

---
- hosts: all
roles:
- miniconda
tasks:
- name: install deps
apt:
name={{ item }}
state=present
with_items:
- git
- lftp
- pandoc
- nodejs
- nodejs-legacy
- npm
- mc
- imagemagick
- ack-grep
become: yes
- name: install conda packages
conda:
name={{ item }}
executable=/home/vagrant/miniconda3/bin/conda
with_items:
- jupyter=1.0.0
- name: install blogging packages
pip:
name={{ item }}
executable=/home/vagrant/miniconda3/bin/pip
with_items:
- pelican==3.6.3
- markdown
- beautifulsoup4
- cookiecutter==1.2.1
- tzlocal
- name: clone pelican-plugins
git:
repo=git@github.com:xsteadfastx/pelican-plugins.git
dest=/vagrant/pelican-plugins
accept_hostkey=yes
- name: install js packages
npm:
name={{ item }}
path=/vagrant
state=present
with_items:
- bower
- gulp
- gulp-rename
- gulp-less
- gulp-minify-css
- name: set timezone
copy:
content="Europe/Berlin"
dest=/etc/timezone
owner=root
group=root
mode=0644
backup=yes
become: yes
notify:
- update timezone
- name: create ansible environment
command: /home/vagrant/miniconda3/bin/conda create -n ansible python=2.7 --yes
args:
creates: /home/vagrant/miniconda3/envs/ansible
- name: install ansible
pip:
name=ansible
executable=/home/vagrant/miniconda3/envs/ansible/bin/pip
- name: clone batcave
git:
repo=https://github.com/xsteadfastx/batcave.git
dest=~/batcave
- name: run batcave
command:
/home/vagrant/miniconda3/envs/ansible/bin/ansible-playbook -i hosts base.yml -c local
chdir=~/batcave
- name: export variables
lineinfile:
dest=~/.zshrc
line="{{ item }}"
with_items:
- export PYTHONIOENCODING=UTF-8
- export LC_ALL=C.UTF-8
handlers:
- name: update timezone
command:
dpkg-reconfigure --frontend moninteractive tzdata
become: yes