Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Installation Playbook Fails Rate Topic   - - - - -

 
  • VerDan
  • Member
  • Trial users
  • Join Date: 13-Nov 18
  • 25 posts

Posted 18 November 2019 - 12:25 PM #1

Following this documentation:  https://docs.cs-cart..._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"}
 


 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 570 posts

Posted 09 February 2020 - 08:43 AM #2

 

Following this documentation:  https://docs.cs-cart..._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"}

 

Hi, did you solve this issue?


Buy CS-Cart License | CS-Cart Hosting
.
CS-Cart VPS SSD Cloud Hosting from $4,90/month *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 
  • andytheape
  • Newbie
  • Members
  • Join Date: 04-May 20
  • 2 posts

Posted 05 May 2020 - 08:40 AM #3

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.



 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 570 posts

Posted 15 May 2020 - 02:08 PM #4

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.


Buy CS-Cart License | CS-Cart Hosting
.
CS-Cart VPS SSD Cloud Hosting from $4,90/month *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider