Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template, copy: support for archive, atime, mtime parameters #27965

Closed
wants to merge 1 commit into from

Conversation

rdolejsi
Copy link

@rdolejsi rdolejsi commented Aug 9, 2017

SUMMARY

template, copy: added support for new parameter 'archive' to allow retaining ownership and timestamps of the source(s) to allow creation of (templated) file with exact permissions on destination.

template, copy, file: added support for new parameters mtime, atime to allow setting access/mod datetime in unix touch format HHMMDDhhmi[.ss]. This is a feature required by the aforementioned template, copy 'archive' feature and cannot be split in separate pull request.

This is a third port of original pull request(s) not integrated in time:
for Ansible <1.7: #9143
for Ansible 1.7+ (multi-module): #9233, ansible/ansible-modules-core#102

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

file, copy, template

ANSIBLE VERSION
ansible 2.4.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible-2.4.0-py2.7.egg/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
ADDITIONAL INFORMATION

Commands template, copy support new parameter archive=True/False (default). When set to true, the created file retains permissions and ownership of the source template file. This allows seamless creation of templated scripts on the remote host.

Commands template, copy support new parameters atime=, mtime= allowing for creation of exactly-dated files on the destination host. This is useful for environments sensitive to file datetime changes.

Part of normal template, copy command operation, no special output. Remote permission checking part of implementation, difference yields a change indication in ansible console.

@rdolejsi rdolejsi changed the title template, copy: support for archive parameter template, copy: support for archive, atime, mtime parameters Aug 9, 2017
@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 c:module_utils/basic c:plugins/action core_review In order to be merged, this PR must follow the core review workflow. feature_pull_request module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Aug 9, 2017
@mattclay
Copy link
Member

mattclay commented Aug 9, 2017

I canceled the CI run as we're experiencing a significant backlog right now and multiple errors were already being reported for this PR. Most of the failures are probably due to this syntax error:

2017-08-09 17:19:36 Traceback (most recent call last):
2017-08-09 17:19:36   File "/root/src/github.com/ansible/ansible/bin/ansible", line 85, in <module>
2017-08-09 17:19:36     mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
2017-08-09 17:19:36   File "/root/src/github.com/ansible/ansible/lib/ansible/cli/__init__.py", line 41, in <module>
2017-08-09 17:19:36     from ansible.parsing.dataloader import DataLoader
2017-08-09 17:19:36   File "/root/src/github.com/ansible/ansible/lib/ansible/parsing/dataloader.py", line 32, in <module>
2017-08-09 17:19:36     from ansible.module_utils.basic import is_executable
2017-08-09 17:19:36   File "/root/src/github.com/ansible/ansible/lib/ansible/module_utils/basic.py", line 1462
2017-08-09 17:19:36     except OSError, e:
2017-08-09 17:19:36                   ^
2017-08-09 17:19:36 SyntaxError: invalid syntax

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Aug 9, 2017
@ansibot
Copy link
Contributor

ansibot commented Aug 9, 2017

The test ansible-test compile --python 3.6 failed with the following errors:

lib/ansible/module_utils/basic.py:1462:27: SyntaxError: except OSError, e:
lib/ansible/plugins/action/copy.py:252:55: SyntaxError: mode=oct(source_stat.st_mode & 0777),
lib/ansible/plugins/action/template.py:176:55: SyntaxError: mode=oct(source_stat.st_mode & 0777),

The test ansible-test compile --python 3.5 failed with the following errors:

lib/ansible/module_utils/basic.py:1462:27: SyntaxError: except OSError, e:
lib/ansible/plugins/action/copy.py:252:55: SyntaxError: mode=oct(source_stat.st_mode & 0777),
lib/ansible/plugins/action/template.py:176:55: SyntaxError: mode=oct(source_stat.st_mode & 0777),

The test ansible-test sanity --test ansible-var-precedence-check failed with the following error:

Command "test/sanity/code-smell/ansible-var-precedence-check.py" returned exit status 1.
>>> Standard Output
CHECKING: extra_vars (var passed via the cli)
ERROR !!!
playbook failed (rc=250), stdout: 'b'the full traceback was:\n\nTraceback (most recent call last):\n  File "/root/src/github.com/ansible/ansible/bin/ansible-playbook", line 85, in <module>\n    mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)\n  File "/root/src/github.com/ansible/ansible/lib/ansible/cli/__init__.py", line 41, in <module>\n    from ansible.parsing.dataloader import DataLoader\n  File "/root/src/github.com/ansible/ansible/lib/ansible/parsing/dataloader.py", line 32, in <module>\n    from ansible.module_utils.basic import is_executable\n  File "/root/src/github.com/ansible/ansible/lib/ansible/module_utils/basic.py", line 1462\n    except OSError, e:\n                  ^\nSyntaxError: invalid syntax\n'' stderr: 'b'ERROR! Unexpected Exception, this is probably a bug: invalid syntax (basic.py, line 1462)\n''
feature: extra_vars failed

