diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:04:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:04:41 +0000 |
commit | 975f66f2eebe9dadba04f275774d4ab83f74cf25 (patch) | |
tree | 89bd26a93aaae6a25749145b7e4bca4a1e75b2be /ansible_collections/wti/remote/playbooks/cpm_hostname | |
parent | Initial commit. (diff) | |
download | ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.tar.xz ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.zip |
Adding upstream version 7.7.0+dfsg.upstream/7.7.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/wti/remote/playbooks/cpm_hostname')
-rw-r--r-- | ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_config.yml | 28 | ||||
-rw-r--r-- | ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_info.yml | 25 |
2 files changed, 53 insertions, 0 deletions
diff --git a/ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_config.yml b/ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_config.yml new file mode 100644 index 000000000..435d0f211 --- /dev/null +++ b/ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_config.yml @@ -0,0 +1,28 @@ +# ansible-playbook ./hostname_config.yml -e ansible_hosts=youransibledefinedhostnames +- name: Set Hostname (Site ID), Location, Asset Tag 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_hostname_config: + cpm_url: "{{ansible_host}}" + cpm_username: "{{ansible_user}}" + cpm_password: "{{ansible_pw}}" + use_https: "{{use_https}}" + validate_certs: "{{validate_certs}}" + hostname: "newhostname" + location: "newlocation" + assettag: "newassettag" + + register: testout + - name: dump test output + debug: + msg: "{{ testout['data'] }}" diff --git a/ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_info.yml b/ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_info.yml new file mode 100644 index 000000000..878228298 --- /dev/null +++ b/ansible_collections/wti/remote/playbooks/cpm_hostname/hostname_info.yml @@ -0,0 +1,25 @@ +# ansible-playbook ./hostname_info.yml -e ansible_hosts=youransibledefinedhostnames +- name: Get Hostname (Site ID), Location, Asset Tag 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_hostname_info: + cpm_url: "{{ansible_host}}" + cpm_username: "{{ansible_user}}" + cpm_password: "{{ansible_pw}}" + use_https: "{{use_https}}" + validate_certs: "{{validate_certs}}" + + register: testout + - name: dump test output + debug: + msg: "{{ testout['data'] }}" |