-
Notifications
You must be signed in to change notification settings - Fork 1
/
snow_azure_cmdb_update.yml
39 lines (36 loc) · 1.08 KB
/
snow_azure_cmdb_update.yml
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
29
30
31
32
33
34
35
36
37
38
39
---
- name: ServiceNow Notification
hosts: all
connection: local
gather_facts: no
tasks:
# - name: Show all hosts
# debug:
# msg: "{{ item }}"
# loop: "{{ ansible_play_batch }}"
- name: Update ServiceNow CMDB
snow_record:
username: "{{ snow_username }}"
password: "{{ snow_password }}"
instance: "{{ snow_instance }}"
state: present
table: cmdb_ci_linux_server
lookup_field: comments
number: "{{ vmid }}"
data:
asset_tag: "{{ computer_name }}"
name: "{{ computer_name }}"
cost_center: Engineering
os_version: 7.5.201808150
location: "{{ location }}"
mac_address: "{{ mac_address }}"
short_description: Provisioned for EA demo
comments: "{{ vmid }}"
change_control: Project Mgmt
os: Linux Red Hat
model_id: Iris 5875
ip_address: "{{ ansible_host }}"
company: ACME Australia
assigned_to: Brian Stinehart
cost: 56,000,000
register: snow_var