summaryrefslogtreecommitdiffstats
path: root/ansible_collections/wti/remote/playbooks/cpm_plugconfig/plug_info.yml
blob: 25bb39fec19f02459aab11b9b5f56265d24d7d07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ansible-playbook ./plug_info.yml -e ansible_hosts=nameofhost
- name: Get Plug 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

  - name: run Get Plug Parameters of plug 1
    cpm_plugconfig:
      cpm_action: "getplugconfig"
      cpm_url: "{{ansible_host}}"
      cpm_username: "{{ansible_user}}"
      cpm_password: "{{ansible_pw}}"
      plug_id: "1"
      use_https: "{{use_https}}"
      validate_certs: "{{validate_certs}}"

    register: testout
  - name: dump test output
    debug:
      msg: "{{ testout['data'] }}"