1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

win_wakeonlan: Fix pslint issues (#37717)

This commit is contained in:
Dag Wieers 2018-03-21 23:45:17 +01:00 committed by GitHub
parent c73ee8aac8
commit f78b415db0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 20 deletions

View file

@ -1,23 +1,10 @@
#!powershell #!powershell
# This file is part of Ansible # -*- coding: utf-8 -*-
#
# (c) 2017, Dag Wieers <dag@wieers.com>
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON # Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
# POWERSHELL_COMMON # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
@ -47,7 +34,7 @@ if ($mac.Length -ne 12) {
# Create payload for magic packet # Create payload for magic packet
# TODO: Catch possible conversion errors # TODO: Catch possible conversion errors
$target = 0,2,4,6,8,10 | % { [convert]::ToByte($mac.Substring($_, 2), 16) } $target = 0,2,4,6,8,10 | ForEach-Object { [convert]::ToByte($mac.Substring($_, 2), 16) }
$data = (,[byte]255 * 6) + ($target * 20) $data = (,[byte]255 * 6) + ($target * 20)
# Broadcast payload to network # Broadcast payload to network

View file

@ -113,7 +113,6 @@ lib/ansible/modules/windows/win_unzip.ps1 PSUseApprovedVerbs
lib/ansible/modules/windows/win_uri.ps1 PSAvoidUsingConvertToSecureStringWithPlainText lib/ansible/modules/windows/win_uri.ps1 PSAvoidUsingConvertToSecureStringWithPlainText
lib/ansible/modules/windows/win_user.ps1 PSAvoidUsingCmdletAliases lib/ansible/modules/windows/win_user.ps1 PSAvoidUsingCmdletAliases
lib/ansible/modules/windows/win_wait_for.ps1 PSAvoidUsingEmptyCatchBlock lib/ansible/modules/windows/win_wait_for.ps1 PSAvoidUsingEmptyCatchBlock
lib/ansible/modules/windows/win_wakeonlan.ps1 PSAvoidUsingCmdletAliases
lib/ansible/modules/windows/win_webpicmd.ps1 PSAvoidUsingInvokeExpression lib/ansible/modules/windows/win_webpicmd.ps1 PSAvoidUsingInvokeExpression
lib/ansible/modules/windows/win_webpicmd.ps1 PSUseOutputTypeCorrectly lib/ansible/modules/windows/win_webpicmd.ps1 PSUseOutputTypeCorrectly
test/integration/targets/win_audit_rule/library/test_get_audit_rule.ps1 PSAvoidUsingCmdletAliases test/integration/targets/win_audit_rule/library/test_get_audit_rule.ps1 PSAvoidUsingCmdletAliases