Pastery

Stavros' PC deployment playbook +

  1# This playbook is meant to provision a new computer.  2# Make sure the .gnupg and .ssh directories have been copied to the new  3# computer before running this.  4# Run with: ansible-playbook -i , provision.yml  5  6---  7- name: Provision a machine.  8  hosts: 127.0.0.1  9  connection: local 10  tasks: 11 12  - name: Add Virtualbox server. 13    apt_repository: repo='deb http://download.virtualbox.org/virtualbox/debian {{ hostvars[inventory_hostname]["ansible_distribution_release"] }} contrib' state=present 14    register: ppa 15    sudo: yes 16 17  - name: Add repository keys. 18    apt_key: keyserver=keyserver.ubuntu.com id={{ item }} 19    register: ppa 20    sudo: yes 21    with_items: 22      - 54422A4B98AB5139  # Virtualbox 23 24  - name: Add PPAs. 25    apt_repository: repo='{{ item }}' 26    sudo: yes 27    register: ppa 28    with_items: 29      - ppa:webupd8team/java 30      - ppa:fish-shell/release-2 31      - ppa:nviennot/tmate 32 33  - name: Update the apt cache. 34    apt: update_cache=yes 35    sudo: yes 36    when: ppa.changed 37 38  - name: Install Mac packages. 39    apt: name={{ item }} 40    sudo: yes 41    with_items: 42     - macfanctld 43    when: '"Apple" in hostvars[inventory_hostname]["ansible_system_vendor"]' 44 45  - name: Install packages. 46    apt: name={{ item }} 47    sudo: yes 48    with_items: 49     - aptitude 50     - build-essential 51     - bless 52     - calibre 53     - cifs-utils 54     - cloc 55     - cmake 56     - curl 57     - deluge-gtk 58     - encfs 59     - filezilla 60     - exuberant-ctags 61     - fish 62     - git 63     - gimp 64     - gnome-do 65     - gparted 66     - gnupg2 67     - gummi 68     - htop 69     - inkscape 70     - keepass2 71     - libssl-dev 72     - libyaml-dev 73     - meld 74     - nemo 75     - nmap 76     - p7zip 77     - pass 78     - pidgin 79     - pidgin-otr 80     - pidgin-hotkeys 81     - pidgin-plugin-pack 82     - pwgen 83     - compizconfig-settings-manager 84     - pgadmin3 85     - python-dev 86     - python-setuptools 87     - python-pip 88     - redshift-gtk 89     - screen 90     - traceroute 91     - tig 92     - tmate 93     - tmux 94     - shutter 95     - silversearcher-ag 96     - unp 97     - unrar 98     - unzip 99     - units100     - vim-gtk101     - virtualenv102     - virtualbox-5.0103     - vlc104     - workrave105     - xchat106     - zip107108  - name: Run bootstrap script.109    shell: ~/bin/provisioning/scripts/bootstrap110111  - name: Run settings script.112    shell: ~/bin/provisioning/scripts/settings113114  - name: Install Vundle.115    git: repo=https://github.com/gmarik/Vundle.vim.git dest=~/.vim/bundle/vundle116117  - name: Change shell to fish.118    sudo: yes119    user: name={{ hostvars[inventory_hostname]["ansible_user_id"] }} shell=/usr/bin/fish groups=dialout,disk append=yes120121  - name: Change the default manager to Nemo.122    shell: xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
New paste