Change-Id: Id551f0697d808c1139eff4fa0de47418d8895125
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1883
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
Name: cloud-init |
| 2 | 2 |
Version: 0.7.6 |
| 3 |
-Release: 15%{?dist}
|
|
| 3 |
+Release: 16%{?dist}
|
|
| 4 | 4 |
Summary: Cloud instance init scripts |
| 5 | 5 |
Group: System Environment/Base |
| 6 | 6 |
License: GPLv3 |
| ... | ... |
@@ -14,6 +14,7 @@ Patch1: cloud-init-log.patch |
| 14 | 14 |
Patch2: vca-admin-pwd.patch |
| 15 | 15 |
Patch3: remove-netstat.patch |
| 16 | 16 |
Patch4: distro-systemctl.patch |
| 17 |
+Patch5: photon-hosts-template.patch |
|
| 17 | 18 |
|
| 18 | 19 |
BuildRequires: python2 |
| 19 | 20 |
BuildRequires: python2-libs |
| ... | ... |
@@ -27,6 +28,7 @@ Requires: python-prettytable |
| 27 | 27 |
Requires: python-requests |
| 28 | 28 |
Requires: PyYAML |
| 29 | 29 |
Requires: python-jsonpatch |
| 30 |
+Requires: python-jinja2 |
|
| 30 | 31 |
|
| 31 | 32 |
%description |
| 32 | 33 |
Cloud-init is a set of init scripts for cloud instances. Cloud instances |
| ... | ... |
@@ -41,6 +43,7 @@ ssh keys and to let the user run various scripts. |
| 41 | 41 |
%patch2 -p1 |
| 42 | 42 |
%patch3 -p1 |
| 43 | 43 |
%patch4 -p1 |
| 44 |
+%patch5 -p1 |
|
| 44 | 45 |
|
| 45 | 46 |
find systemd -name cloud*.service | xargs sed -i s/StandardOutput=journal+console/StandardOutput=journal/g |
| 46 | 47 |
|
| ... | ... |
@@ -127,6 +130,8 @@ systemctl daemon-reload >/dev/null 2>&1 || : |
| 127 | 127 |
|
| 128 | 128 |
|
| 129 | 129 |
%changelog |
| 130 |
+* Thu Dec 15 2016 Dheeraj Shetty <dheerajs@vmware.com> 0.7.6-16 |
|
| 131 |
+- Adding template file and python-jinja2 dependency to update hosts |
|
| 130 | 132 |
* Wed Dec 14 2016 Dheeraj Shetty <dheerajs@vmware.com> 0.7.6-15 |
| 131 | 133 |
- Fixed restarting of sshd daemon |
| 132 | 134 |
* Thu Dec 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.6-14 |
| 133 | 135 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,28 @@ |
| 0 |
+Only in a/: photon-hosts-template.patch |
|
| 1 |
+diff -rupr a/templates/hosts.photon.tmpl b/templates/hosts.photon.tmpl |
|
| 2 |
+--- a/templates/hosts.photon.tmpl 2016-12-22 15:15:38.409943103 -0800 |
|
| 3 |
+@@ -0,0 +1,23 @@ |
|
| 4 |
++## template:jinja |
|
| 5 |
++{#
|
|
| 6 |
++This file /etc/cloud/templates/hosts.photon.tmpl is only utilized |
|
| 7 |
++if enabled in cloud-config. Specifically, in order to enable it |
|
| 8 |
++you need to add the following to config: |
|
| 9 |
++ manage_etc_hosts: True |
|
| 10 |
++-#} |
|
| 11 |
++# Your system has configured 'manage_etc_hosts' as True. |
|
| 12 |
++# As a result, if you wish for changes to this file to persist |
|
| 13 |
++# then you will need to either |
|
| 14 |
++# a.) make changes to the master file in /etc/cloud/templates/hosts.photon.tmpl |
|
| 15 |
++# b.) change or remove the value of 'manage_etc_hosts' in |
|
| 16 |
++# /etc/cloud/cloud.cfg or cloud-config from user-data |
|
| 17 |
++# |
|
| 18 |
++# The following lines are desirable for IPv4 capable hosts |
|
| 19 |
++127.0.0.1 {{fqdn}} {{hostname}}
|
|
| 20 |
++127.0.0.1 localhost.localdomain localhost |
|
| 21 |
++127.0.0.1 localhost4.localdomain4 localhost4 |
|
| 22 |
++ |
|
| 23 |
++# The following lines are desirable for IPv6 capable hosts |
|
| 24 |
++::1 {{fqdn}} {{hostname}}
|
|
| 25 |
++::1 localhost6.localdomain6 localhost6 |
|
| 26 |
++ |