diff --git a/.gitignore b/.gitignore index 48fcaea..d485fdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .terraform *.tfstate +tests/inventory diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..fb2aa99 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,5 @@ +[defaults] +callback_whitelist = profile_tasks + +[ssh_connection] +pipelining = True diff --git a/defaults/main.yml b/defaults/main.yml index 568d667..6bbdf95 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,9 +1,14 @@ --- - + apt_packages: - awscli + - bash - build-essential + - ca-certificates + - curl + - default-jre - git + - openssl - python3 - ssh - ssh-client @@ -14,8 +19,6 @@ apt_packages: docker_packages: - apt-transport-https - aptitude - - ca-certificates - - curl - software-properties-common - python3-pip - virtualenv @@ -23,8 +26,6 @@ docker_packages: postgres_packages: - acl - - bash - - openssl - libpq-dev - libssl-dev - libssl-doc @@ -34,11 +35,8 @@ postgres_packages: user: ubuntu -db_user: ubuntu db_name: ubuntu db_password: ubuntu -docker_user: ubuntu - git_username: git-user git_email: git-user@email.com diff --git a/tasks/main.yml b/tasks/main.yml index fb1dbf7..5731904 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,6 +3,7 @@ - import_tasks: ../tasks/packages.yml - import_tasks: ../tasks/tools/git.yml - import_tasks: ../tasks/tools/docker.yml + - import_tasks: ../tasks/tools/sbt.yml - import_tasks: ../tasks/tools/postgres.yml - import_tasks: ../tasks/tools/oh-my-zsh.yml - import_tasks: ../tasks/tools/nodejs.yml diff --git a/tasks/tools/docker.yml b/tasks/tools/docker.yml index e8d771b..a25ab28 100644 --- a/tasks/tools/docker.yml +++ b/tasks/tools/docker.yml @@ -17,9 +17,9 @@ pip: name: docker -- name: Add docker_user user to docker group +- name: Add user to docker group user: - name: "{{ docker_user }}" + name: "{{ user }}" group: docker - name: Ensure the Docker service is running diff --git a/tasks/tools/postgres.yml b/tasks/tools/postgres.yml index 37c7405..0f19611 100644 --- a/tasks/tools/postgres.yml +++ b/tasks/tools/postgres.yml @@ -4,7 +4,7 @@ service: name=postgresql state=started enabled=yes - name: Create postgres user - postgresql_user: name={{ db_user }} password={{ db_password }} + postgresql_user: name={{ user }} password={{ db_password }} become_user: postgres - name: Create postgres database @@ -15,7 +15,7 @@ - name: Connect to ubuntu database, create ubuntu user, and grant access become_user: postgres postgresql_user: - db: "{{ db_user }}" + db: "{{ user }}" name: "{{ db_name }}" password: "{{ db_password }}" encrypted: yes diff --git a/tasks/tools/sbt.yml b/tasks/tools/sbt.yml new file mode 100644 index 0000000..8044af2 --- /dev/null +++ b/tasks/tools/sbt.yml @@ -0,0 +1,9 @@ +--- +- name: Add sbt repo + apt_repository: repo='deb https://dl.bintray.com/sbt/debian /' state=present update_cache=no + +- name: Add sbt repo key + apt_key: keyserver='hkp://keyserver.ubuntu.com:80' id='2EE0EA64E40A89B84B2DF73499E82A75642AC823' + +- name: Install sbt + apt: name=sbt state=present update_cache=yes diff --git a/tests/inventory b/tests/inventory deleted file mode 100644 index 2fbb50c..0000000 --- a/tests/inventory +++ /dev/null @@ -1 +0,0 @@ -localhost