From nobody Wed May 14 06:50:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526921626939615.8692169273156; Mon, 21 May 2018 09:53:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B74DA7028; Mon, 21 May 2018 16:53:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25FE31779D; Mon, 21 May 2018 16:53:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D8407180B536; Mon, 21 May 2018 16:53:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4LGrahg003889 for ; Mon, 21 May 2018 12:53:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 304C8215CDAA; Mon, 21 May 2018 16:53:36 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.87]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E242215CDA7 for ; Mon, 21 May 2018 16:53:35 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 21 May 2018 18:53:24 +0200 Message-Id: <20180521165327.22427-3-abologna@redhat.com> In-Reply-To: <20180521165327.22427-1-abologna@redhat.com> References: <20180521165327.22427-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH 2/5] guests: Remove distinction between files and templates X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 21 May 2018 16:53:46 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The main difference between files and templates is that the former can can be uploaded as-is, while the latter has to go through Jinja2 first. Since the overhead of template processing is negligible, and there's a fair chance we will need to start using templating for files that currently don't need it or viceversa, let's get rid of the distinction altogether. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/tasks/base.yml | 12 ++++++------ guests/tasks/users.yml | 4 ++-- .../{files/ccache.conf =3D> templates/ccache.conf.j2} | 0 .../fedora-rawhide-kernel-nodebug.repo.j2} | 0 .../jessie-backports.preferences.j2} | 0 .../jessie-backports.sources.j2} | 0 6 files changed, 8 insertions(+), 8 deletions(-) rename guests/{files/ccache.conf =3D> templates/ccache.conf.j2} (100%) rename guests/{files/fedora-rawhide-kernel-nodebug.repo =3D> templates/fed= ora-rawhide-kernel-nodebug.repo.j2} (100%) rename guests/{files/jessie-backports.preferences =3D> templates/jessie-ba= ckports.preferences.j2} (100%) rename guests/{files/jessie-backports.sources =3D> templates/jessie-backpo= rts.sources.j2} (100%) diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml index 70d5abc..aac5d4f 100644 --- a/guests/tasks/base.yml +++ b/guests/tasks/base.yml @@ -67,8 +67,8 @@ os_name =3D=3D 'Fedora' ) =20 - name: Enable jessie-backports repository - copy: - src: files/jessie-backports.sources + template: + src: templates/jessie-backports.sources.j2 dest: /etc/apt/sources.list.d/jessie-backports.list owner: root group: root @@ -78,8 +78,8 @@ - flavor =3D=3D 'jenkins' =20 - name: Configure APT pinning for jessie-backports - copy: - src: files/jessie-backports.preferences + template: + src: templates/jessie-backports.preferences.j2 dest: /etc/apt/preferences.d/jessie-backports owner: root group: root @@ -89,8 +89,8 @@ - flavor =3D=3D 'jenkins' =20 - name: Enable fedora-rawhide-kernel-nodebug repository - copy: - src: files/fedora-rawhide-kernel-nodebug.repo + template: + src: templates/fedora-rawhide-kernel-nodebug.repo.j2 dest: /etc/yum.repos.d/fedora-rawhide-kernel-nodebug.repo owner: root group: root diff --git a/guests/tasks/users.yml b/guests/tasks/users.yml index 7b37842..9c5c34d 100644 --- a/guests/tasks/users.yml +++ b/guests/tasks/users.yml @@ -62,8 +62,8 @@ - ccache/bin =20 - name: '{{ flavor }}: Configure ccache' - copy: - src: files/ccache.conf + template: + src: templates/ccache.conf.j2 dest: /home/{{ flavor }}/.ccache/ccache.conf owner: '{{ flavor }}' group: '{{ flavor }}' diff --git a/guests/files/ccache.conf b/guests/templates/ccache.conf.j2 similarity index 100% rename from guests/files/ccache.conf rename to guests/templates/ccache.conf.j2 diff --git a/guests/files/fedora-rawhide-kernel-nodebug.repo b/guests/templ= ates/fedora-rawhide-kernel-nodebug.repo.j2 similarity index 100% rename from guests/files/fedora-rawhide-kernel-nodebug.repo rename to guests/templates/fedora-rawhide-kernel-nodebug.repo.j2 diff --git a/guests/files/jessie-backports.preferences b/guests/templates/j= essie-backports.preferences.j2 similarity index 100% rename from guests/files/jessie-backports.preferences rename to guests/templates/jessie-backports.preferences.j2 diff --git a/guests/files/jessie-backports.sources b/guests/templates/jessi= e-backports.sources.j2 similarity index 100% rename from guests/files/jessie-backports.sources rename to guests/templates/jessie-backports.sources.j2 --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list