The test ansible-test sanity --test no-wildcard-import failed with the following error:

Command "test/sanity/code-smell/no-wildcard-import.sh" returned exit status 2.
>>> Standard Output
== Wildcard imports detected ==
./lib/ansible/plugins/action/template.py:from stat import *

The test ansible-test sanity --test pep8 failed with the following errors:

lib/ansible/module_utils/basic.py:180:22: E225 missing whitespace around operator
lib/ansible/module_utils/basic.py:926:14: E221 multiple spaces before operator
lib/ansible/module_utils/basic.py:927:14: E221 multiple spaces before operator
lib/ansible/module_utils/basic.py:1461:64: E231 missing whitespace after ','
lib/ansible/module_utils/basic.py:1461:121: E231 missing whitespace after ','
lib/ansible/module_utils/basic.py:1465:46: E261 at least two spaces before inline comment
lib/ansible/modules/files/copy.py:279:38: E261 at least two spaces before inline comment
lib/ansible/modules/files/file.py:184:20: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/files/file.py:184:22: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/files/file.py:184:39: E231 missing whitespace after ','
lib/ansible/modules/files/file.py:184:56: E261 at least two spaces before inline comment
lib/ansible/modules/files/file.py:185:18: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/files/file.py:185:20: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/files/file.py:186:18: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/files/file.py:186:20: E251 unexpected spaces around keyword / parameter equals

The test ansible-test sanity --test pylint failed with the following errors:

