seantis/suitable

Incompatible with Ansible 2.8

href opened this issue · 6 comments

href commented

I ran Suitable against Ansible 2.8 today and it currently cannot support it. The problem is that Ansible 2.8 introduces a global context variable that is used throughout the code-base. Before, we could pass most options down to Ansible.

To add compatibility with this approach, additional hackery is required. I haven't found the right way yet, as changing the global object leads to some state not being cleared after a Suitable API invocation.

I'll probably find a way to monkey my way into the machinery, but I need more time, so for now be warned that Ansible 2.8 will not work with Suitable.

href commented

Ansible 2.8 compatibility has been added to Suitable.

Note however, that Mitogen is currently not compatible with Ansible 2.8. So as long as that is an issue, this ticket will stay open. I also probably won't release until 2.8 is officially out.

mitogen-hq/mitogen#556 tracks the status of Mitogen and Ansible 2.8

dw commented

Just FYI, I'm hoping to squeeze out a release that does not support become plugins, but otherwise everything works as previously. The become plugins work depends on a rather huge branch that's not ready to merge yet

href commented

I've pushed a new Suitable release that throws an error if Mitogen 0.2.6 is detected together with Ansible 2.8. Hopefully a new Mitogen release can just be plugged in at a later point.

Hello,
I have a question,
seems like below logic result in the API connect to remoter server for every file.
is it possible to run all those task without reconnect server?

# I'v create api obj by below:
api = Api(self.target_server,
                  remote_user='my_ssh_user', 
                  remote_pass='my_ssh_passwd',
                  become="yes",
                  become_user="my_sudo_user",
                  ignore_errors=True,
                  ignore_unreachable=True,
                  verbosity='debug'
                  )

# then try to send some files to remote:
for file in filenamelists:
     api.copy(src=file, dest=/path/to/mydest/, mode=755)

# seems every file will cause the server reconnect for every single file.

Thanks,

dw commented

Hi @href, just to let you know the initial pieces of this have made it to master branch, but there is still a problem with the importer when running on Python 3. ETA hopefully one more weekend

href commented

This has been fixed with the latest Mitogen release. I created a new Suitable release to match it.