Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible code bot recommendations #9

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 3 additions & 2 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
schemaVersion: 2.2.0
metadata:
name: ansible-snow-development
components:
- container:
args: ['tail', '-f', '/dev/null']
image: 'towerpah.shadowman.dev/devee:latest'
args: [tail, -f, /dev/null]
image: towerpah.shadowman.dev/devee:latest
memoryRequest: 256M
memoryLimit: 6Gi
cpuRequest: 250m
Expand Down
44 changes: 22 additions & 22 deletions roles/servicenow_catalog_create/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
resource: sc_category
action: post
data:
title: "Ansible Jobs"
sc_catalog: "Service Catalog"
description: "Jobs launced from AAP"
title: Ansible Jobs
sc_catalog: Service Catalog
description: Jobs launced from AAP
active: true
when: categoryresult.record | length == 0

Expand All @@ -27,22 +27,22 @@
resource: sc_cat_item
action: post
data:
name: "Provision VM"
sc_catalogs: "Service Catalog"
category: "Ansible Jobs"
name: Provision VM
sc_catalogs: Service Catalog
category: Ansible Jobs
active: true
short_description: "Deploy a new virtual machine"
short_description: Deploy a new virtual machine
when: catalogitemresult.record | length == 0

- name: Create Single Line Variable to enter VM Name
servicenow.itsm.api:
resource: item_option_new
action: post
data:
type: "Single Line Text"
cat_item: "Provision VM"
question_text: "What is your VM name?"
name: "vm_name"
type: Single Line Text
cat_item: Provision VM
question_text: What is your VM name?
name: vm_name
active: true
mandatory: true
order: 100
Expand All @@ -53,10 +53,10 @@
resource: item_option_new
action: post
data:
type: "Select Box"
cat_item: "Provision VM"
question_text: "Pick your OS"
name: "operating_system"
type: Select Box
cat_item: Provision VM
question_text: Pick your OS
name: operating_system
order: 200
active: true
mandatory: true
Expand All @@ -67,15 +67,15 @@
resource: question_choice
action: post
data:
type: "Select Box"
cat_item: "Provision VM"
question: "Pick your OS"
type: Select Box
cat_item: Provision VM
question: Pick your OS
text: "{{ item.text }}"
value: "{{ item.value }}"
order: "{{ item.order }}"
loop:
- { text: 'RHEL7', value: 'RHEL7', order: '100' }
- { text: 'RHEL8', value: 'RHEL8', order: '200' }
- { text: 'RHEL9', value: 'RHEL9', order: '300' }
- { text: 'Win2016', value: 'Win2016', order: '400' }
- { text: RHEL7, value: RHEL7, order: "100" }
- { text: RHEL8, value: RHEL8, order: "200" }
- { text: RHEL9, value: RHEL9, order: "300" }
- { text: Win2016, value: Win2016, order: "400" }
when: catalogitemresult.record | length == 0
8 changes: 4 additions & 4 deletions roles/servicenow_change_request_wait/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
servicenow.itsm.change_request:
type: normal
short_description: "{{ cr_description }}"
description: "{{ owner | default('Shadowman') }} requests {{ operating_system | default('') }} server in
{{ shadowman_provision_hypervisor | default('') }} with name {{ vm_name | default('') }} and environment {{ env | default('test') }}"
description: "{{ owner | default('Shadowman') }} requests {{ operating_system | default('') }} server in {{ shadowman_provision_hypervisor | default('') }}

Check warning on line 9 in roles/servicenow_change_request_wait/tasks/main.yml

View workflow job for this annotation

GitHub Actions / build

yaml[line-length]

Line too long (163 > 160 characters)

Check warning on line 9 in roles/servicenow_change_request_wait/tasks/main.yml

View workflow job for this annotation

GitHub Actions / build

yaml[line-length]

Line too long (163 > 160 characters)
with name {{ vm_name | default('') }} and environment {{ env | default('test') }}"
priority: high
risk: moderate
impact: low
Expand All @@ -33,8 +33,8 @@
password: "{{ EMAIL_PASSWORD }}"
port: "{{ EMAIL_PORT }}"
subject: Approval request for ServiceNow Change Request {{ request.record.number }}
body: "You have a new CR Approval request. Please click on this URL to approve:
{{ lookup('env', 'SN_HOST') }}nav_to.do?uri=change_request.do?sysparm_query=number={{ request.record.number }}"
body: "You have a new CR Approval request. Please click on this URL to approve: {{ lookup('env', 'SN_HOST') }}nav_to.do?uri=change_request.do?sysparm_query=number={{

Check warning on line 36 in roles/servicenow_change_request_wait/tasks/main.yml

View workflow job for this annotation

GitHub Actions / build

yaml[line-length]

Line too long (173 > 160 characters)

Check warning on line 36 in roles/servicenow_change_request_wait/tasks/main.yml

View workflow job for this annotation

GitHub Actions / build

yaml[line-length]

Line too long (173 > 160 characters)
request.record.number }}"
from: tower@shadowman.dev
to: "{{ to_email }}"
delegate_to: localhost
Expand Down
Loading