aboutsummaryrefslogtreecommitdiff
path: root/tasks/pve_configure.yaml
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-06-27 16:46:29 +0300
committerheqnx <root@heqnx.com>2025-06-27 16:46:29 +0300
commitee794c22887a93d41ccc44009b66d567712bf0a7 (patch)
tree5c82298dc7ba5e869f1f2741137f16b80f0e2996 /tasks/pve_configure.yaml
parent90a7b5ff6c387600c7a2e5732e33b36cff07deea (diff)
downloadansible-pve-host-ee794c22887a93d41ccc44009b66d567712bf0a7.tar.gz
ansible-pve-host-ee794c22887a93d41ccc44009b66d567712bf0a7.zip
added custom /etc/motd based on pvebanner, instead of /etc/issue
Diffstat (limited to 'tasks/pve_configure.yaml')
-rw-r--r--tasks/pve_configure.yaml33
1 files changed, 33 insertions, 0 deletions
diff --git a/tasks/pve_configure.yaml b/tasks/pve_configure.yaml
index c19964a..e1a22a7 100644
--- a/tasks/pve_configure.yaml
+++ b/tasks/pve_configure.yaml
@@ -99,6 +99,39 @@
dest: /root/pve-create-template.sh
mode: '0744'
+- name: deploy /usr/bin/pvebanner.bash
+ template:
+ src: pvebanner.bash
+ dest: /usr/bin/pvebanner.bash
+ owner: root
+ group: root
+ mode: '0744'
+
+- name: create /etc/systemd/system/pvebanner.service.d directory
+ file:
+ path: /etc/systemd/system/pvebanner.service.d
+ state: directory
+ mode: '0755'
+
+- name: override pvebanner.service ExecStart with pvebanner.bash
+ blockinfile:
+ path: /etc/systemd/system/pvebanner.service.d/override.conf
+ create: yes
+ block: |
+ [Service]
+ ExecStart=
+ ExecStart=/usr/bin/pvebanner.bash
+
+- name: reload systemd daemon
+ command: systemctl daemon-reload
+
+- name: restart pvebanner service
+ systemd:
+ name: pvebanner.service
+ state: restarted
+ enabled: true
+ when: ansible_service_mgr == 'systemd'
+
- name: generate secure 32-character password
set_fact:
pve_admin_user: "pveadmin@pve"