lib/ansible/module_utils/basic.py:1462:0: syntax-error invalid syntax
lib/ansible/modules/cloud/amazon/_ec2_elb.py:340:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/_ec2_vpc.py:732:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/cloudwatchevent_rule.py:382:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_ami.py:611:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_ami_find.py:352:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_eip.py:367:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_key.py:136:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_key.py:166:32: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:168:31: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:172:28: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:211:36: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:213:35: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:217:32: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:239:28: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:241:27: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_key.py:245:24: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ec2_lc_facts.py:228:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_lc_find.py:215:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_metric_alarm.py:300:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_scaling_policy.py:177:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_snapshot.py:270:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_tag.py:139:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_vol.py:528:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_vpc_net.py:205:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_win_password.py:130:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/ec2_win_password.py:137:23: undefined-variable Undefined variable 'to_bytes'
lib/ansible/modules/cloud/amazon/ec2_win_password.py:151:16: undefined-variable Undefined variable 'time'
lib/ansible/modules/cloud/amazon/ecs_ecr.py:337:30: undefined-variable Undefined variable 'traceback'
lib/ansible/modules/cloud/amazon/ecs_ecr.py:360:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/efs.py:587:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py:89:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/elb_instance.py:340:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/iam.py:617:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/iam_mfa_device_facts.py:104:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/iam_server_certificate_facts.py:156:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/kinesis_stream.py:1037:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/lambda.py:260:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/lambda_alias.py:364:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/lambda_event.py:404:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/lambda_facts.py:294:39: undefined-variable Undefined variable 'json'
lib/ansible/modules/cloud/amazon/lambda_facts.py:354:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/rds.py:1354:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/rds_subnet_group.py:94:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/redshift.py:443:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/redshift_subnet_group.py:110:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/s3.py:508:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/amazon/s3_website.py:290:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_instance.py:1030:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_instance_facts.py:290:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_portforward.py:412:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_securitygroup.py:199:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_securitygroup_rule.py:395:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_snapshot_policy.py:359:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_template.py:647:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/cloudstack/cs_volume.py:476:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_auth.py:64:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_auth.py:77:47: undefined-variable Undefined variable 'traceback'
lib/ansible/modules/cloud/openstack/os_client_config.py:62:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_flavor_facts.py:208:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_floating_ip.py:175:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_floating_ip.py:224:49: undefined-variable Undefined variable 'remove_values'
lib/ansible/modules/cloud/openstack/os_group.py:136:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_image.py:154:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_image_facts.py:151:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_ironic.py:234:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_ironic_inspect.py:127:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_ironic_node.py:252:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_keypair.py:127:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_keystone_domain.py:146:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_keystone_role.py:102:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_keystone_service.py:156:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_network.py:185:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_networks_facts.py:141:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_nova_flavor.py:220:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_nova_host_aggregate.py:123:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_object.py:124:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_port.py:333:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_port_facts.py:213:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_project.py:160:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_project_facts.py:133:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_recordset.py:173:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_router.py:307:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_security_group.py:107:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_security_group_rule.py:296:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_server.py:732:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_server_facts.py:83:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_server_group.py:138:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_server_volume.py:105:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_stack.py:230:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_subnet.py:275:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_subnets_facts.py:154:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_user_facts.py:141:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_user_group.py:84:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_user_role.py:141:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_volume.py:176:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/cloud/openstack/os_zone.py:174:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/airbrake_deployment.py:88:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/bigpanda.py:124:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/bigpanda.py:189:11: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/bigpanda.py:196:33: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/honeybadger_deployment.py:97:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/logentries.py:133:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/logicmonitor_facts.py:583:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/monit.py:75:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/newrelic_deployment.py:99:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/pagerduty.py:194:19: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty.py:220:11: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty.py:226:19: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty.py:246:11: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty.py:252:19: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty.py:261:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/pagerduty_alert.py:135:53: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty_alert.py:140:15: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty_alert.py:164:53: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty_alert.py:168:15: undefined-variable Undefined variable 'json'
lib/ansible/modules/monitoring/pagerduty_alert.py:173:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/pingdom.py:127:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/sensu_check.py:392:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/sensu_subscription.py:92:12: undefined-variable Undefined variable 'get_exception'
lib/ansible/modules/monitoring/sensu_subscription.py:139:16: undefined-variable Undefined variable 'get_exception'
lib/ansible/modules/monitoring/sensu_subscription.py:152:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/uptimerobot.py:136:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/zabbix_group.py:168:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/zabbix_host.py:430:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/zabbix_hostmacro.py:185:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/zabbix_maintenance.py:282:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/monitoring/zabbix_screen.py:334:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/apt_repository.py:305:96: undefined-variable Undefined variable 'unicode'
lib/ansible/modules/packaging/os/apt_repository.py:404:15: undefined-variable Undefined variable 'json'
lib/ansible/modules/packaging/os/apt_repository.py:480:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/apt_repository.py:524:63: undefined-variable Undefined variable 'unicode'
lib/ansible/modules/packaging/os/apt_repository.py:547:33: undefined-variable Undefined variable 'unicode'
lib/ansible/modules/packaging/os/apt_rpm.py:153:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/dpkg_selections.py:45:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/homebrew_tap.py:206:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/layman.py:229:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/macports.py:198:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/openbsd_pkg.py:529:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/opkg.py:170:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/pacman.py:384:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/pkg5.py:67:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/pkg5.py:98:12: undefined-variable Undefined variable 're'
lib/ansible/modules/packaging/os/pkg5.py:99:29: undefined-variable Undefined variable 're'
lib/ansible/modules/packaging/os/pkg5_publisher.py:79:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/pkgin.py:331:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/pkgutil.py:127:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/portage.py:451:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/rhn_channel.py:121:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/slackpkg.py:171:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/svr4pkg.py:177:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/swdepot.py:133:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/urpmi.py:191:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/modules/packaging/os/zypper_repository.py:305:13: undefined-variable Undefined variable 'AnsibleModule'
lib/ansible/plugins/action/copy.py:252:0: syntax-error invalid token
lib/ansible/plugins/action/template.py:176:0: syntax-error invalid token
test/units/modules/network/cumulus/test_nclu.py:98:7: undefined-variable Undefined variable 'os'

click here for bot help

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. and removed core_review In order to be merged, this PR must follow the core review workflow. ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 9, 2017
@rdolejsi
Copy link
Author

rdolejsi commented Aug 9, 2017

Compatibility with Python 3+ and pep8 tests has been fixed, the CI run / verification process can be resumed.

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. core_review In order to be merged, this PR must follow the core review workflow. labels Aug 9, 2017
@jborean93
Copy link
Contributor

@rdolejsi, if you wish to rerun the CI tests, you can just close and re-open the PR. All the history is preserved so nothing is lost by doing this.

@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Aug 10, 2017
@bcoca
Copy link
Member

bcoca commented Aug 10, 2017

i forced CI rerun

@mattclay
Copy link
Member

CI failure in unit tests:

