Added this repo
This commit is contained in:
9
ansible/playbooks/os-ipxe-vmware-deploy.yml
Normal file
9
ansible/playbooks/os-ipxe-vmware-deploy.yml
Normal 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
|
22
ansible/playbooks/os-linux-apt-update.yml
Normal file
22
ansible/playbooks/os-linux-apt-update.yml
Normal 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"
|
15
ansible/playbooks/os-ping-test.yml
Normal file
15
ansible/playbooks/os-ping-test.yml
Normal 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 }} )"
|
||||
|
||||
|
28
ansible/playbooks/vmware_tmp/vm_get_info.yml
Normal file
28
ansible/playbooks/vmware_tmp/vm_get_info.yml
Normal 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 }}"
|
26
ansible/playbooks/vmware_tmp/vm_guest_info.yml
Normal file
26
ansible/playbooks/vmware_tmp/vm_guest_info.yml
Normal 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 }}"
|
||||
|
Reference in New Issue
Block a user