forked from bitlair/ansible
Remove is_vm, include vm.yaml
This commit is contained in:
parent
0507d01bc6
commit
705d2fcd23
6 changed files with 14 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: debian
|
- hosts: debian
|
||||||
|
gather_facts: true
|
||||||
roles:
|
roles:
|
||||||
- common
|
- common
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
is_vm: true
|
|
||||||
|
|
||||||
ansible_user: root
|
ansible_user: root
|
||||||
ansible_python_interpreter: auto_silent
|
ansible_python_interpreter: auto_silent
|
||||||
notify_email: bestuur@bitlair.nl
|
notify_email: bestuur@bitlair.nl
|
||||||
|
|
|
@ -5,8 +5,6 @@ root_access:
|
||||||
- foobar
|
- foobar
|
||||||
- polyfloyd
|
- polyfloyd
|
||||||
|
|
||||||
is_vm: false
|
|
||||||
|
|
||||||
music_domain: music.bitlair.nl
|
music_domain: music.bitlair.nl
|
||||||
acme_san_domains:
|
acme_san_domains:
|
||||||
- [ music.bitlair.nl ]
|
- [ music.bitlair.nl ]
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
ssh_port: "22"
|
ssh_port: "22"
|
||||||
is_vm: false
|
|
||||||
unattended_upgrades_auto_reboot_time: "04:00"
|
unattended_upgrades_auto_reboot_time: "04:00"
|
||||||
unattended_upgrades_extra_origin_patterns: []
|
unattended_upgrades_extra_origin_patterns: []
|
||||||
trusted_ranges:
|
trusted_ranges:
|
||||||
|
|
|
@ -31,24 +31,26 @@
|
||||||
when: root_access is defined and root_access
|
when: root_access is defined and root_access
|
||||||
tags: authorized_keys
|
tags: authorized_keys
|
||||||
|
|
||||||
- tags: network
|
- name: Import network tasks
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: network.yaml
|
file: network.yaml
|
||||||
|
tags: network
|
||||||
|
|
||||||
- tags: node-exporter
|
- name: Import node-exporter
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: node-exporter.yaml
|
file: node-exporter.yaml
|
||||||
|
tags: node-exporter
|
||||||
|
|
||||||
- tags: vm
|
- name: Import vm tasks
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: node-exporter.yaml
|
file: vm.yaml
|
||||||
when: is_vm
|
tags: vm
|
||||||
|
|
||||||
- name: Remove debian-packages we don't want
|
- name: Remove debian-packages we don't want
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
state: absent
|
state: absent
|
||||||
autoremove: true
|
autoremove: true
|
||||||
pkg: {{ debian_packages_unwanted|default([]) }}
|
pkg: "{{ debian_packages_unwanted|default([]) }}"
|
||||||
|
|
||||||
- name: Install standard packages
|
- name: Install standard packages
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
- name: Install guest agent
|
- name: Install guest agent
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: qemu-guest-agent
|
name: qemu-guest-agent
|
||||||
|
when: ansible_virtualization_role|default(false) == 'guest'
|
||||||
|
tags:
|
||||||
|
- questagent
|
||||||
|
|
||||||
- name: Serial Console
|
- name: Serial Console
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
|
@ -11,5 +14,5 @@
|
||||||
notify:
|
notify:
|
||||||
- update grub
|
- update grub
|
||||||
- reboot
|
- reboot
|
||||||
|
tags:
|
||||||
- ansible.builtin.meta: flush_handlers
|
- questagent
|
||||||
|
|
Loading…
Add table
Reference in a new issue