- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |
def clixml(a, top=True): | |
import xml.etree.ElementTree as ET | |
if top: | |
objects = ET.Element('Objects') | |
obj = clixml(a, top=False) | |
obj.tag = 'Object' | |
objects.append(obj) | |
return ET.tostring(objects) | |
elif a is None: | |
return ET.Element('Property') |
function Invoke-PsExec { | |
<# | |
.SYNOPSIS | |
This function is a rough port of Metasploit's psexec functionality. | |
It utilizes Windows API calls to open up the service manager on | |
a remote machine, creates/run a service with an associated binary | |
path or command, and then cleans everything up. | |
Either a -Command or a custom -ServiceEXE can be specified. | |
For -Commands, a -ResultsFile can also be specified to retrieve the |
function Update-Manifest { | |
#.Synopsis | |
# Update a PowerShell module manifest | |
#.Description | |
# By default Update-Manifest increments the ModuleVersion, but it can set any key in the Module Manifest, its PrivateData, or the PSData in PrivateData. | |
# | |
# NOTE: This cannot currently create new keys, or uncomment keys. | |
#.Example | |
# Update-Manifest .\Configuration.psd1 | |
# |
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
{ | |
"Id": "ActionTemplates-62", | |
"Name": "OctoPS", | |
"Description": "A PowerShell host implementation with flexible stream redirection.\n\nThe step parameters may be used to set values for the preference variables. The ErrorActionPreference variable is set to Continue by default for all scripts executing within the host.\n\nPreference variables may be set within scripts, overriding any settings defined by the step. Additional output may be requested using the individual parameters for each stream (for example, the Verbose parameter).\n\n**Limitations and known issues**\n\n- Write-Host is not supported except in PowerShell 5 as a wrapper for Write-Information.\n- Several of the IIS commands (Stop-WebSite, Stop-WebAppPool) appear to break the output streams used by the host.", | |
"ActionType": "Octopus.Script", | |
"Version": 13, | |
"CommunityActionTemplateId": null, | |
"Properties": { | |
"Octopus.Action.Script.Syntax": "PowerShell", | |
"Octopus.Action.Script.ScriptSource": "Inline", |
using namespace System.Net.Http | |
#requires -version 7.2 | |
# This is the bootstrap script for Modules | |
[CmdletBinding(PositionalBinding = $false)] | |
param ( | |
#Specify a specific release to use, otherwise 'latest' is used | |
[string]$Release = 'latest', | |
#Specify the user | |
[string]$User = 'JustinGrote', | |
#Specify the repo |
function Show-Notification { | |
[cmdletbinding()] | |
Param ( | |
[string] | |
$ToastTitle, | |
[string] | |
[parameter(ValueFromPipeline)] | |
$ToastText | |
) |