From 975f66f2eebe9dadba04f275774d4ab83f74cf25 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:04:41 +0200 Subject: Adding upstream version 7.7.0+dfsg. Signed-off-by: Daniel Baumann --- .../playbooks/cpm_interface/interface_config.yml | 31 ++++++++++++++++++++++ .../playbooks/cpm_interface/interface_info.yml | 26 ++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 ansible_collections/wti/remote/playbooks/cpm_interface/interface_config.yml create mode 100644 ansible_collections/wti/remote/playbooks/cpm_interface/interface_info.yml (limited to 'ansible_collections/wti/remote/playbooks/cpm_interface') diff --git a/ansible_collections/wti/remote/playbooks/cpm_interface/interface_config.yml b/ansible_collections/wti/remote/playbooks/cpm_interface/interface_config.yml new file mode 100644 index 000000000..439b618a0 --- /dev/null +++ b/ansible_collections/wti/remote/playbooks/cpm_interface/interface_config.yml @@ -0,0 +1,31 @@ +# ansible-playbook ./interface_config.yml -e ansible_hosts=nameofhost +- name: Set Network Interface parameters + hosts: "{{ansible_hosts}}" # pass as -e ansible_hosts=wti_demo on the commandline + collections: + - wti.remote + connection: local + gather_facts: False + + tasks: + - set_fact: use_https=True + when: use_https is undefined + - set_fact: validate_certs=True + when: validate_certs is undefined + + - cpm_interface_config: + cpm_url: "{{ansible_host}}" + cpm_username: "{{ansible_user}}" + cpm_password: "{{ansible_pw}}" + interface: "eth1" + ipv4netmask: "255.255.255.0" + ipv4gateway: "192.168.0.2" + ipv4address: "192.168.0.16" + negotiation: 0 + ipv4dhcpenable: 0 + use_https: "{{use_https}}" + validate_certs: "{{validate_certs}}" + + register: testout + - name: dump test output + debug: + msg: "{{ testout['data'] }}" diff --git a/ansible_collections/wti/remote/playbooks/cpm_interface/interface_info.yml b/ansible_collections/wti/remote/playbooks/cpm_interface/interface_info.yml new file mode 100644 index 000000000..9b967f47c --- /dev/null +++ b/ansible_collections/wti/remote/playbooks/cpm_interface/interface_info.yml @@ -0,0 +1,26 @@ +# ansible-playbook ./interface_info.yml -e ansible_hosts=nameofhost +- name: Get Network Interface parameters + hosts: "{{ansible_hosts}}" # pass as -e ansible_hosts=wti_demo on the commandline + collections: + - wti.remote + connection: local + gather_facts: False + + tasks: + - set_fact: use_https=True + when: use_https is undefined + - set_fact: validate_certs=True + when: validate_certs is undefined + + - cpm_interface_info: + cpm_url: "{{ansible_host}}" + cpm_username: "{{ansible_user}}" + cpm_password: "{{ansible_pw}}" + interface: "eth0" + use_https: "{{use_https}}" + validate_certs: "{{validate_certs}}" + + register: testout + - name: dump test output + debug: + msg: "{{ testout['data'] }}" -- cgit v1.2.3