2019-03-21 11:00:53 +00:00
|
|
|
---
|
|
|
|
#
|
|
|
|
# This playbook configures most basic things about the hosts:
|
|
|
|
#
|
|
|
|
# - Admin and Additional users
|
|
|
|
# - Disables root login
|
|
|
|
# - Installs Common packages
|
|
|
|
# - Starts Consul client agent
|
|
|
|
#
|
|
|
|
# This is run on every newly provisioned host.
|
|
|
|
#
|
2021-05-10 13:29:38 +00:00
|
|
|
- name: Verify Ansible versions
|
|
|
|
hosts: all
|
|
|
|
tags: always
|
|
|
|
become: false
|
|
|
|
run_once: true
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- local_action: command ./versioncheck.py
|
|
|
|
changed_when: false
|
|
|
|
|
2019-03-21 11:00:53 +00:00
|
|
|
- name: Bootstrap Python support for Ansible
|
2021-02-09 19:27:13 +00:00
|
|
|
become: true
|
2019-03-21 11:00:53 +00:00
|
|
|
hosts: all
|
2022-02-08 19:51:45 +00:00
|
|
|
serial: '{{ serial|default(1) }}'
|
2019-03-21 11:00:53 +00:00
|
|
|
roles:
|
2021-10-12 15:14:47 +00:00
|
|
|
- role: infra-role-bootstrap-linux/raw
|
|
|
|
when: ansible_system == 'Linux'
|
2019-03-21 11:00:53 +00:00
|
|
|
|
|
|
|
- name: Bootstrap admin users and Consul
|
2021-02-09 19:27:13 +00:00
|
|
|
become: true
|
2019-03-21 11:00:53 +00:00
|
|
|
hosts: all
|
2022-02-08 19:51:45 +00:00
|
|
|
serial: '{{ serial|default(1) }}'
|
2019-03-21 11:00:53 +00:00
|
|
|
roles:
|
2021-10-12 15:14:47 +00:00
|
|
|
- role: infra-role-bootstrap-linux
|
|
|
|
when: ansible_system == 'Linux'
|
|
|
|
|
|
|
|
- role: infra-role-bootstrap-macos
|
|
|
|
when: ansible_system == 'Darwin'
|
|
|
|
|
|
|
|
- role: infra-role-bootstrap-windows
|
2021-11-25 19:00:52 +00:00
|
|
|
when: ansible_system == 'Win32NT'
|
2021-10-12 15:14:47 +00:00
|
|
|
vars: { fact_path: 'C:/ansible/facts.d' }
|