Open kiesel opened 6 years ago
The docker_installer
comes from the host operating system's specific var file, e.g. RedHat.yml, within the role's var subdiretory. when u run it with --tag what does the output look like next to the task 'resolve platform specific vars'?
I looked into it, it seems the order of execution of the tasks is not correct. This is the excerpt from the whole role:
PLAY [backend] **********************************
TASK [Gathering Facts] **********************************
ok: [be-01.XXXXXXXX]
TASK [andrewrothstein.docker : configuring package management system] **********************************
fatal: [be-01.XXXXXXXX]: FAILED! => {"msg": "'docker_installer' is undefined"}
to retry, use: --limit @/home/dandral/dev/infra/aws/ansible/playbook.retry
When I run against the same host, without any --tag filtering:
PLAY [backend] **********************************
TASK [Gathering Facts] **********************************
ok: [be-01.XXXXXXXX]
[...]
TASK [andrewrothstein.docker : resolve platform specific vars] **********************************
ok: [be-01.XXXXXXXX] => (item=/home/dandral/dev/infra/aws/ansible/galaxy/andrewrothstein.docker/vars/Debian.yml)
TASK [andrewrothstein.docker : install OS dep pkgs...] **********************************
ok: [be-01.XXXXXXXX] => (item=apt-transport-https)
ok: [be-01.XXXXXXXX] => (item=ca-certificates)
ok: [be-01.XXXXXXXX] => (item=gnupg2)
TASK [andrewrothstein.docker : configuring package management system] **********************************
included: /home/dandral/dev/infra/aws/ansible/galaxy/andrewrothstein.docker/tasks/apt.yml for be-01.XXXXXXXX
TASK [andrewrothstein.docker : trust apt key] **********************************
ok: [be-01.XXXXXXXX]
TASK [andrewrothstein.docker : install docker.list] **********************************
ok: [be-01.XXXXXXXX]
TASK [andrewrothstein.docker : install docker-engine] **********************************
ok: [be-01.XXXXXXXX] => (item=docker-engine)
Given an Ansible playbook with multiple roles:
If I execute the whole playbook for certain hosts, execution is successful. If I execute the same playbook with a
--tag
or-t
filter, then this message appears:Filtering with the
docker
tag (which in my example the role is indeed assigned to) leads to no error.Expected state would be that the filtering out does not lead to this error.