Files
noofac-snackpot/bootstrap.yml
Nick Stokoe 04b0d30929 bootstrap.yml - target python3
Ubuntu fossa seems not to have the packages we want for python 2
2021-02-07 12:47:53 +00:00

35 lines
874 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: has_apt.rc == 127
- import_playbook: bootstrap-debian.yml
when: has_apt.rc != 127
# 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