145 lines
2.9 KiB
YAML
145 lines
2.9 KiB
YAML
---
|
|
- hosts: all
|
|
|
|
tasks:
|
|
|
|
- name: install deps
|
|
apk:
|
|
name={{ item }}
|
|
state=present
|
|
update_cache=yes
|
|
with_items:
|
|
- ack
|
|
- ca-certificates
|
|
- coreutils
|
|
- curl
|
|
- g++
|
|
- gcc
|
|
- git
|
|
- grep
|
|
- imagemagick
|
|
- lftp
|
|
- libffi-dev
|
|
- libstdc++
|
|
- make
|
|
- musl-dev
|
|
- nodejs
|
|
- openssl-dev
|
|
- perl
|
|
- python-dev
|
|
- python3
|
|
- python3-dev
|
|
become: yes
|
|
|
|
- name: pip status
|
|
stat:
|
|
path=/usr/bin/pip
|
|
register: pip
|
|
|
|
- name: install pip
|
|
shell: curl https://bootstrap.pypa.io/get-pip.py | python3
|
|
become: yes
|
|
when: pip.stat.exists == False
|
|
|
|
- name: install pip packages
|
|
pip:
|
|
name={{ item }}
|
|
with_items:
|
|
- beautifulsoup4
|
|
- cookiecutter==1.4.0
|
|
- flickr2markdown
|
|
- ipython[notebook]==2.4.1
|
|
- jinja2-slug
|
|
- markdown
|
|
- pelican==3.6.3
|
|
- tzlocal
|
|
- virtualenv
|
|
become: yes
|
|
|
|
- name: add flickr2markdown config
|
|
copy:
|
|
src=flickr2markdown
|
|
dest=~/.flickr2markdown
|
|
|
|
- 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
|
|
global=yes
|
|
with_items:
|
|
- bower
|
|
- gulp
|
|
- gulp-rename
|
|
- gulp-less
|
|
- gulp-minify-css
|
|
become: yes
|
|
|
|
- name: set timezone
|
|
copy:
|
|
content="Europe/Berlin"
|
|
dest=/etc/timezone
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
backup=yes
|
|
become: yes
|
|
|
|
- name: install ansible
|
|
pip:
|
|
name=ansible
|
|
virtualenv=~/ansible
|
|
virtualenv_python=python
|
|
state=latest
|
|
|
|
- name: clone batcave
|
|
git:
|
|
repo=https://github.com/xsteadfastx/batcave.git
|
|
dest=~/.batcave
|
|
force=yes
|
|
|
|
- name: run batcave
|
|
command:
|
|
~/ansible/bin/ansible-playbook -i hosts base.yml -c local --extra-vars="hosts=localhost"
|
|
chdir=~/.batcave
|
|
environment:
|
|
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
|
|
|
|
- name: export variables
|
|
lineinfile:
|
|
dest=~/.zshrc
|
|
line='{{ item }}'
|
|
with_items:
|
|
- export PYTHONIOENCODING=UTF-8
|
|
- export LC_ALL=C.UTF-8
|
|
- export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
|
|
|
- name: no git colors
|
|
command: git config --global color.ui false
|
|
|
|
- name: remove some deps
|
|
apk:
|
|
name={{ item }}
|
|
state=absent
|
|
with_items:
|
|
- g++
|
|
- gcc
|
|
- libffi-dev
|
|
- libstdc++
|
|
- openssl-dev
|
|
- python-dev
|
|
- python3-dev
|
|
become: yes
|
|
|
|
- name: remove ansible
|
|
file:
|
|
path=~/ansible
|
|
state=absent
|
|
|