Files
noofac-snackpot/bootstrap.yml
2021-02-07 12:47:53 +00:00

35 lines
858 B
YAML

---
- name: bootstrap fact gathering
hosts: all
user: root
gather_facts: False
# Probe the system for package management type
tasks:
- name: check package management
action: raw apt-get
ignore_errors: yes
register: has_apt
# For now we don't support other package management systems!
- name: fail if no apt package management
fail:
msg: We currently only support Linux with apt
when: not has_apt
- import_playbook: bootstrap-debian.yml
when: has_apt
# Maybe add these somewhere later.
# # Needs to be included before sshd, since root needs to have a key installed
# # before sshd port changes when bootstrapping
# - role: ssh-key
# ssh_key_user: root
# ssh_key_pubfile: "{{userdefs.root.pubkey}}"
# - role: sshd
# sshd_port: "{{sshd.port}}"
# # ... moves port