Alex Willmer
1287d58a54
Use with open(): ... to ensure file objects get closed
2022-04-21 20:14:24 +01:00
Klaus Zerwes
6fb5502a35
issue #874 support for ansible core 2.12 aka. ansible community 5.0
2021-12-07 11:53:50 +01:00
Alex Willmer
d9b8d50d4e
Fix ansible.__version__ comparisons with multi-digit components
...
Ansible 2.8 is older than Ansible 2.10, but `'2.8' < '2.10' == False`
2021-11-22 23:19:03 +00:00
Alex Willmer
465ac8abff
ansible: Fix AttributeError in kubectl connection
2021-11-22 23:19:03 +00:00
Alex Willmer
e194a6367f
ci: Fix version comparisons involving double digits
...
See https://gist.github.com/moreati/e7507c5b606b12ec0ddafcb7c8debbf1
2021-11-22 23:19:03 +00:00
Alex Willmer
c61c063b4f
Support for Ansible 3 & 4
...
fixes #834
Co-authored-by: Claude Becker (@upekkha)
Co-authored-by: Dolph Mathews (@dolph)
2021-11-12 22:10:53 +00:00
Alex Willmer
2382d8dab5
Merge branch 'master' into issue_827_collections
2021-09-07 08:05:25 +01:00
Antti Jaakkola
ee6f2b09b9
Fix for load_plugins() called twice error with dnf
2021-07-06 13:22:52 +03:00
Philippe Kueck
a2dcedabda
fixes #827
...
some ansible collections write their own module classes derived from
ansible.module_utils.basic.AnsibleModule, thus lacking that import
in the plugin file. NewStylePlanner was unable to detect these plugins
as Ansiballz.
This commit extends the search pattern for NewStylePlanner to also
detect ansible_collections imports.
2021-07-01 11:21:33 +02:00
Steven Robertson
234dde5fc1
check Ansible version before loaders are loaded
2021-02-07 13:09:17 -08:00
Steven Robertson
ba222744af
Merge branch 'master' into add0.2.10+0.3.0changelog
2020-12-29 13:15:45 -08:00
MarkusTeufelberger
8d3026b109
Add ansible.legacy.setup to be fixed on py3.5
2020-12-29 17:56:05 +01:00
Steven Robertson
f489478127
code cleanup + adds 0.2.10 + 0.3.0 changelog
2020-12-27 21:06:37 -08:00
Steven Robertson
2510f1a2c2
fix py3.5.1-3.5.3 setup import error for Ansible 2.10
2020-11-20 19:14:49 -08:00
Steven Robertson
5a0da02e6c
code review changes, using when statements and adding trailing comma
2020-11-12 20:47:28 -08:00
Steven Robertson
196a476270
🎉 no more warnings, only load specific collection subdirs instead of top-level collection path (ie no ansible_collections/google, only ansible_collections/google/cloud, etc)
2020-11-05 23:45:41 -08:00
Steven Robertson
741e99f698
ansible 2.10 no longer has a at the end of the error msg... 🤦
2020-11-01 11:13:51 -08:00
Steven Robertson
95c43ec9fc
fixed issue of switching between mitogen and non-mitogen strategies
2020-10-18 22:58:38 -07:00
Steven Robertson
e30e84334e
remove synchronize fail test for azure
2020-10-01 22:07:28 -07:00
Steven Robertson
139b9560bc
print didn't work because verbosity, throw valueerror to see
2020-09-27 11:34:04 -07:00
Steven Robertson
9bd35adcfb
more debugging, synchronize is being weird on azure
2020-09-27 11:22:10 -07:00
Steven Robertson
ff8a276186
turn off failing Ansible-only tests for now, also raising errors to see what Azure is gonna do with collections
2020-09-20 22:10:00 -07:00
Steven Robertson
f757dbcb82
removed duplicate install and added debug dump of collection loading to see what tests are doing
2020-09-20 21:35:35 -07:00
Steven Robertson
41a13ebce2
hopefully this also fails the same way
2020-09-20 20:13:47 -07:00
Steven Robertson
5aedb5f157
add missing collections 🤦
2020-09-20 18:12:58 -07:00
Steven Robertson
9857dfea5c
verify collection is working as expected
2020-09-20 18:07:25 -07:00
Steven Robertson
a40c28d93f
can't replicate but think it's because synchronize is now a collection
2020-09-20 17:57:18 -07:00
Steven Robertson
49dd8eee1a
figure out what synchronize is now
2020-09-20 17:15:29 -07:00
Steven Robertson
c6d42212dd
add some debugging info, was able to run the failed synchronize test locally just fine using test framework, not sure what's going on
2020-09-20 16:33:03 -07:00
Steven Robertson
f91cbf4d00
test cleanup and trying to replicate synchronize fails
2020-09-20 15:40:07 -07:00
Steven Robertson
f994807d74
ansible 2.10 renamed ping module to reflect legacy builtin collection
2020-09-06 13:44:01 -07:00
Steven Robertson
03438271bb
able to remove the hack on ActionBase after all
2020-08-27 20:01:47 -07:00
Steven Robertson
5215646c8a
code cleanup
2020-08-25 23:28:21 -07:00
Steven Robertson
0b421e0d3c
able to run docker_container installed via 'ansible-galaxy collection install community.general'
2020-08-25 23:24:41 -07:00
Steven Robertson
45797a0d34
able to send collections paths to master with very little change to core Mitogen, need to ensure imports work properly now though
2020-08-24 21:25:59 -07:00
Steven Robertson
6e51f1a184
found a way to load collections without affecting mitogen core code
2020-08-23 20:42:55 -07:00
Steven Robertson
8d3ee26079
code cleanup
2020-08-23 18:01:37 -07:00
Steven Robertson
ca94751f15
remove hack
2020-08-23 17:37:59 -07:00
Steven Robertson
f1bdc39047
added note about breaking backwards compat
2020-08-23 17:32:58 -07:00
Steven Robertson
1d13df718a
connection_loader.get isn't called anymore, it's connection_loader.get_with_context now
2020-08-23 17:31:10 -07:00
Steven Robertson
6ba08097b6
more notes, strategy plugin is being called but Mitogen's method overrides aren't being triggered
2020-08-23 00:15:29 -07:00
Steven Robertson
ca4e8116b7
TODO: turns out ansible 2.10 doesn't run Mitogen like it used to; was running old ansible version before because ansible-base didn't override everything. Did a fresh uninstall of ansible and installed 2.10.0 and Mitogen's connection monkeypatching isn't working
2020-08-20 00:38:41 -07:00
Steven Robertson
1bd4b8afcd
much thinking needs to be done regarding how to handle not requiring sshpass...
2020-08-18 00:53:30 -07:00
Steven Robertson
6ac9168d55
need to get around sshpass check here somehow: https://github.com/ansible/ansible/blob/v2.10.0/lib/ansible/plugins/connection/ssh.py#L577
2020-08-16 00:43:41 -07:00
Steven Robertson
583f540889
added comments
2020-08-16 00:22:08 -07:00
Steven Robertson
e34cf8667f
Merge branch 'master' into collectionsSupport
2020-07-30 22:15:45 -07:00
Steven Robertson
81076c9da8
fixes setup module relative import fail on some pythons
2020-06-15 10:17:34 -07:00
Steven Robertson
376d8d0fab
remove old hacks; ansible_collections is available at time of invoker but not later
2020-05-26 23:47:32 -07:00
Steven Robertson
955e77c5db
WIP: able to load subdirs but now need to treat them as submodules properly
2020-05-25 21:35:05 -07:00
Steven Robertson
ab55d05267
all in on ansible 2.10+ for collections support
2020-05-25 20:26:20 -07:00
Steven Robertson
c92a9ace41
bump max ansible version
2020-05-25 17:44:44 -07:00
Steven Robertson
ac1e72eec4
Merge branch 'master' into collectionsSupport
2020-05-25 17:24:20 -07:00
Steven Robertson
e632310fc4
no tmpdir to remove for old ansible versions in fetch command
2020-05-15 14:55:48 -07:00
Steven Robertson
ddc1eebec8
able to load collection but the mitogen master proc was unable to serve it
2020-05-08 12:56:07 -07:00
Steven Robertson
e99d63f4fc
able to load collections but they don't do anything because no actionmodulemixin, need to tweak how this works
2020-05-08 12:30:44 -07:00
Steven Robertson
acde13f9d6
handles a 'wait_for_connection' call right after a task caused a shutdown
2020-04-30 17:53:06 -07:00
Steven Robertson
5bf327649f
add missing / to python paths
2020-03-20 13:16:56 -07:00
Steven Robertson
389cee8c70
fix assertion of python_path, it should be always what 'discovered_interpreter' is
2020-03-15 11:10:26 -07:00
Steven Robertson
c959ce010b
created temp action obj for 'meta: reset_connection' python interpreter discovery
2020-03-14 23:09:40 -07:00
Steven Robertson
5b8c9da769
_execute_meta doesn't have an Action nooooo this breaks 'meta: reset_connection' because interpreter_discovery needs an Action
2020-03-04 18:47:12 -08:00
Steven Robertson
33e7d0804f
fixed tests, and removed the action hack code
2020-03-04 16:05:29 -08:00
Steven Robertson
7411057ba8
adding in python3 as a possible_pythons option for rhel8
2020-03-04 10:31:43 -08:00
Steven Robertson
89d87445c8
able to pass tests running interpreter detection in rhel8 container
2020-03-03 22:03:49 -08:00
Steven Robertson
7d6d76e444
trying to get docker rhel8 working on a Mac host
2020-03-03 14:50:50 -08:00
Steven Robertson
5e0fb902b2
fix lambda args for fallback
2020-02-18 17:29:26 -08:00
Steven Robertson
91785f8862
fix another bad import
2020-02-11 18:46:14 -08:00
Steven Robertson
ee310c1a68
remove_internal_keys returns None, so need different way to check fallback
2020-02-11 18:08:02 -08:00
Steven Robertson
722cf0ea8d
handle ansible 2.3.3 remove_internal_keys
2020-02-11 17:21:47 -08:00
Steven Robertson
cf1c3aac1c
fix typo
2020-02-11 16:33:29 -08:00
Steven Robertson
ba350aa6cf
assigned interpreter vars to the wrong class
2020-02-11 16:25:57 -08:00
Steven Robertson
d74da84f62
the clean module was added later
2020-02-10 17:59:24 -08:00
Steven Robertson
496d96c01a
need to convert to str because of unicode_literals
2020-02-10 17:45:23 -08:00
Steven Robertson
aa0ad5ce8f
accidentally broke discovery
2020-02-10 16:42:02 -08:00
Steven Robertson
160dbd86b4
keeping track of interpreter discovery vars in case of ansible < 2.8
2020-02-05 17:20:28 -08:00
Steven Robertson
f10fb7d486
more test cases pass
2020-02-05 17:09:34 -08:00
Steven Robertson
e3eebb98d0
ImportError instead of newer ModuleNotFoundError
2020-02-05 15:40:25 -08:00
Steven Robertson
2d3d9cb659
fallback to old-style python interpreter default if running ansible < 2.8.0
2020-02-05 15:34:47 -08:00
Steven Robertson
ff2fa60184
fixed typo
2020-02-05 11:22:52 -08:00
Steven Robertson
0b57332d75
all test cases for ansible_python_interpreter on OSX pass now
2020-02-03 21:56:32 -08:00
Steven Robertson
81694d07ab
fix typo
2020-02-03 16:57:30 -08:00
Steven Robertson
8630f6190c
fixed propagating discovered interpreter to future tasks; sys.executable still wrong though
2020-02-03 14:51:50 -08:00
Steven Robertson
af1e22d4e1
able to propagate ansible_python_interpreter fact but still doesn't save between task runs
2020-02-03 14:36:47 -08:00
Steven Robertson
119e1c24aa
code cleanup
2020-01-31 17:37:26 -08:00
Steven Robertson
cec692dc17
faking pipelining so discover_interpreter can successfully exit
2020-01-31 17:22:49 -08:00
Steven Robertson
a6d2b2cd90
doesn't error when declaring 'ansible_python_interpreter: auto' but fact isn't being cached
2020-01-31 17:08:43 -08:00
Steven Robertson
19ba2417c8
now able to get the action object, but recursion error in low_level_exec_command
2020-01-31 15:14:44 -08:00
Steven Robertson
806651e112
working on ansible discovery; need to fix passing ActionModuleMixin reference still
2020-01-30 15:44:20 -08:00
Steven Robertson
d64adb15d7
reverted autolinted code
2020-01-29 18:55:35 -08:00
Steven Robertson
e8f3154cab
Merge branch 'master' into complexAnsiblePythonInterpreterArg
2019-11-15 16:08:51 -08:00
David Wilson
d6329f3446
Merge devel/290 @ 79b979ec8544ef5d8620c64068d4a42fabf50415
2019-11-02 16:46:59 +00:00
Steven Robertson
4669c8774f
handles templating ansible_python_interpreter values
2019-10-30 13:43:48 -07:00
Steven Robertson
cc11864b7d
code cleanup
2019-10-29 17:51:27 -07:00
Steven Robertson
24b170311a
able to get to 'sudo: source not found' after preventing escape of && so python connects
2019-10-29 14:44:49 -07:00
David Wilson
be4f1bdb50
issue #646 : add extra logging to assertions and start_child()
2019-09-11 19:58:20 +01:00
David Wilson
efd82dd35a
issue #633 : various task_vars fixes
...
- take host_vars from task_vars too
- make missing task_vars a hard error
- update tests to provide stub task_vars
2019-08-20 14:47:33 +01:00
David Wilson
fc09b81949
issue #633 : handle meta: reset_connection when become is active
...
- don't create a new connection during reset if no existing connection
exists
- strip off last hop in connection stack if PlayContext.become is True.
- log a debug message if reset cannot find an existing connection
2019-08-20 14:04:45 +01:00
David Wilson
b6d1df749c
issue #633 : take inventory_hostname from task_vars
...
It used to be set by on_action_run() from task_vars, but this doesn't
work for meta: reset_connection. That meant MITOGEN_CPU_COUNT>1 would
pick the wrong mux to reset the connection on.
2019-08-20 13:59:01 +01:00
David Wilson
f4cf67f0bd
issue #615 : remove meaningless test
...
It has been dead code since at least 2015
2019-08-17 12:56:21 +01:00
David Wilson
e02be89879
issue #625 : ignore SIGINT within MuxProcess
...
Without this, MuxProcess will start dying too early, before Ansible /
TaskQueueManager.cleanup() has a chance to wait on worker processes.
That would allow WorkerProcess to see ECONNREFUSED from the MuxProcess
socket much more easily.
2019-08-17 12:56:16 +01:00
David Wilson
67759371f9
issue #615 : ensure 4GB max_message_size is configured for task workers.
...
This 4GB limit was already set for MuxProcess and inherited by all
descendents including the context running on the target host, but it was
not applied to the WorkerProcess router.
That explains why the error from the ticket is being raised by the
router within the WorkerProcess rather than the router on the original
target.
2019-08-17 03:19:32 +01:00