Added this repo

This commit is contained in:
2024-09-19 13:29:35 +03:00
commit 5ae5fe2586
47 changed files with 1265 additions and 0 deletions

View File

@ -0,0 +1,9 @@
---
- hosts: "{{ ipxe_target }}"
become: false
gather_facts: false
vars_files:
- /root/.secret/.ansible/vars_creds.yml
roles:
- os-ipxe-vmware-deploy

View File

@ -0,0 +1,22 @@
---
- hosts: "{{ hosts_target }}"
become: false
gather_facts: true
vars_files:
- /root/.secret/.ansible/vars_creds.yml
tasks:
- name: Upgrage system type of Debian
block:
- name: Run "apt update" and "apt upgrade"
ansible.builtin.apt:
upgrade: yes
update_cache: yes
- name: Run "apt autoremove"
ansible.builtin.apt:
autoremove: yes
- name: Run "apt-get clean"
ansible.builtin.apt:
clean: yes
when: ansible_facts['distribution'] == "Debian"

View File

@ -0,0 +1,15 @@
---
- hosts: "{{ hosts_target }}"
become: false
gather_facts: true
vars_files:
- /root/.secret/.ansible/vars_creds.yml
tasks:
- name: Debug
debug:
# var: ansible_facts
msg: " It is {{ansible_facts['distribution'] }} {{ ansible_facts.distribution_major_version }} ( {{ ansible_facts.distribution_release }} )"

View File

@ -0,0 +1,28 @@
---
- name: Get info VM
hosts: localhost
become: false
gather_facts: false
vars:
vars_name: "dc01-ftpsrv01-it-infr.lab.loc"
# vars_name: "debian12-common-templ"
vars_files:
- /root/.secret/.ansible/vars_creds.yml
tasks:
- name: Get info VM
community.vmware.vmware_vm_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ vcenter_validate_certs }}"
# datacenter: "{{ vcenter_datacenter }}"
vm_name: "{{ vars_name }}"
# vm_type: template
delegate_to: localhost
register: info_vm
- name: Print info {{ vars_name }}
debug:
msg: "{{ info_vm }}"

View File

@ -0,0 +1,26 @@
---
- name: Get info VM
hosts: localhost
become: false
gather_facts: false
vars:
vars_name: "dc01-ftpsrv01-it-infr.lab.loc"
# vars_name: "debian12-common-templ"
vars_files:
- /root/.secret/.ansible/vars_creds.yml
tasks:
- name: Get info VM
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ vcenter_validate_certs }}"
datacenter: "{{ vcenter_datacenter }}"
name: "{{ vars_name }}"
delegate_to: localhost
register: gather_info_vm
- name: Print info {{ vars_name }}
msg: "{{ gather_info_vm }}"