You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vagrant@test:~$ cikit reinstall
PLAY [localhost] *******************************************************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Set path to directory, where project accessible from web] ********************************************************************************************************************************************
ok: [localhost]
TASK [Set path to directory, where project codebase located] ***********************************************************************************************************************************************
ok: [localhost]
TASK [Set path to reports directory and URL by which they will be accessible] ******************************************************************************************************************************
ok: [localhost]
TASK [Ensure that project directory has correct permissions] ***********************************************************************************************************************************************
ok: [localhost] => (item=/var/www/docroot)
ok: [localhost] => (item=/var/www/docroot/reports)
changed: [localhost] => (item=/var/www/docroot/sites/default)
TASK [Initialize an empty build report] ********************************************************************************************************************************************************************
ok: [localhost]
TASK [Check installation of Composer packages] *************************************************************************************************************************************************************
ok: [localhost]
TASK [Check for composer.json existence] *******************************************************************************************************************************************************************
ok: [localhost]
TASK [Install Composer packages] ***************************************************************************************************************************************************************************
TASK [Check existence of installation mode] ****************************************************************************************************************************************************************
ok: [localhost]
TASK [Check existence of environment configuration] ********************************************************************************************************************************************************
ok: [localhost]
TASK [Obtain home directory of a user, who triggered this script] ******************************************************************************************************************************************
changed: [localhost]
TASK [Set the user's home directory] ***********************************************************************************************************************************************************************
ok: [localhost]
TASK [Ensure directory for backup data exists] *************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "gid": 80, "group": "80", "mode": "0777", "msg": "chown failed: [Errno 1] Operation not permitted: '/var/www/backup'", "owner": "501", "path": "/var/www/backup", "size": 68, "state": "directory", "uid": 501}
...ignoring
TASK [Seek for SSH keys] ***********************************************************************************************************************************************************************************
ok: [localhost]
TASK [Copy SSH keys] ***************************************************************************************************************************************************************************************
TASK [include_vars] ****************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Compute actions to run] ******************************************************************************************************************************************************************************
ok: [localhost] => (item=composer)
ok: [localhost] => (item=npm)
TASK [include_tasks] ***************************************************************************************************************************************************************************************
included: /var/www/scripts/tasks/reinstall/actions/packages-install.yml for localhost
TASK [include_tasks] ***************************************************************************************************************************************************************************************
included: /var/www/scripts/tasks/reinstall/actions/cache-get.yml for localhost
TASK [Check for Composer packages in cache] ****************************************************************************************************************************************************************
ok: [localhost]
TASK [Check for Composer packages at place] ****************************************************************************************************************************************************************
ok: [localhost]
TASK [Check whether Composer packages should be reinstalled] ***********************************************************************************************************************************************
ok: [localhost]
TASK [Copy Composer packages from cache] *******************************************************************************************************************************************************************
TASK [Check for /var/www/docroot/composer.json] ************************************************************************************************************************************************************
ok: [localhost]
TASK [Install Composer packages] ***************************************************************************************************************************************************************************
TASK [include_tasks] ***************************************************************************************************************************************************************************************
TASK [include_tasks] ***************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "reason": "'is_reinstall_mode' is undefined"}
PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=22 changed=2 unreachable=0 failed=1
If we put - debug: var=is_reinstall_mode right before the include_tasks the correct value of the variable will be shown.
If we remove the condition and will do just - include_tasks: "tasks/reinstall/modes/full.yml" the new error will appear:
fatal: [localhost]: FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: 'state' is undefined\n\nThe error appears to have been in '/var/www/scripts/tasks/database/database.yml': line 2, 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: \"{{ name | default('command') }}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'state' is undefined"}
The text was updated successfully, but these errors were encountered:
The problem is solving by replacing all import_tasksby include_tasks in full.yml. Seems import_tasks cannot live inside of a file which has been included using include_tasks.
- debug: var=is_reinstall_mode
right before theinclude_tasks
the correct value of the variable will be shown.- include_tasks: "tasks/reinstall/modes/full.yml"
the new error will appear:The text was updated successfully, but these errors were encountered: