generated from GamingChaos/ansible-repository-template
create a snapshot before the update starts
This commit is contained in:
parent
e35c1cbf3c
commit
21b3b528cf
4
inventory/group_vars/sites/proxmox.yml
Normal file
4
inventory/group_vars/sites/proxmox.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
proxmox_api_host: rimeru.stuyckv.local
|
||||
proxmox_api_user: ansible@pve
|
||||
proxmox_api_token_id: ansible
|
||||
9
inventory/group_vars/sites/vault.yml
Normal file
9
inventory/group_vars/sites/vault.yml
Normal file
@ -0,0 +1,9 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
66393831316666346565393032333961373365346633643730386661616332356431653331396334
|
||||
3633373066646165636639646462376338366665376561650a643530306339666436323130383737
|
||||
36373532623435336466386433326664356537326137363537343133323739343732383565346336
|
||||
6630636236363261610a646336613436323462663339313364393833653539653238666437623261
|
||||
65383864346165623730363136353838396131643962393134366362393266356365396231633064
|
||||
65366631653437626666343465383338383637373139353130623961316662353431313037303834
|
||||
36356131323233613461333163303537306635343065663435333961376264316235643335323661
|
||||
36336331336537343432
|
||||
@ -1,3 +1,5 @@
|
||||
checkmk_sites:
|
||||
- local
|
||||
- dev
|
||||
- dev
|
||||
|
||||
vmid: 101
|
||||
|
||||
@ -23,6 +23,21 @@
|
||||
ansible.builtin.debug:
|
||||
var: checkmk_version.stdout
|
||||
|
||||
- name: Snapshot VM before update
|
||||
become: false
|
||||
delegate_to: localhost
|
||||
community.proxmox.proxmox_snap:
|
||||
api_host: "{{ proxmox_api_host }}"
|
||||
api_user: "{{ proxmox_api_user }}"
|
||||
api_token_id: "{{ proxmox_api_token_id }}"
|
||||
api_token_secret: "{{ proxmox_api_token_secret }}"
|
||||
validate_certs: false
|
||||
hostname: "{{ inventory_hostname_short }}"
|
||||
snapname: "checkmk_{{ checkmk_version.stdout | replace('.', '_') | replace('-', '_') }}"
|
||||
description: "Pre-update snapshot before checkmk {{ checkmk_version.stdout }}"
|
||||
timeout: 120
|
||||
state: present
|
||||
|
||||
- name: Install new checkmk version
|
||||
vars:
|
||||
filename: "check-mk-raw-{{ checkmk_version.stdout }}_0.{{ ansible_facts.lsb.codename }}_amd64.deb"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user