[lxc-devel] [distrobuilder/master] profiles to correctly formatted yml

graysky2 on Github lxc-bot at linuxcontainers.org
Sat Mar 31 21:35:26 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 309 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180331/d50b2b28/attachment.bin>
-------------- next part --------------
From 2945a963fa9280391e46f9b99c7c94aae4f5b023 Mon Sep 17 00:00:00 2001
From: graysky <graysky at archlinux.us>
Date: Sat, 31 Mar 2018 17:31:37 -0400
Subject: [PATCH] profiles to correctly formatted yml

---
 doc/examples/{alpine.md => alpine.yml}       |  4 --
 doc/examples/{archlinux.md => archlinux.yml} |  4 --
 doc/examples/{centos.md => centos.yml}       |  4 --
 doc/examples/{debian.md => debian.yml}       |  4 --
 doc/examples/{fedora.md => fedora.yml}       |  4 --
 doc/examples/ubuntu-with-base-image.yml      | 68 ++++++++++++++++++++++++
 doc/examples/{ubuntu.md => ubuntu.yml}       | 78 ----------------------------
 7 files changed, 68 insertions(+), 98 deletions(-)
 rename doc/examples/{alpine.md => alpine.yml} (97%)
 rename doc/examples/{archlinux.md => archlinux.yml} (97%)
 rename doc/examples/{centos.md => centos.yml} (98%)
 rename doc/examples/{debian.md => debian.yml} (98%)
 rename doc/examples/{fedora.md => fedora.yml} (98%)
 create mode 100644 doc/examples/ubuntu-with-base-image.yml
 rename doc/examples/{ubuntu.md => ubuntu.yml} (70%)

