[libvirt] [jenkins-ci PATCH 1/5] guests: Add .j2 extension to existing templates

Andrea Bolognani posted 5 patches 6 years, 11 months ago
[libvirt] [jenkins-ci PATCH 1/5] guests: Add .j2 extension to existing templates
Posted by Andrea Bolognani 6 years, 11 months ago
By convention, Jinja2 templates should use the .j2 extension.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 guests/tasks/users.yml                             | 2 +-
 guests/templates/{bash_profile => bash_profile.j2} | 0
 guests/templates/{bashrc => bashrc.j2}             | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename guests/templates/{bash_profile => bash_profile.j2} (100%)
 rename guests/templates/{bashrc => bashrc.j2} (100%)

diff --git a/guests/tasks/users.yml b/guests/tasks/users.yml
index 033ca2a..7b37842 100644
--- a/guests/tasks/users.yml
+++ b/guests/tasks/users.yml
@@ -98,7 +98,7 @@
 
 - name: '{{ flavor }}: Create shell profile'
   template:
-    src: templates/{{ item }}
+    src: templates/{{ item }}.j2
     dest: /home/{{ flavor }}/.{{ item }}
     owner: '{{ flavor }}'
     group: '{{ flavor }}'
diff --git a/guests/templates/bash_profile b/guests/templates/bash_profile.j2
similarity index 100%
rename from guests/templates/bash_profile
rename to guests/templates/bash_profile.j2
diff --git a/guests/templates/bashrc b/guests/templates/bashrc.j2
similarity index 100%
rename from guests/templates/bashrc
rename to guests/templates/bashrc.j2
-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 1/5] guests: Add .j2 extension to existing templates
Posted by Daniel P. Berrangé 6 years, 11 months ago
On Mon, May 21, 2018 at 06:53:23PM +0200, Andrea Bolognani wrote:
> By convention, Jinja2 templates should use the .j2 extension.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  guests/tasks/users.yml                             | 2 +-
>  guests/templates/{bash_profile => bash_profile.j2} | 0
>  guests/templates/{bashrc => bashrc.j2}             | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename guests/templates/{bash_profile => bash_profile.j2} (100%)
>  rename guests/templates/{bashrc => bashrc.j2} (100%)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list