├── ansible_hosts ├── ansible.cfg ├── setup.sh ├── README.md ├── files └── marks.sh ├── LICENSE ├── .gitmodules └── installation.yml /ansible_hosts: -------------------------------------------------------------------------------- 1 | localhost ansible_connection=local 2 | -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | hostfile = ansible_hosts 3 | ask_sudo_pass = true 4 | sudo = true 5 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo apt-get install -y git python-pip python-dev 3 | sudo pip install ansible 4 | git clone https://github.com/jdauphant/ansible-ubuntu-desktop.git 5 | cd ansible-ubuntu-desktop 6 | sed "s/git@github.com:/https:\/\/github.com\//" .gitmodules > .gitmodules_new 7 | mv .gitmodules_new .gitmodules 8 | git submodule init 9 | git submodule update 10 | ansible-playbook installation.yml --sudo -K -c local -i "localhost," 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ansible-ubuntu-desktop 2 | ====================== 3 | 4 | Provision an custom Ubuntu Desktop with Ansible 5 | 6 | # Local launch command from virgin PC : 7 | wget -O- https://raw.githubusercontent.com/jdauphant/ansible-ubuntu-desktop/master/setup.sh | sh 8 | # Local launch if after clone the repository 9 | git submodule init 10 | git submodule update 11 | ansible-playbook installation.yml --sudo -K -c local -i "localhost," 12 | -------------------------------------------------------------------------------- /files/marks.sh: -------------------------------------------------------------------------------- 1 | export MARKPATH=$HOME/.marks 2 | function jump { 3 | cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" 4 | } 5 | function mark { 6 | mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1" 7 | } 8 | function unmark { 9 | rm -i "$MARKPATH/$1" 10 | } 11 | function marks { 12 | ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo 13 | } 14 | if [[ $SHELL == *zsh* ]] 15 | then 16 | function _completemarks { 17 | reply=($(ls $MARKPATH)) 18 | } 19 | 20 | compctl -K _completemarks jump 21 | compctl -K _completemarks unmark 22 | else if [[ $SHELL == *bash* ]] 23 | then 24 | _completemarks() { 25 | local curw=${COMP_WORDS[COMP_CWORD]} 26 | local wordlist=$(find $MARKPATH -type l -printf "%f\n") 27 | COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw")) 28 | return 0 29 | } 30 | 31 | complete -F _completemarks jump unmark 32 | fi 33 | fi 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Julien DAUPHANT 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "roles/lang"] 2 | path = roles/lang 3 | url = git@github.com:jdauphant/ansible-role-lang.git 4 | [submodule "roles/packaging"] 5 | path = roles/packaging 6 | url = git@github.com:jdauphant/ansible-role-packaging.git 7 | [submodule "roles/sudo"] 8 | path = roles/sudo 9 | url = git@github.com:jdauphant/ansible-role-sudo.git 10 | [submodule "roles/vagrant"] 11 | path = roles/vagrant 12 | url = git@github.com:jdauphant/ansible-role-vagrant.git 13 | [submodule "roles/spotify"] 14 | path = roles/spotify 15 | url = git@github.com:jdauphant/ansible-role-spotify.git 16 | [submodule "roles/ufw"] 17 | path = roles/ufw 18 | url = git@github.com:jdauphant/ansible-role-ufw.git 19 | [submodule "roles/ansible"] 20 | path = roles/ansible 21 | url = git@github.com:jdauphant/ansible-role-ansible.git 22 | [submodule "roles/timezone"] 23 | path = roles/timezone 24 | url = git@github.com:jdauphant/ansible-role-timezone.git 25 | [submodule "roles/brother"] 26 | path = roles/brother 27 | url = git@github.com:jdauphant/ansible-role-brother.git 28 | [submodule "roles/dropbox"] 29 | path = roles/dropbox 30 | url = git@github.com:jdauphant/ansible-role-dropbox.git 31 | [submodule "roles/users"] 32 | path = roles/users 33 | url = git@github.com:jdauphant/ansible-role-users.git 34 | [submodule "roles/hangout"] 35 | path = roles/hangout 36 | url = git@github.com:jdauphant/ansible-role-hangout.git 37 | [submodule "roles/dell-printers"] 38 | path = roles/dell-printers 39 | url = git@github.com:jdauphant/ansible-role-dell-printers.git 40 | [submodule "roles/vmware-workstation"] 41 | path = roles/vmware-workstation 42 | url = git@github.com:jdauphant/ansible-role-vmware-workstation.git 43 | [submodule "roles/docker"] 44 | path = roles/docker 45 | url = git@github.com:jdauphant/ansible-role-docker.git 46 | [submodule "roles/scala"] 47 | path = roles/scala 48 | url = git@github.com:jdauphant/ansible-role-scala.git 49 | [submodule "roles/intellij"] 50 | path = roles/intellij 51 | url = git@github.com:jdauphant/ansible-role-intellij.git 52 | [submodule "roles/slack"] 53 | path = roles/slack 54 | url = git@github.com:jdauphant/ansible-role-slack.git 55 | [submodule "roles/visual-studio-code"] 56 | path = roles/visual-studio-code 57 | url = git@github.com:jdauphant/ansible-role-visual-studio-code.git 58 | -------------------------------------------------------------------------------- /installation.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | post_tasks: 4 | - name: Ensure apt cache is up to date 5 | apt: cache_valid_time=3600 update_cache=yes 6 | tags: [packages,update] 7 | - name: Ensure packages are up to date 8 | apt: upgrade=safe 9 | tags: [packages,update] 10 | vars: 11 | cleanup_days: 30 12 | language: "en_US" 13 | lang: "{{language}}.UTF-8" 14 | timezone: "Europe/Paris" 15 | ansible_pkg_state: latest 16 | packaging_ubuntu_extras_repository: true 17 | packaging_ubuntu_partner_repository: true 18 | packaging_ubuntu_multiverse_repository: true 19 | packaging_packages: 20 | - zsh 21 | - vim 22 | - curl 23 | - unzip 24 | - icedtea-plugin 25 | # dev 26 | - ipython 27 | - git 28 | - tig 29 | - python-setuptools 30 | - less 31 | - maven 32 | - build-essential 33 | - g++ 34 | - nodejs 35 | - nodejs-dev 36 | - valgrind 37 | - graphviz 38 | - protobuf-compiler 39 | - rubygems 40 | - ruby-dev 41 | - openjdk-8-jdk 42 | # admin 43 | - openssh-server 44 | - nmap 45 | - htop 46 | - tree 47 | - iotop 48 | - sysstat 49 | - screen 50 | - tmux 51 | - openvpn 52 | - inetutils-traceroute 53 | - sshfs 54 | - vde2 55 | - cryptsetup 56 | - traceroute 57 | - powertop 58 | - aptitude 59 | - aircrack-ng 60 | - dns2tcp 61 | - autofs 62 | - ecryptfs-utils 63 | - lm-sensors 64 | - gpm 65 | - whois 66 | - dstat 67 | - iftop 68 | - nload 69 | - speedometer 70 | - nodejs-legacy 71 | roles: 72 | - timezone 73 | - lang 74 | - role: ufw 75 | uwf_rules: 76 | - rule: allow 77 | interface: eth0 78 | to_port: 22 79 | protocol: tcp 80 | - packaging 81 | - scala 82 | - role: sudo 83 | sudo_files: 84 | - name: vpn-user 85 | vars: 86 | - "%vpn-user ALL=NOPASSWD: /usr/sbin/openvpn" 87 | #UI 88 | - role: packaging 89 | packaging_packages: 90 | - keepassx 91 | - gitg 92 | - virtualbox 93 | - qemu 94 | - chromium-browser 95 | - terminator 96 | - skype 97 | - firefox 98 | - vlc 99 | - audacity 100 | - filezilla 101 | - libreoffice 102 | - baobab 103 | - golang-go 104 | - gparted 105 | - quicksynergy 106 | - simple-scan 107 | - usb-creator-gtk 108 | - virt-manager 109 | - wireshark 110 | - synergy 111 | - gimp 112 | - role: users 113 | users_groups: 114 | - name: "vpn-user" 115 | gid: 1500 116 | - ansible 117 | - vagrant 118 | - intellij 119 | - spotify 120 | - slack 121 | - dropbox 122 | - hangout 123 | - docker 124 | - visual-studio-code 125 | - role: brother 126 | brother_printers_to_install: ['DCP-375CW'] 127 | tasks : 128 | - name: Ensure NPM is installed 129 | apt: pkg=npm 130 | tags: trash 131 | - name: Ensure trash is installed 132 | npm: name=trash global=yes 133 | tags: trash 134 | - name: Ensure ~/Downloads is daily cleanup 135 | cron: name="Cleanup ~/Downloads folder" special_time=daily user="{{ansible_env.SUDO_USER|default(ansible_user_id)}}" job="find ~/Downloads/ -mtime +{{cleanup_days}} -exec trash '{}' \;" 136 | sudo: no 137 | tags: trash 138 | # - name: Ensure marks exist 139 | # copy: src=files/marks.sh dest=/etc/profile.d/marks.sh 140 | - name: Install python apps 141 | pip: name={{item}} 142 | with_items: 143 | - virtualenv 144 | - autoenv 145 | - name: Install ruby apps 146 | gem: name={{item}} 147 | with_items: 148 | - travis --------------------------------------------------------------------------------