Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

Ansible play-book randomly fails with error message ERROR[Timeout (12s) waiting for privilege escalation prompt: ]

ANSIBLE VERSION

Ansible version: 2.3

CONFIGURATION

[defaults]

inventory = ./hosts

log_path = /dev/null

remote_user = ansible

host_key_checking = False

retry_files_enabled = False

[ssh_connection]

pipelining = True

ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o UserKnownHostsFile=/dev/null

OS / ENVIRONMENT

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=16.04

DISTRIB_CODENAME=xenial

DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

SUMMARY

ansible runs in our environment every hour and randomly on different hosts we get Timeout (12s) waiting for privilege escalation prompt, I have repeated the test on the environment which all hosts where on local network and I saw the exact error.

STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Issue 2:
Issue Type:

Bug Report

Ansible Version:

ansible 1.9.2

configured module search path = None

Environment:

Arch Linux

Summary:

Taken from my Post here: https://groups.google.com/forum/#!topic/ansible-project/lsFr9tAUdUE

Yesterday i took another try on the role dependency feature and realize that this doesn't work as i expect this as the dependencies are not multiple executed with the "allow_duplicates: yes" feature enabled and also not executed when i use Tags on the roles.

Steps To Reproduce:

I try to explain what i mean with an sample playbook/roles:

$ cat play-test.yml

---
- name: dependency test
gather_facts: false
hosts: localhost

roles:
- { role: feature1 }
- { role: feature2 }

$ cat roles/feature1/tasks/main.yml

---
- name: in feature1
debug: msg="here we are in feature1"

$ cat roles/feature1/meta/main.yml

---
allow_duplicates: yes
dependencies:
- { role: base }

$ cat roles/feature2/tasks/main.yml

---
- name: in feature2
debug: msg="here we are in feature2"

$ cat roles/feature2/meta/main.yml

---
allow_duplicates: yes
dependencies:
- { role: base }

$ cat roles/base/tasks/main.yml

---
- name: in base
debug: msg="here we are in base"

I would expect because of the allow_duplicates: yes that the basic role is executed twice but that doesn't happen:

$ ansible-playbook play-test.yml

PLAY [dependency test] ********************************************************

TASK: [base | in base] ********************************************************
ok: [localhost] => {
"msg": "here we are in base"
}

TASK: [feature1 | in feature1] ************************************************
ok: [localhost] => {
"msg": "here we are in feature1"
}

TASK: [feature2 | in feature2] ************************************************
ok: [localhost] => {
"msg": "here we are in feature2"
}

PLAY RECAP ********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0

After that I extend the example with another pice named tags:

$ cat play-test.yml

---
- name: dependency test
gather_facts: false
hosts: localhost

roles:
- { role: feature1, tags: feature1 }
- { role: feature2, tags: feature2 }

This gives me another strage behavior if you look at the following output (i used --list-tags for simplicity):

$ ansible-playbook play-test.yml --list-tasks

playbook: play-test.yml

play #1 (dependency test): TAGS: []
in base TAGS: [feature1]
in feature1 TAGS: [feature1]
in feature2 TAGS: [feature2]

As there is still "allow_duplicates: yes" active, i would expect the execution of base 2 times.

So i try the following (as this is my initial intention to use role dependencys and tags):

$ ansible-playbook play-test.yml --list-tasks -t feature1

playbook: play-test.yml

play #1 (dependency test): TAGS: []
in base TAGS: [feature1]
in feature1 TAGS: [feature1]

Looks OK to me, but then:

$ ansible-playbook play-test.yml --list-tasks -t feature2

playbook: play-test.yml

play #1 (dependency test): TAGS: []
in feature2 TAGS: [feature2]

So in the second try the base role isn't run at all.

This is definitely not the expected behavior. In the role "feature2" the dependency is set to the "basic" role and in my eyes if i specify an role with an tag the dependency should run (like the first one).

Did i miss something?

BTW: This is the inverse behavior as i realized in this bug: #9578

This was closed with:

this is expected, the 'no duplicates' is not just on role name but on the role 'signature' so by passing different tags you make them 'differnt roles'."

It seems that this breaks on the way from 1.7.2 to 1.9.2

All in all i'm really confused about the actual behavior with the meta - dependency stuff and the tags stuff.

In the docs the Tags feature is described with "If you have a large playbook it may become useful to be able to run a specific part of the configuration without running the whole playbook."

But when someone try to use it together with the dependency feature this is broken.

the old behavior is to run the dependency for every Tag Keyword (witch it is not what i expect from the combination)

actually the dependency is only run once on the first role defined in playbook which depends on the role