datacoop.ansible/playbook.yml

30 lines
637 B
YAML
Raw Normal View History

2018-05-08 19:09:24 +00:00
---
2018-05-10 09:19:54 +00:00
- hosts: all
gather_facts: False
pre_tasks:
- name: install python for Ansible
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
register: output
changed_when: output.stdout != ""
- setup:
2018-05-08 19:09:24 +00:00
- name: "Include host secrets where applicable"
hosts: "all"
tasks:
2018-06-23 11:37:00 +00:00
- include_vars: "host_vars/{{ ansible_nodename }}-secrets.yml"
2018-05-08 19:09:24 +00:00
ignore_errors: yes
tags:
- "always"
- name: "Run base config on all ubuntu hosts"
hosts: "all"
become: yes
roles:
2018-05-10 09:19:54 +00:00
- "ubuntu_base"
2018-06-23 09:08:53 +00:00
- name: "Install docker on all servers"
hosts: "all_servers"
2018-05-10 09:19:54 +00:00
become: yes
roles:
- "docker"