v0.0.1
This commit is contained in:
53
tasks/main.yml
Normal file
53
tasks/main.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
# tasks file for ericomeehan.debian
|
||||
- name: Update apt
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Install debconf-utils
|
||||
when: is_new_host == true
|
||||
apt:
|
||||
name: debconf-utils
|
||||
state: present
|
||||
|
||||
- name: Create preseed file
|
||||
when: is_new_host == true
|
||||
shell: echo "#_preseed_V1" > /root/preseed.txt
|
||||
|
||||
- name: Append installer's debconf database to the preseed file
|
||||
when: is_new_host == true
|
||||
shell: debconf-get-selections --installer >> /root/preseed.txt
|
||||
|
||||
- name: Append debconf database to the preseed file
|
||||
when: is_new_host == true
|
||||
shell: debconf-get-selections >> /root/preseed.txt
|
||||
|
||||
- name: Append text from files/motd to the beginning of remote motd file
|
||||
when: is_new_host == true
|
||||
blockinfile:
|
||||
path: /etc/motd
|
||||
marker: ""
|
||||
block: |
|
||||
{{ lookup('file', 'files/motd') }}
|
||||
|
||||
- name: Copy nftables configuration template
|
||||
template:
|
||||
src: "nftables.conf.j2"
|
||||
dest: /etc/nftables.conf
|
||||
|
||||
- name: Enable nftables
|
||||
service:
|
||||
name: nftables
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Install prometheus node exporter
|
||||
apt:
|
||||
name: prometheus-node-exporter
|
||||
state: present
|
||||
|
||||
- name: Enable prometheus node exporter
|
||||
service:
|
||||
name: prometheus-node-exporter
|
||||
state: started
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user