>               self.assertEqual(res, final_params)
E               AssertionError: {'gro[56 chars], 'setype': '_default', 'serole': '_default', [166 chars]None} != {'gro[56 chars], 'serole': '_default', 'setype': '_default', [136 chars]ile'}
E               - {'atime': None,
E               -  'attributes': None,
E               ? ^
E               
E               + {'attributes': None,
E               ? ^
E               
E                  'group': 'root',
E                  'mode': 384,
E               -  'mtime': None,
E                  'owner': 'root',
E                  'path': '/path/to/real_file',
E                  'secontext': ['unconfined_u', 'object_r', 'default_t', 's0'],
E                  'selevel': '_default',
E                  'serole': '_default',
E                  'setype': '_default',
E                  'seuser': '_default'}

test/units/module_utils/test_basic.py:651: AssertionError

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Aug 10, 2017
@ansibot
Copy link
Contributor

ansibot commented Aug 10, 2017

@rdolejsi this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot ansibot added merge_commit This PR contains at least one merge commit. Please resolve! and removed ci_verified Changes made in this PR are causing tests to fail. labels Aug 10, 2017
@ansibot ansibot removed the new_contributor This PR is the first contribution by a new community member. label Nov 3, 2017
@ansibot ansibot added the new_contributor This PR is the first contribution by a new community member. label Feb 6, 2018
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 2, 2018
@dagwieers dagwieers added test This PR relates to tests. and removed test This PR relates to tests. test_pull_requests labels Jun 22, 2018
@ansibot ansibot added the support:community This issue/PR relates to code supported by the Ansible community. label Sep 18, 2018
@ansibot
Copy link
Contributor

ansibot commented Oct 25, 2018

cc @ptux
click here for bot help

@ansibot ansibot removed the support:community This issue/PR relates to code supported by the Ansible community. label Nov 26, 2018
@ansibot ansibot added the files Files category label Mar 5, 2019
@jimi-c
Copy link
Member

jimi-c commented May 29, 2020

Hi @rdolejsi , sorry for taking so long in getting back to review this, but overall the functionality looks good. Are you still interested in pursuing this PR? If so, we can work on getting it merged if you rebase it.

Thanks!

@jimi-c jimi-c added affects_2.10 This issue/PR affects Ansible v2.10 affects_2.9 This issue/PR affects Ansible v2.9 and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 29, 2020
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 29, 2020
@ansibot ansibot added pre_azp This PR was last tested before migration to Azure Pipelines. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 7, 2020
Copy link
Contributor

@s-hertel s-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was rebasing this locally to add some tests and review, and wondered if we should keep the interface for this more similar to the file module. In 2.7 the file module added options to preserve atime/mtime. The access_time/modification_time options can be set to 'preserve' or 'now' and the date format is configurable for both rather than hardcoded. We could move a couple of those functions (get_timestamp_for_time, and update_timestamp_for_file) to common code to have less duplication.

Also, I'm not sure about the need for the blanket 'archive' option. The copy module already has an option to preserve 'mode', and owner and group seem straightforward. Perhaps we should add individual options to preserve timestamps first, and add the all-encompassing option in a follow-up PR if it seems very helpful. That option should also be mutually exclusive with the finer-grain options, since they are just ignored at the moment.

@jrowens
Copy link

jrowens commented May 11, 2021

Having just made a near-duplicate feature request #74655 (but without pull, Python's not my thing), could I also suggest/request similar functionality in fetch?

@s-hertel
Copy link
Contributor

@jrowens A comment was left on the feature request to make sure fetch is not forgotten #55768 (comment). In my opinion, this probably needs to be implemented from scratch to keep the interface similar to the file module.

@bcoca
Copy link
Member

bcoca commented May 4, 2022

waiting_on_contributor

@ansibot ansibot added the waiting_on_contributor This would be accepted but there are no plans to actively work on it. label May 12, 2022
@ansibot
Copy link
Contributor

ansibot commented May 17, 2023

Thank you very much for your submission to Ansible. It means a lot to us that you've taken time to contribute.

Unfortunately, this issue has been open for some time while waiting for a contributor to take it up but there does not seem to have been anyone that did so. So we are going to close this issue to clear up the queues and make it easier for contributors to browse possible implementation targets.

However, we're absolutely always up for discussion. Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:

In the future, sometimes starting a discussion on the development list prior to proposing or implementing a feature can make getting things included a little easier, but it's not always necessary.

Thank you once again for this and your interest in Ansible!

click here for bot help

@ansibot ansibot added bot_closed and removed waiting_on_contributor This would be accepted but there are no plans to actively work on it. labels May 17, 2023
@ansibot ansibot closed this May 17, 2023
@ansible ansible locked and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 affects_2.9 This issue/PR affects Ansible v2.9 affects_2.10 This issue/PR affects Ansible v2.10 bot_closed c:module_utils/basic c:plugins/action feature This issue/PR relates to a feature request. files Files category has_issue module_utils/basic module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. plugins/action pre_azp This PR was last tested before migration to Azure Pipelines. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants