Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
schemaVersion: 2.3.0
metadata:
name: ansible-snow-development
Expand All @@ -11,5 +12,5 @@ components:
cpuLimit: 2000m
env:
- name: VSCODE_DEFAULT_WORKSPACE
value: "/"
value: /
name: ansible
7 changes: 3 additions & 4 deletions roles/servicenow_ritm_retrieve_eda/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---

- name: Retrieve RITM details with retries

Check failure on line 2 in roles/servicenow_ritm_retrieve_eda/tasks/main.yml

View workflow job for this annotation

GitHub Actions / build

args[module]

missing required arguments: host found in instance

Check failure on line 2 in roles/servicenow_ritm_retrieve_eda/tasks/main.yml

View workflow job for this annotation

GitHub Actions / build

args[module]

missing required arguments: host found in instance
servicenow.itsm.api_info:
resource: sc_req_item
sysparm_query: request={{ req_sys_id }}
Expand Down Expand Up @@ -37,20 +36,20 @@
until: variable_mappings.record is defined and variable_mappings.record | length > 0
retries: 3
delay: 5
ignore_errors: true # necessary to handle if a catalog item has no variables
ignore_errors: true # necessary to handle if a catalog item has no variables

- name: Retrieve variable details in one query
servicenow.itsm.api_info:
resource: sc_item_option
sysparm_query: "sys_idIN{{ variable_mappings.record | map(attribute='sc_item_option.value') | join(',') }}"
sysparm_query: sys_idIN{{ variable_mappings.record | map(attribute='sc_item_option.value') | join(',') }}
columns: [item_option_new, value, sys_id]
register: variable_details
when: variable_mappings.record | default([]) | length > 0

- name: Retrieve variable names using item_option_new IDs
servicenow.itsm.api_info:
resource: item_option_new
sysparm_query: "sys_idIN{{ variable_details.record | map(attribute='item_option_new.value') | join(',') }}"
sysparm_query: sys_idIN{{ variable_details.record | map(attribute='item_option_new.value') | join(',') }}
columns: [sys_id, name]
register: variable_names
when: variable_details.record | default([]) | length > 0
Expand Down
4 changes: 2 additions & 2 deletions roles/servicenow_ticket/tasks/servicenow_create_logs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Get CPU Utilization # noqa no-changed-when
- name: Get CPU Utilization # noqa no-changed-when
ansible.builtin.shell: top -n 1 -b > /tmp/cpu.txt

- name: Create an incident in ServiceNow
Expand All @@ -20,7 +20,7 @@
u_vm_name: "{{ inventory_hostname | default(omit) }}"
attachments:
- path: /tmp/cpu.txt
name: "CPU Utilization Results"
name: CPU Utilization Results
register: new_incident

- name: Display incident number
Expand Down
4 changes: 2 additions & 2 deletions roles/servicenow_ticket/tasks/servicenow_update_logs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Get CPU Utilization # noqa no-changed-when
- name: Get CPU Utilization # noqa no-changed-when
ansible.builtin.shell: top -n 1 -b > /tmp/cpu.txt

- name: Update an incident in ServiceNow
Expand All @@ -16,4 +16,4 @@
comments: "{{ comment }}"
attachments:
- path: /tmp/cpu.txt
name: "CPU Utilization Results After"
name: CPU Utilization Results After
Loading