oveits / openshift-terraform-ansible_installer

2 stars 0 forks source link

Re-running with latest openshift-ansible subproject we get an error "no action detected in task" #2

Closed oveits closed 7 years ago

oveits commented 7 years ago

Last commit of openshift-ansible:

commit c02d227bc2fb34f53bd5dc08da17ad7b8b0a9e4f
Author: Troy Dawson <tdawson@redhat.com>
Date:   Wed Oct 12 08:47:02 2016 -0500

    Automatic commit of package [openshift-ansible] release [3.4.7-1].

Error message:

[root@314507ab3147 openshift-terraform-ansible_installer]# ansible-playbook -i ./inventory --become --private-key=.aws/SSH_Key.pem ./openshift-ansible/playbooks/byo/config.yml
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/app/openshift-terraform-ansible_installer/openshift-ansible/roles/openshift_metrics/tasks/install.yml': line 102, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Configure master for metrics
  ^ here

The error appears to have been in '/app/openshift-terraform-ansible_installer/openshift-ansible/roles/openshift_metrics/tasks/install.yml': line 102, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Configure master for metrics
  ^ here
oveits commented 7 years ago

I first thought that replacing the openshift-ansible repository by following old commit resolves the problem:

commit 1933ffb3ddf54c07034aabb2c5b4b43c07b6b54c
Merge: 0d5f1e2 06cd13f
Author: Jason DeTiberus <detiber@gmail.com>
Date:   Thu Sep 22 14:22:10 2016 -0400

    Merge pull request #2473 from lhuard1A/openstack_inventory

    Update the OpenStack dynamic inventory script

However, the real reason was that I had cloned openshift-ansible on a Windows system within a git bash session. In this case, all symbolic links are replaced by directories. And these do not seem to work. In some cases I have seen that those directories just have disappeared. In both cases (1. when they are gone, or if they exist, but not as symlink) they lead to the error message.

Cloned via Windows:

$ ls -l openshift-ansible_cloned_via_git_bash_on_windows/playbooks/common/openshift-master/
total 42
-rw-r--r-- 1 olive 197610 9221 Oct 13 11:43 config.yml
-rw-r--r-- 1 olive 197610   23 Oct 13 11:43 filter_plugins
-rw-r--r-- 1 olive 197610   17 Oct 13 11:43 library
-rw-r--r-- 1 olive 197610   23 Oct 13 11:43 lookup_plugins
-rw-r--r-- 1 olive 197610 5374 Oct 13 11:43 restart.yml
-rw-r--r-- 1 olive 197610 1319 Oct 13 11:43 restart_hosts.yml
-rw-r--r-- 1 olive 197610  825 Oct 13 11:43 restart_hosts_pacemaker.yml
-rw-r--r-- 1 olive 197610  990 Oct 13 11:43 restart_services.yml
-rw-r--r-- 1 olive 197610  302 Oct 13 11:43 restart_services_pacemaker.yml
-rw-r--r-- 1 olive 197610   15 Oct 13 11:43 roles
-rw-r--r-- 1 olive 197610 2313 Oct 13 11:43 scaleup.yml
-rw-r--r-- 1 olive 197610  614 Oct 13 11:43 service.yml

-> does not work!

Cloned via Linux:

$ mv openshift-ansible openshift-ansible_not_working.bak
$ git clone https://github.com/openshift/openshift-ansible
$ ls -l openshift-ansible/playbooks/common/openshift-master/
total 23
-rwxrwxrwx 1 vagrant vagrant 9221 Oct 13 09:58 config.yml
lrwxrwxrwx 1 vagrant vagrant    0 Oct 13 09:58 filter_plugins -> ../../../filter_plugins
lrwxrwxrwx 1 vagrant vagrant    0 Oct 13 09:58 library -> ../../../library/
lrwxrwxrwx 1 vagrant vagrant    0 Oct 13 09:58 lookup_plugins -> ../../../lookup_plugins
-rwxrwxrwx 1 vagrant vagrant  825 Oct 13 09:58 restart_hosts_pacemaker.yml
-rwxrwxrwx 1 vagrant vagrant 1319 Oct 13 09:58 restart_hosts.yml
-rwxrwxrwx 1 vagrant vagrant  302 Oct 13 09:58 restart_services_pacemaker.yml
-rwxrwxrwx 1 vagrant vagrant  990 Oct 13 09:58 restart_services.yml
-rwxrwxrwx 1 vagrant vagrant 5374 Oct 13 09:58 restart.yml
lrwxrwxrwx 1 vagrant vagrant    0 Oct 13 09:58 roles -> ../../../roles/
-rwxrwxrwx 1 vagrant vagrant 2313 Oct 13 09:58 scaleup.yml
-rwxrwxrwx 1 vagrant vagrant  614 Oct 13 09:58 service.yml

With this clone, the error disappears:

$ bash 2_docker_install_openshift_via_ansible.sh
...
PLAY [Verify Ansible version is greater than or equal to 2.1.0.0] **************

TASK [Verify Ansible version is greater than or equal to 2.1.0.0] **************
skipping: [localhost]
...

--> works! :-))

oveits commented 7 years ago

Interestingly, even if I do not touch the openshift-ansible repository, when having cloned it within Vagrant Linux on a synched folder (I have not tested any other folder), git status shows many changed files:

diff --git a/playbooks/adhoc/zabbix_setup/filter_plugins b/playbooks/adhoc/zabbix_setup/filter_plugins
--- a/playbooks/adhoc/zabbix_setup/filter_plugins
+++ b/playbooks/adhoc/zabbix_setup/filter_plugins
@@ -1 +0,0 @@
-../../../filter_plugins/
\ No newline at end of file
diff --git ...
...

is this caused by Vagrant sync?