dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
The security group and Network ACLs parts of CloudFormation templates can be difficult to read. This template containing Jinja macros converts easier-to-read YAML dictionaries of security group and NACL rules into JSON.
Here ais a generic macro template and some example files showing how to use it.
- cloudformation.macros.j2 - the macros
- cf_vars.yml - YAML dictionaly of security groups and NACLs, including some complex rules for both
- test.template.j2 - a simple CloudFormation template that uses the macro file
- cf_test.yml - a simple Ansible playbook that generates CloudFormation JSON from thr previous file.
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
The problem: | |
I wanted to use the jinja 'map' filter to modify each item in a string, in this simple | |
example, adding '.conf' to each item. | |
The 'format' filter in jinja takes arguments (value, *args, **kwargs). Unfortunately, | |
it uses 'value' as the pattern. When called inside map 'value' is the current item in | |
the list, or in other words *args as far as format is concerned. So it's the wrong way | |
around. |
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
#%RAML 0.8 | |
title: World Music API | |
baseUri: http://example.api.com/{version} | |
version: v1 | |
schemas: | |
- halLink: | | |
{ "$schema": "http://json-schema.org/schema", | |
"type": "object", | |
"description": "a Hypertext Application Language link", |