Installation Playbook Fails

Following this documentation: https://docs.cs-cart.com/latest/developer_guide/getting_started/server_ansible_playbooks.html
which i have in the past, it no longer works. The last step, "Run a playbook" fails when enabling FPM.
Not sure what has changed but it no longer seems to work and this is really impacting my ability to get CS-Cart installed and running.
I am installing in AWS, on an Ubuntu 16.04LTS platform -- brand new, just spun up with nothing else installed. Getting the following error:
TASK [php7/fpm : enabling FPM configuration] ******************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"msg": "The conditional check '(ansible_os_family == \"Debian\") and (php_result|changed)' failed. The error was: template error while templating string: no filter named 'changed'. String: {% if (ansible_os_family == \"Debian\") and (php_result|changed) %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/ubuntu/playbooks/roles/php7/fpm/tasks/main.yml': line 37, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: enabling FPM configuration\n ^ here\n"}

which i have in the past, it no longer works. The last step, "Run a playbook" fails when enabling FPM.
Not sure what has changed but it no longer seems to work and this is really impacting my ability to get CS-Cart installed and running.
I am installing in AWS, on an Ubuntu 16.04LTS platform -- brand new, just spun up with nothing else installed. Getting the following error:
TASK [php7/fpm : enabling FPM configuration] ******************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"msg": "The conditional check '(ansible_os_family == \"Debian\") and (php_result|changed)' failed. The error was: template error while templating string: no filter named 'changed'. String: {% if (ansible_os_family == \"Debian\") and (php_result|changed) %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/ubuntu/playbooks/roles/php7/fpm/tasks/main.yml': line 37, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: enabling FPM configuration\n ^ here\n"}

Hi, did you solve this issue?

Hi,

I've just experienced the same issue here. Which Ansible version were you running? I'm not an Ansible expert but I think the issue is that the "php_result|changed" test needs to be changed to "php_result is changed" in the following file:

./roles/php/fpm/tasks/main.yml: when: (ansible_os_family == "Debian") and (php_result|changed)

And these too, by the looks of things:

/roles/php7/fpm/tasks/main.yml: when: (ansible_os_family == "Debian") and (php_result|changed)
./roles/varnish/tasks/install.yml: when: setup_varnish_repo.changed and ansible_os_family == "RedHat"
./roles/php/common/tasks/main.yml: when: (ansible_os_family == "Debian") and (php_result|changed)


I believe it's due to the | test operator being deprecated in Ansible 2.5 and removed in 2.9 (I'm using 2.9 here). 2.5 seems to work ok.

Is there a maintainer for the Ansible playbooks here? I've forked the repo and am investigating a few other issues which are probably related. It would be good to get them working out of the box with more recent version.

Hi,

I've just experienced the same issue here. Which Ansible version were you running? I'm not an Ansible expert but I think the issue is that the "php_result|changed" test needs to be changed to "php_result is changed" in the following file:

./roles/php/fpm/tasks/main.yml: when: (ansible_os_family == "Debian") and (php_result|changed)

And these too, by the looks of things:

/roles/php7/fpm/tasks/main.yml: when: (ansible_os_family == "Debian") and (php_result|changed)
./roles/varnish/tasks/install.yml: when: setup_varnish_repo.changed and ansible_os_family == "RedHat"
./roles/php/common/tasks/main.yml: when: (ansible_os_family == "Debian") and (php_result|changed)


I believe it's due to the | test operator being deprecated in Ansible 2.5 and removed in 2.9 (I'm using 2.9 here). 2.5 seems to work ok.

Is there a maintainer for the Ansible playbooks here? I've forked the repo and am investigating a few other issues which are probably related. It would be good to get them working out of the box with more recent version.

Yes, the "maintainer" is CS-Cart team.

The CS Cart devs have just merged my pull request with a fix for this into the master of the CS Cart Ansible playbooks. You can test it by using the latest version. Should work on Ansible >=2.9 now.

https://github.com/cscart/server-ansible-playbooks