diff --git a/doc/examples/alpine.md b/doc/examples/alpine.yml
similarity index 97%
rename from doc/examples/alpine.md
rename to doc/examples/alpine.yml
index d4ac8fd..835d12c 100644
--- a/doc/examples/alpine.md
+++ b/doc/examples/alpine.yml
@@ -1,6 +1,3 @@
-# Alpine Linux
-
-```yaml
 image:
   distribution: alpinelinux
   release: 3.7.0
@@ -57,4 +54,3 @@ packages:
     update: true
     install:
         - neovim
-```
diff --git a/doc/examples/archlinux.md b/doc/examples/archlinux.yml
similarity index 97%
rename from doc/examples/archlinux.md
rename to doc/examples/archlinux.yml
index 45cea46..b659a8e 100644
--- a/doc/examples/archlinux.md
+++ b/doc/examples/archlinux.yml
@@ -1,6 +1,3 @@
-# Arch Linux
-
-```yaml
 image:
   distribution: archlinux
   release: 2018.03.01
@@ -59,4 +56,3 @@ packages:
   update: true
   install:
     - neovim
-```
diff --git a/doc/examples/centos.md b/doc/examples/centos.yml
similarity index 98%
rename from doc/examples/centos.md
rename to doc/examples/centos.yml
index a01bcc7..e6d69a8 100644
--- a/doc/examples/centos.md
+++ b/doc/examples/centos.yml
@@ -1,6 +1,3 @@
-# CentOS
-
-```yaml
 image:
   distribution: centos
   release: 7
@@ -92,4 +89,3 @@ actions:
     action: |-
       #!/bin/sh
       rm -rf /var/cache/yum
-```
diff --git a/doc/examples/debian.md b/doc/examples/debian.yml
similarity index 98%
rename from doc/examples/debian.md
rename to doc/examples/debian.yml
index c361c08..b6de65e 100644
--- a/doc/examples/debian.md
+++ b/doc/examples/debian.yml
@@ -1,6 +1,3 @@
-# Debian
-
-```yaml
 image:
   distribution: debian
   release: testing
@@ -59,4 +56,3 @@ packages:
 
 mappings:
   architecture_map: debian
-```
diff --git a/doc/examples/fedora.md b/doc/examples/fedora.yml
similarity index 98%
rename from doc/examples/fedora.md
rename to doc/examples/fedora.yml
index 67cb9bd..61f2c34 100644
--- a/doc/examples/fedora.md
+++ b/doc/examples/fedora.yml
@@ -1,6 +1,3 @@
-# Fedora
-
-```yaml
 image:
   distribution: fedora
   release: 28
@@ -56,4 +53,3 @@ packages:
   install:
     - systemd
     - neovim
-```
diff --git a/doc/examples/ubuntu-with-base-image.yml b/doc/examples/ubuntu-with-base-image.yml
new file mode 100644
index 0000000..d357bc3
--- /dev/null
+++ b/doc/examples/ubuntu-with-base-image.yml
@@ -0,0 +1,68 @@
+image:
+  distribution: ubuntu
+  release: artful
+  variant: default
+  description: Ubuntu {{ image.release }}
+  expiry: 30d
+  arch: amd64
+
+source:
+  downloader: ubuntu-http
+  url: http://cdimage.ubuntu.com/ubuntu-base
+  keys:
+    - 0x46181433FBB75451
+    - 0xD94AA3F0EFE21092
+
+targets:
+  lxc:
+    create-message: |
+        You just created an Ubuntu container (release={{ image.release }}, arch={{ image.architecture }}, variant={{ image.variant }})
+
+    config:
+      - type: all
+        before: 5
+        content: |-
+          lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.common.conf
+
+      - type: user
+        before: 5
+        content: |-
+          lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.userns.conf
+
+      - type: all
+        after: 4
+        content: |-
+          lxc.include = LXC_TEMPLATE_CONFIG/common.conf
+
+      - type: user
+        after: 4
+        content: |-
+          lxc.include = LXC_TEMPLATE_CONFIG/userns.conf
+
+      - type: all
+        content: |-
+          lxc.arch = {{ image.architecture_kernel }}
+
+files:
+ - path: /etc/hostname
+   generator: hostname
+
+ - path: /etc/hosts
+   generator: hosts
+
+ - path: /etc/init/lxc-tty.conf
+   generator: upstart-tty
+   releases:
+    - precise
+    - trusty
+
+packages:
+  manager: apt
+
+  update: true
+  install:
+    - systemd
+    - neovim
+
+mappings:
+  architecture_map: debian
diff --git a/doc/examples/ubuntu.md b/doc/examples/ubuntu.yml
similarity index 70%
rename from doc/examples/ubuntu.md
rename to doc/examples/ubuntu.yml
index 5d90889..e8b2b2d 100644
--- a/doc/examples/ubuntu.md
+++ b/doc/examples/ubuntu.yml
@@ -1,7 +1,3 @@
-# Ubuntu
-## With debootstrap
-
-```yaml
 image:
   distribution: ubuntu
   release: artful
@@ -154,77 +150,3 @@ actions:
 
 mappings:
   architecture_map: debian
-```
-
-## With Ubuntu base image
-
-```yaml
-image:
-  distribution: ubuntu
-  release: artful
-  variant: default
-  description: Ubuntu {{ image.release }}
-  expiry: 30d
-  arch: amd64
-
-source:
-  downloader: ubuntu-http
-  url: http://cdimage.ubuntu.com/ubuntu-base
-  keys:
-    - 0x46181433FBB75451
-    - 0xD94AA3F0EFE21092
-
-targets:
-  lxc:
-    create-message: |
-        You just created an Ubuntu container (release={{ image.release }}, arch={{ image.architecture }}, variant={{ image.variant }})
-
-    config:
-      - type: all
-        before: 5
-        content: |-
-          lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.common.conf
-
-      - type: user
-        before: 5
-        content: |-
-          lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.userns.conf
-
-      - type: all
-        after: 4
-        content: |-
-          lxc.include = LXC_TEMPLATE_CONFIG/common.conf
-
-      - type: user
-        after: 4
-        content: |-
-          lxc.include = LXC_TEMPLATE_CONFIG/userns.conf
-
-      - type: all
-        content: |-
-          lxc.arch = {{ image.architecture_kernel }}
-
-files:
- - path: /etc/hostname
-   generator: hostname
-
- - path: /etc/hosts
-   generator: hosts
-
- - path: /etc/init/lxc-tty.conf
-   generator: upstart-tty
-   releases:
-    - precise
-    - trusty
-
-packages:
-  manager: apt
-
-  update: true
-  install:
-    - systemd
-    - neovim
-
-mappings:
-  architecture_map: debian
-```


More information about the lxc-devel mailing list