Issue 1:
Simply put, if you attempt to use the synchronize module to a local SSH port, such as when you are trying to use synchronize over Vagrant, the rsync command does not appear to work correctly. Of course, rsyncing with Vagrant is unnecessary since one can simply mount a shared folder, but if you are using Vagrant to test a deployment script, you probably would prefer things to work the same way.

Here is the sample of my playbook file:

- name: Rsync site to the destination machine
synchronize: >
src=../sitedir
dest=/srv/www/{{ name }}/
archive=no
recursive=yes

Here is an example of what happens when I attempt to synchronize:

TASK: [Rsync site to the destination machine] ****************************
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-1386703159.57-189216039108571 && chmod a+rx $HOME/.ansible/tmp/ansible-1386703159.57-189216039108571 && echo $HOME/.ansible/tmp/ansible-1386703159.57-189216039108571']
<127.0.0.1> PUT /var/folders/FW/FWtcHQi9E5enrfES54KWe++++TI/-Tmp-/tmpZFZVGO TO /Users/alex/.ansible/tmp/ansible-1386703159.57-189216039108571/synchronize
<127.0.0.1> PUT /var/folders/FW/FWtcHQi9E5enrfES54KWe++++TI/-Tmp-/tmpCqD8hJ TO /Users/alex/.ansible/tmp/ansible-1386703159.57-189216039108571/arguments
<127.0.0.1> EXEC ['/bin/sh', '-c', '/usr/bin/python /Users/alex/.ansible/tmp/ansible-1386703159.57-189216039108571/synchronize /Users/alex/.ansible/tmp/ansible-1386703159.57-189216039108571/arguments; rm -rf /Users/alex/.ansible/tmp/ansible-1386703159.57-189216039108571/ >/dev/null 2>&1']
failed: [default] => {"cmd": "rsync --delay-updates --compress --timeout=10 --recursive --rsh 'ssh -o StrictHostKeyChecking=no -o Port=2222' --out-format='<<CHANGED>>%i %n%L' ../sitedir /srv/www/site_dev/", "failed": true, "rc": 12}
msg: rsync: mkdir "/srv/www/site_dev" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-40/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-40/rsync/io.c(452) [sender=2.6.9]

You can tell from the output that the module is attempting to sync between two local filesystem areas instead of from the local filesystem across the SSH tunnel to the proper destination.

I have attempted this with both plain ansible 1.4.1 and using the HEAD version (as of now) of the synchronize module.

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

modules: ovirt_networks, ovirt_cluster

ANSIBLE VERSION

ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/djasa/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.14 (default, Nov 3 2017, 10:55:25) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]

CONFIGURATION

OS / ENVIRONMENT

N/A

SUMMARY

Cluster network roles would be better set up by ovirt_cluster module to avoid duplication and errors

LONG DESCRIPTION

when typing my existing RHV setup to ansible, I was wondering why are cluster network roles specified at each network instead of at cluster. The main disadvantages are IMO:

much more typing. E.g. you have to specify display: false for each network instead of having single display: NETWORK_NAME statement given at cluster

vulnerability to errors for no gain: with per-cluster display: NETWORK_NAME, you can validate that just one network is specified as display right in the ansible module (the same is true for migration network)

I don't have a strong opinion for VM networks and required networks specification where the inherent validation and less typing are not really applicable (it doesn't matter that much if you specify per-network boolean or per-cluster list in this case).

The only downside I can think of is need to have cluster set up split to two tasks but that's IMO an acceptable cost, see example below:

- name: set up clusters
ovirt_cluster:
# everything but networks

- name: set up networks
ovirt_networks:
# now set up networks

- name: set up cluster network roles
ovirt_cluster:
name: cluster_name
display_network: my_display_network
migration_network: my_mgmt_network
# These are of no real benefit IMO so just for consistency sake...
required_networks:
- my_mgmt_network
- my_display_network
- infra_servers
- prod_servers
vm_networks:
- infra_servers
- web_servers
- playground

(originally misfiled as oVirt/ovirt-ansible#142)