first commit

This commit is contained in:
root
2024-07-12 12:58:40 +02:00
commit 30fdad3be5
557 changed files with 11142 additions and 0 deletions

41
hp.yml Normal file
View File

@@ -0,0 +1,41 @@
---
- name: VLAN Automation with Ansible on HP Com7 Devices
hosts: switches
gather_facts: no
connection: local
tasks:
# - name: ensure VLAN 10 exists
# comware_vlan:
# vlanid: 10
# name: VLAN10_WEB
# descr: LOCALSEGMENT
# username: "{{ username }}"
# password: "{{ password }}"
# hostname: "{{ inventory_hostname }}"
- name: get gather_facts
comware_facts:
username: "acladmin"
password: "0V0FKgngLeLqkPvklm9S"
hostname: "{{ inventory_hostname }}"
- name: enable acl
comware_acl:
aclid: "{{ aclid }}"
state: "{{ state }}"
groupcg: advanced
name: "{{interface}}"
appdirec: "{{ appdirec }}"
username: "acladmin"
password: "0V0FKgngLeLqkPvklm9S"
hostname: "{{ inventory_hostname }}"
- name: save running config
comware_save:
username: "{{ username }}"
password: "{{ password }}"
hostname: "{{ inventory_hostname }}"