From 6bc49768f463b635f98fae94ba67add92af25cdd Mon Sep 17 00:00:00 2001 From: Shankar Mounesh Date: Sun, 12 Jun 2022 16:43:47 +0530 Subject: [PATCH] ansible config --- files/pve-enterprise.list | 1 + files/sources.list | 10 ++++++++++ proxmox.yml | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 files/pve-enterprise.list create mode 100644 files/sources.list create mode 100644 proxmox.yml diff --git a/files/pve-enterprise.list b/files/pve-enterprise.list new file mode 100644 index 0000000..2fb66ce --- /dev/null +++ b/files/pve-enterprise.list @@ -0,0 +1 @@ +# deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise \ No newline at end of file diff --git a/files/sources.list b/files/sources.list new file mode 100644 index 0000000..fd34256 --- /dev/null +++ b/files/sources.list @@ -0,0 +1,10 @@ +deb http://ftp.debian.org/debian bullseye main contrib + +deb http://ftp.debian.org/debian bullseye-updates main contrib + +# security updates +deb http://security.debian.org/debian-security bullseye-security main contrib + +# PVE pve-no-subscription repository provided by proxmox.com, +# NOT recommended for production use +deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription \ No newline at end of file diff --git a/proxmox.yml b/proxmox.yml new file mode 100644 index 0000000..0559cf3 --- /dev/null +++ b/proxmox.yml @@ -0,0 +1,33 @@ +--- + +- hosts: localhost + connection: localhost + become: true + + pre_tasks: + + - name: change sorces.list file + copy: + src: files/sources.list + dest: /etc/apt/sources.list + owner: root + group: root + + - name: change sorces.list file + copy: + src: files/pve-enterprise.list + dest: /etc/apt/sources.list.d/pve-enterprise.list + owner: root + group: root + + tasks: + + - name: update package cache + apt: update_cache=yes + + - name: dist upgrade + apt: upgrade=dist + + - name: Unconditionally reboot the machine with all defaults + reboot: + reboot_command: reboot