1#!/usr/local/bin/python3.8
2#
3# Ansible is free software: you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation, either version 3 of the License, or
6# (at your option) any later version.
7#
8# Ansible is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.
15#
16# ansible-vault is a script that encrypts/decrypts YAML files. See
17# https://docs.ansible.com/playbooks_vault.html for more details.
18
19from __future__ import (absolute_import, division, print_function)
20__metaclass__ = type
21
22import sys
23import time
24import os
25
26
27def main(args):
28    path = os.path.abspath(args[1])
29
30    fo = open(path, 'r+')
31
32    content = fo.readlines()
33
34    content.append('faux editor added at %s\n' % time.time())
35
36    fo.seek(0)
37    fo.write(''.join(content))
38    fo.close()
39
40    return 0
41
42
43if __name__ == '__main__':
44    sys.exit(main(sys.argv[:]))
45