Open digimatspa opened 5 years ago
Can you please mention the OS and ansible versions you use?
OS: Ubuntu 18.04 Ansible: 2.6.0 Vagrant: 2.2.5 (MacOS Sierra)
The following action fails:
TASK [geonode : patch geonode-project settings file] ***************************
fatal: [geonode]: FAILED! => {"changed": true, "cmd": "cd \"/home/vagrant/myapp/myapp\" && patch < settings.patch", "delta": "0:00:00.005205", "end": "2019-09-30 16:44:13.670220", "msg": "non-zero return code", "rc": 1, "start": "2019-09-30 16:44:13.665015", "stderr": "", "stderr_lines": [], "stdout": "patching file settings.py\nHunk #1 FAILED at 24.\n1 out of 1 hunk FAILED -- saving rejects to file settings.py.rej", "stdout_lines": ["patching file settings.py", "Hunk #1 FAILED at 24.", "1 out of 1 hunk FAILED -- saving rejects to file settings.py.rej"]}
Probably the problem resides in the settings.patch file not taking into account the application name (app_name variable). The patch contains:
from my_geonode.local_settings import *
but the package name (my_geonode) depends on the app_name variable. I can supply a possible workaround.
While patching geonode-project settings file with "GeoNode" as the github_user variable, the resulting python import statement doesn't contain the application name defined in app_name variable, thus producing an import error.