[lxc-devel] [distrobuilder/master] Yaml tweaks

stgraber on Github lxc-bot at linuxcontainers.org
Thu Feb 8 17:14:30 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 308 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180208/f6ff6165/attachment.bin>
-------------- next part --------------
From 2c49f149f2818b4422e143ead340a388b2b0e4b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 8 Feb 2018 12:12:59 -0500
Subject: [PATCH 1/2] README: Fix files section in yaml
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 README.md | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 7f4b4b3..485146e 100644
--- a/README.md
+++ b/README.md
@@ -39,18 +39,16 @@ targets:
 files:
  # lxc: Puts the LXC_NAME placeholder in place
  # lxd: Adds a template to generate the file on create and copy
- - name: hostname
-   path: /etc/hostname
+ - path: /etc/hostname
    generator: hostname
 
  # lxc: Puts the LXC_NAME placeholder in place
  # lxd: Adds a template to generate the file on create
- - name: hosts
-   path: /etc/hosts
+ - path: /etc/hosts
    generator: hosts
 
  # all: Add the upstart job to deal with ttys
- - name: /etc/init/lxc-tty.conf
+ - path: /etc/init/lxc-tty.conf
    generator: upstart-tty
    releases:
     - precise

From 14ea3f24da303f6f7461488a05e897cb4bc22b5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 8 Feb 2018 12:13:20 -0500
Subject: [PATCH 2/2] README: Add actions section to yaml
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 README.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/README.md b/README.md
index 485146e..8bf80d2 100644
--- a/README.md
+++ b/README.md
@@ -64,4 +64,21 @@ packages:
         - vim
     remove:
         - vim
+
+actions:
+    post-unpack: |-
+      #!/bin/sh
+      echo "This is run after unpacking the downloaded content"
+
+    post-update: |-
+      #!/bin/sh
+      echo "This is run after updating all packages"
+
+    post-packages: |-
+      #!/bin/sh
+      echo "This is run after installing/removing packages"
+
+    post-files: |-
+      #!/bin/sh
+      echo "This is run after running the file templates"
 ```


More information about the lxc-devel mailing list