Issue 1:
It showed, that more reasonable for oVirt VMs state present is to don't start them. Better solution is just to create them if it don't exist and don't touch the state of the VM.

ISSUE TYPE

Bug Report

COMPONENT NAME

ovirt_vms

ANSIBLE VERSION

2.4.0

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

/usr/lib/python2.7/site-packages/ansible/modules/system/pamd.py

ANSIBLE VERSION

ansible 2.3.0.0
config file = /var/lib/ansible/local/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.5 (default, Aug 29 2016, 10:12:21) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

CONFIGURATION

[defaults]

inventory = ./inventory_dlabtuxm

forks = 30

remote_port = 22

gather_subset	= all

gather_timeout	= 10

roles_path	= ./roles

host_key_checking = False

timeout = 5

remote_user = root

log_path = /var/log/ansible/ansible.log

ansible_managed = Ansible managed

squash_actions = apk,apt,dnf,homebrew,package,pacman,pkgng,yum,zypper

no_log = False

var_compression_level = 9

module_compression = 'ZIP_DEFLATED'

max_diff_size = 1048576

[privilege_escalation]

become=True

become_method=sudo

become_user=root

become_ask_pass=False

[ssh_connection]

[colors]

OS / ENVIRONMENT

N/A

SUMMARY

When you have more than 2 parameters on a rule.control, the module duplicate parameters starting at second parameter, as many times as rule_types exits before. No matter whether apply some changes or not (in the playbook), this happens all the time and inserts these duplicates parameters each time you run the playbook.

STEPS TO REPRODUCE

Example: /etc/pam.d/system-auth

auth	required	pam_env.so

auth	required	pam_tally2.so deny=5 onerr=fail

auth	sufficient	pam_fprintd.so

auth	[default=1 success=ok]	pam_localuser.so

auth	[success=done ignore=ignore default=die] ignore=ignore default=die] ignore=ignore default=die] ignore=ignore default=die] ignore=ignore default=die] pam_unix.so nullok

As you can see, there are 4 rule_types (AUTH), before the rule_control ([success=done ignore=ignore default=die]), and it duplicates, starting the second parameter, a total of 4 times.

I starting to analyze the code, and I think the string split to assign values to each rule could be enhanced with a loop. That way no matter how many parameters rule.control have.

@classmethod

def rulefromstring(cls, stringline):

split_line = stringline.split()

rule_type = split_line[0]
rule_control = split_line[1]

if rule_control.startswith('['):
rule_control = stringline[stringline.index('['):
stringline.index(']')+1]

###################################################################

if "]" in split_line[2]:

rule_module_path = split_line[3]

rule_module_args = split_line[4:]

else:

rule_module_path = split_line[2]

rule_module_args = split_line[3:]

###################################################################

return cls(rule_type, rule_control, rule_module_path, rule_module_args)

I tried that piece of code, for example with this line:

s="session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid"

The result is OK:

python test_rulefromstring.py

('session', '[success=1 default=ignore]', 'pam_succeed_if.so', ['service', 'in', 'crond', 'quiet', 'use_uid'])

But if you try with more than two parameter in the rule_control:

s="account [success=ok new_authtok_reqd=ok ignore=ignore default=bad] pam_sss.so service in crond quiet use_uid"

The result is:

python test_rulefromstring.py

('account', '[success=ok new_authtok_reqd=ok ignore=ignore default=bad]', 'new_authtok_reqd=ok', ['ignore=ignore', 'default=bad]', 'pam_sss.so', 'service', 'in', 'crond', 'quiet', 'use_uid'])

This means that rule_module_path and rule_module_args get an incorrect value.

The loop:

for line, val in enumerate(stringline.split()):

print line, val

if "]" in val:

rule_module_path = split_line[line+1]

rule_module_args = split_line[line+2:]

else:

rule_module_path = split_line[2]

rule_module_args = split_line[3:]

python test_rulefromstring.py

0 account

1 [success=ok

2 new_authtok_reqd=ok

3 ignore=ignore

4 default=bad]

5 pam_sss.so

6 service

7 in

8 crond

9 quiet

10 use_uid

('account', '[success=ok new_authtok_reqd=ok ignore=ignore default=bad]', 'pam_sss.so', ['service', 'in', 'crond', 'quiet', 'use_uid'])

I haven't been able to found which piece of code change the rule, would you be so kind to help me or guide me on this.

Thanks in advance,

EXPECTED RESULTS

Example: /etc/pam.d/system-auth

auth	required	pam_env.so

auth	required	pam_tally2.so deny=5 onerr=fail

auth	sufficient	pam_fprintd.so

auth	[default=1 success=ok]	pam_localuser.so

auth	[success=done ignore=ignore default=die] pam_unix.so nullok

ACTUAL RESULTS

Example: /etc/pam.d/system-auth

auth	required	pam_env.so

auth	required	pam_tally2.so deny=5 onerr=fail

auth	sufficient	pam_fprintd.so

auth	[default=1 success=ok]	pam_localuser.so

auth	[success=done ignore=ignore default=die] ignore=ignore default=die] ignore=ignore default=die] ignore=ignore default=die] ignore=ignore default=die] pam_unix.so nullok