ansible/roles/playbook.yml

30 lines
665 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:
- include_vars: "../../host_vars/{{ ansible_nodename }}-secrets.yml"
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"
- name: "Install docker on all kubernetes servers"
hosts: "all_kubernetes_servers"
become: yes
roles:
- "docker"