[add update]

This commit is contained in:
2025-07-28 22:33:47 +02:00
parent 1cdfbfe8bd
commit a530906f99

View File

@@ -1,32 +1,25 @@
- hosts: all
# vars:
# become: true
gather_facts: false
vars:
user: staffadmin
username: jingohalert
password: !vault |
$ANSIBLE_VAULT;1.2;AES256;prod
66346630333538386564396632636161316239326530653037666465616165393135666532643264
3037363865363531636635306535663736353734333733340a363639636638396662616538343335
65366439343135636634393832636436353764303066653530346232323164376265313039373630
3863613961373430340a303866363962353262623030373061616134303366336237346631383539
3130
become: true
tasks:
# stephane ALL=(ALL) NOPASSWD: ALL or need ansible_sudo_pass
- apt:
- ansible.builtin.apt:
update_cache: yes
become: true
# when:
# - inventory_hostname != 'scaleway'
- ansible.builtin.apt:
name: "*"
state: latest
- apt:
- ansible.builtin.apt:
upgrade: safe
become: true
- ansible.builtin.apt:
clean: yes
# when:
# - inventory_hostname != 'scaleway'
@@ -50,19 +43,19 @@
# - reboot_needed.stdout == "reboot_needed"
# become: true
- uri:
url: "https://alert.jingoh.fr/scaleway"
method: POST
user: "{{ username }}"
password: "{{ password }}"
headers:
Title: "update {{ ansible_play_hosts }}"
ta: "file_folder"
body: "Updated and Upgraded !"
status_code: 200
delegate_to: localhost
tags: toto
run_once: true
# - uri:
# url: "https://alert.jingoh.fr/scaleway"
# method: POST
# user: "{{ username }}"
# password: "{{ password }}"
# headers:
# Title: "update {{ ansible_play_hosts }}"
# ta: "file_folder"
# body: "Updated and Upgraded !"
# status_code: 200
# delegate_to: localhost
# tags: toto
# run_once: true