diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-03 11:55:38 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-03 11:55:38 +0800 |
commit | 6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a (patch) | |
tree | 4d6f8855877013bf6a4420ffc78cf782b0a3e737 /tests/files/ansible/roles/docker | |
parent | 8ccde784f9035c0a7a8f234994538c817c5b9de7 (diff) | |
download | go-tangerine-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar go-tangerine-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.gz go-tangerine-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.bz2 go-tangerine-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.lz go-tangerine-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.xz go-tangerine-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.zst go-tangerine-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.zip |
Updated tests
Diffstat (limited to 'tests/files/ansible/roles/docker')
-rw-r--r-- | tests/files/ansible/roles/docker/handlers/main.yml | 4 | ||||
-rw-r--r-- | tests/files/ansible/roles/docker/tasks/main.yml | 40 |
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/files/ansible/roles/docker/handlers/main.yml b/tests/files/ansible/roles/docker/handlers/main.yml new file mode 100644 index 000000000..767fc7ba6 --- /dev/null +++ b/tests/files/ansible/roles/docker/handlers/main.yml @@ -0,0 +1,4 @@ +--- +- name: restart sshd + sudo: true + service: name=ssh state=restarted diff --git a/tests/files/ansible/roles/docker/tasks/main.yml b/tests/files/ansible/roles/docker/tasks/main.yml new file mode 100644 index 000000000..c434b34a5 --- /dev/null +++ b/tests/files/ansible/roles/docker/tasks/main.yml @@ -0,0 +1,40 @@ +--- +- name: update package list + sudo: true + apt: update_cache=true + +- name: install docker dependencies + sudo: true + apt: name={{ item }} install_recommends=false + with_items: + # Docker has serious problems on EC2: http://www.danstutzman.com/2014/07/speed-up-docker-on-ec2 + # and https://github.com/docker/docker/issues/4036 + - linux-generic + - python-pip + +- name: Kernel update needs a restart + sudo: true + command: shutdown -r now + async: 0 + poll: 0 + ignore_errors: true + +- name: waiting for server to come back + local_action: wait_for host={{ inventory_hostname }} port=22 + state=started + sudo: false + +- name: install docker + sudo: true + # install script from https://docs.docker.com/installation/ubuntulinux/ + # TODO this is not idempotent + shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh + +- name: install docker python API + sudo: true + pip: name=docker-py + +- name: enable docker for standard user + sudo: true + user: name={{ ansible_ssh_user }} groups=docker append=yes + notify: restart sshd |