Issue 1:
Issue Type:

Bug Report

Ansible Version:

1.9.0.1

Environment:

Managing CentOS 6 from MacOS X 10.10.2

Summary:

The service module is failing to start an upstart service on CentOS 6

Steps To Reproduce:

ansible hostname -m service -a 'name=servicename state=started'

Expected Results:

I expected ansible to start the service. This works on 1.8.4, but fails on 1.9.0.1.

Actual Results:

Ansible fails with the following error:

$ ansible ns1.ams.as112.ripe.net -u root -m service -a 'name=ansible state=started'
ns1.ams.as112.ripe.net | FAILED >> {
"failed": true,
"msg": "ansible: unrecognized service\n"
}

Issue 2:
Issue Type:

Bug Report

Ansible Version:

ansible 1.7.2 (1.7.2+dfsg-2~bpo70+1)

Environment:

Debian 7.7

Summary:

Today i try to split our grown ansible roles in more simple roles.

After do some work i realize that after rewrite and set some dependencies in our roles, some roles got executed multiple times.

So i google a bit and found an bug report (#5971) which descibe the same behavior.

The bug gets closed because of not reproducable and no further information.

So i recreate the simple test in comment nr. 4 and BAM...no duplicate running!

After some testing i figured out the only difference to our plays.

The duplicate run is triggered if you add some tags to the play.

As sugested in https://groups.google.com/d/msg/ansible-project/3Tc6MUZ1dFI/JHFNplVccxcJ i've open this bug report.

Steps To Reproduce:

run without duplicates:

# test.yml

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

roles:
- { role: base }
- { role: feature }

# roles/base/meta/main.yml

---

# roles/base/tasks/main.yml

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

# roles/feature/meta/main.yml

---
dependencies:
- { role: base }

# roles/feature/tasks/main.yml

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

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

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

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

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

run with duplicates:

# test.yml

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

roles:
- { role: base, tags: base }
- { role: feature, tags: feature }

# roles/base/meta/main.yml

---

# roles/base/tasks/main.yml

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

# roles/feature/meta/main.yml

---
dependencies:
- { role: base }

# roles/feature/tasks/main.yml

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

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

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

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

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

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

Expected Results:

If the playbook is run, and the roles are tagged the dependencys should run only once.

Actual Results:

If the playbook is run, and the roles are tagged the dependencys run multiple times.