Extra background info on the timestamp.
It was originally used in Queens:
https://github.com/openstack/tripleo-common/blob/master/tripleo_common/actions/files.py#L111-L112
but had to be removed in Rocky so that we could refer to the tarball with consistent GET/PUT URL:
https://github.com/openstack/tripleo-common/commit/5a55202258c009d65885170080885d16645144ee
More info on the timestamp format below:
1. Python: """ (undercloud) [stack@undercloud ~]$ python Python 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from tripleo_common.utils import time_functions as timeutils >>> 'temporary_dir-%s.tar.gz' % timeutils.timestamp() 'temporary_dir-20180915-190055.tar.gz' >>> """
2. YAQL """ yaql> concat('temporary_dir-', now().format("%Y%m%d-%H%M%S"), '.tar.gz') "temporary_dir-20180915-191756.tar.gz" yaql> """
3. Ansible """ {{ ansible_date_time.date }} {{ ansible_date_time.year }}{{ ansible_date_time.month }}{{ ansible_date_time.day }} {{ ansible_date_time.hour }}{{ ansible_date_time.minute }}{{ ansible_date_time.second }} """
Extra background info on the timestamp.
It was originally used in Queens:
https:/ /github. com/openstack/ tripleo- common/ blob/master/ tripleo_ common/ actions/ files.py# L111-L112
but had to be removed in Rocky so that we could refer to the tarball with consistent GET/PUT URL:
https:/ /github. com/openstack/ tripleo- common/ commit/ 5a55202258c009d 65885170080885d 16645144ee
More info on the timestamp format below:
1. Python: common. utils import time_functions as timeutils dir-%s. tar.gz' % timeutils. timestamp( ) dir-20180915- 190055. tar.gz'
"""
(undercloud) [stack@undercloud ~]$ python
Python 2.7.5 (default, Apr 11 2018, 07:36:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tripleo_
>>> 'temporary_
'temporary_
>>>
"""
2. YAQL 'temporary_ dir-', now().format( "%Y%m%d- %H%M%S" ), '.tar.gz') dir-20180915- 191756. tar.gz"
"""
yaql> concat(
"temporary_
yaql>
"""
3. Ansible date_time. date }} date_time. year }}{{ ansible_ date_time. month }}{{ ansible_ date_time. day }} date_time. hour }}{{ ansible_ date_time. minute }}{{ ansible_ date_time. second }}
"""
{{ ansible_
{{ ansible_
{{ ansible_
"""