johnhamelink
10/19/2014 - 8:53 PM

main.yml

---
- hosts: all
  sudo: yes
  tasks:

    - name: Main | Updating Debian
      apt: upgrade=dist update_cache=true

    - name: Main | Downloading ansible deps
      apt: name={{ item }} state=present
      with_items:
        - python-yaml
        - python-jinja2
        - python-paramiko
        - python-keyczar
        - python-psycopg2
        - git
        - vim

    - name: Main | Add Deploy user
      user: name=deploy
            group=sudo
            append=yes

    - name: Main | Set deploy user's password to "password"
      shell: echo "deploy:password" | sudo chpasswd

    - name: Main | Allow passwordless sudo for sudo group users
      lineinfile: 'dest=/etc/sudoers state=present regexp="^%sudo ALL\=" line="%sudo ALL=(ALL) NOPASSWD: ALL" validate="visudo -cf %s"'

    - include: rbenv.yml
    - include: postgres.yml
    - include: apache2.yml
    - include: goad.yml