mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-04 15:29:10 -07:00
parent
1b8e6bc95b
commit
524d5883b8
19 changed files with 142 additions and 64 deletions
|
@ -110,7 +110,10 @@ EXAMPLES = '''
|
|||
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from datetime import datetime
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.datetime import (
|
||||
now,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -161,8 +164,7 @@ def main():
|
|||
if module.params['environment']:
|
||||
custom_details['environment'] = module.params['environment']
|
||||
|
||||
now = datetime.utcnow()
|
||||
timestamp = now.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
|
||||
timestamp = now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
|
||||
|
||||
payload = {
|
||||
'summary': module.params['summary'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue