文件操作 - ucs_vlan_to_group.yml
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3.12/site-packages/ansible_collections/cisco/ucs/playbooks/ucs_vlan_to_group.yml
编辑文件内容
--- # Example Playbook: cisco.ucs.ucs_vlan_to_group - hosts: ucs connection: local gather_facts: false tasks: - name: Test that we have a UCS hostname, UCS username, and UCS password fail: msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.' when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined vars: # use "<<: *login_info" to substite the information below in each task # this is not required, however it makes the playbook shorter. login_info: &login_info hostname: "{{ ucs_hostname }}" username: "{{ ucs_username }}" password: "{{ ucs_password }}" - name: Add VLAN to existing VLAN group cisco.ucs.ucs_vlan_to_group: <<: *login_info vlangroup: inband vlanname: vlan244 delegate_to: localhost
修改文件时间
将文件时间修改为当前时间的前一年
删除文件