This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: "Ensure that virtual machine exists in VMC SDDC" | |
vmware_guest: | |
datacenter: "SDDC-Datacenter" | |
hostname: "{{ vsphere_server }}" | |
username: "{{ vsphere_user }}" | |
password: "{{ vsphere_password }}" | |
validate_certs: no | |
folder: "/SDDC-Datacenter/vm/Workloads" | |
name: "ansible-test-rhel-Demo1" | |
annotation: "This is a test VM created by Ansible" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x in range(1, 101): | |
if (x % 5 == 0) and (x % 3 == 0): | |
print('FizzBuzz') | |
elif x % 5 == 0: #means x is exactly divisible by 5, therefor it is a multiple of 5 | |
print('Buzz') | |
elif x % 3 == 0: | |
print('Fizz') | |
else: | |
print(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"clientName": "BobSmith", | |
"clientID": "22oi5qjafaflklkjklajlf", | |
"postconf": "CanvasCatalog", | |
"group": "MRH3" | |
}, | |
{ | |
"clientName": "ToddHarris", | |
"clientID": "i5qj3klq23rhljkna.nmaf", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: guarddutysignup | |
custom: | |
stage: ${opt:stage, self:provider.stage} | |
memberRoleName: CrossAccountManageGuardDutyRole #The name of the role that will be assumed in member accounts | |
provider: | |
name: aws | |
runtime: python3.6 | |
stage: dev #default stage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service Information | |
service: guarddutysignup | |
stage: dev | |
region: us-east-1 | |
stack: guarddutysignup-dev | |
resources: 36 | |
api keys: | |
mykey6: OGyJrKhQHUHNOWAYNOTSHARINGITdEpUc | |
endpoints: | |
functions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
awsaccntid = '123456789123' | |
targetrole = 'LISTCERTSSTSROLE' | |
## GET CREDENTIALS | |
def fn_assume_role(awsaccntid, targetrole): | |
client = boto3.client('sts') | |
response = client.assume_role( | |
RoleArn="arn:aws:iam::" + awsaccntid + ":role/" + targetrole, |
OlderNewer