diff options
author | Alan Pearce | 2017-03-24 21:22:27 +0100 |
---|---|---|
committer | Alan Pearce | 2017-03-24 21:22:27 +0100 |
commit | bbb26322199d41171595bff6d073bda1fa1fa62c (patch) | |
tree | 799f160f60327a1b026fd9f4065636e611ccafb0 /vagrant | |
parent | 0c4343e413bbc922954b417a639c60dfa007a0da (diff) | |
parent | 53f50286e177abb9d1ac4a7c239dcbcc3fed63b7 (diff) | |
download | nixfiles-bbb26322199d41171595bff6d073bda1fa1fa62c.tar.lz nixfiles-bbb26322199d41171595bff6d073bda1fa1fa62c.tar.zst nixfiles-bbb26322199d41171595bff6d073bda1fa1fa62c.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'vagrant')
-rw-r--r-- | vagrant/.vagrant.d/Vagrantfile | 7 | ||||
-rw-r--r-- | vagrant/.vagrant.d/ansible/centos.yml | 31 | ||||
-rw-r--r-- | vagrant/.vagrant.d/ansible/debian.yml | 15 | ||||
-rw-r--r-- | vagrant/.vagrant.d/ansible/site.yml | 32 |
4 files changed, 85 insertions, 0 deletions
diff --git a/vagrant/.vagrant.d/Vagrantfile b/vagrant/.vagrant.d/Vagrantfile new file mode 100644 index 00000000..4c69c88e --- /dev/null +++ b/vagrant/.vagrant.d/Vagrantfile @@ -0,0 +1,7 @@ +# -*- mode: ruby -*- +Vagrant.configure(2) do |config| + config.vm.provision "ansible" do |ansible| + ansible.playbook = "#{File.dirname(__FILE__)}/ansible/site.yml" + ansible.limit = "all" + end +end diff --git a/vagrant/.vagrant.d/ansible/centos.yml b/vagrant/.vagrant.d/ansible/centos.yml new file mode 100644 index 00000000..1a6759a6 --- /dev/null +++ b/vagrant/.vagrant.d/ansible/centos.yml @@ -0,0 +1,31 @@ +- name: Ensure EPEL repository package is present + register: centos_repos + get_url: + url: "{{ item.url }}" + dest: "/root/{{ item.dest }}" + with_items: + - url: http://lon.mirror.rackspace.com/ius/stable/CentOS/6/x86_64/epel-release-6-5.noarch.rpm + dest: epel-repo.rpm + - url: http://lon.mirror.rackspace.com/ius/stable/CentOS/6/x86_64/ius-release-1.0-11.ius.centos6.noarch.rpm + dest: ius-repo.rpm + +- name: Fetch utilities repo + get_url: + url: http://download.opensuse.org/repositories/utilities/CentOS_6/utilities.repo + dest: /etc/yum.repos.d/utilities.repo + +- name: Ensure IUS and EPEL repositories are installed + when: centos_repos.changed + yum: + name: "{{ item }}" + state: installed + with_items: + - /root/epel-repo.rpm + - /root/ius-repo.rpm + + +- name: Ensure that tools are installed + with_items: packages + yum: + name: "{{ item }}" + state: present diff --git a/vagrant/.vagrant.d/ansible/debian.yml b/vagrant/.vagrant.d/ansible/debian.yml new file mode 100644 index 00000000..9e06af69 --- /dev/null +++ b/vagrant/.vagrant.d/ansible/debian.yml @@ -0,0 +1,15 @@ +- get_url: + url: https://thoughtbot.github.io/rcm/debs/rcm_1.2.2-2_all.deb + dest: /tmp/rcm.deb + +- command: dpkg --skip-same-version -i /tmp/rcm.deb + register: dpkg + changed_when: "dpkg.stdout.startswith('Selecting')" + +- name: Ensure that tools are installed + with_items: packages + apt: + pkg: "{{ item }}" + state: present + cache_valid_time: 86400 + update_cache: yes \ No newline at end of file diff --git a/vagrant/.vagrant.d/ansible/site.yml b/vagrant/.vagrant.d/ansible/site.yml new file mode 100644 index 00000000..13384550 --- /dev/null +++ b/vagrant/.vagrant.d/ansible/site.yml @@ -0,0 +1,32 @@ +--- +- hosts: all + sudo: yes + vars: + packages: + - zsh + - htop + - lsof + - git + - rcm + tasks: + - include: centos.yml + when: ansible_distribution == "CentOS" + + - include: debian.yml + when: ansible_distribution == "Debian" + + - name: Ensure that dotfiles are checked out + sudo: no + git: + repo: git://github.com/alanpearce/dotfiles + dest: ~/dotfiles + update: yes + + - name: Change shell to zsh + user: + name: vagrant + shell: /bin/zsh + + - name: Install dotfiles + sudo: no + command: /usr/bin/rcup -d dotfiles -t zsh -t git -x README.org -x Brewfile -x LaunchAgents chdir=/home/vagrant \ No newline at end of file |