Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Role fails when not defining SS api key in am-configure (vagrant deploy) #311

Open
mamedin opened this issue Nov 26, 2020 · 1 comment
Assignees

Comments

@mamedin
Copy link
Contributor

mamedin commented Nov 26, 2020

Error in vagrant deploy:

TASK [artefactual.archivematica-src : Get SS API Key] **************************
fatal: [am-local]: FAILED! => {"changed": false, "module_stderr": "sudo: se requiere una contraseña\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP *********************************************************************
am-local                   : ok=213  changed=133  unreachable=0    failed=1    skipped=174  rescued=0    ignored=3   
@mamedin mamedin self-assigned this Nov 26, 2020
@mamedin mamedin changed the title Problem: Role fails when not defining SS api key in am-configure Problem: Role fails when not defining SS api key in am-configure (vagrant deploy) Nov 26, 2020
@mamedin
Copy link
Contributor Author

mamedin commented Nov 30, 2020

The deploy-pub commits fix the issue for the deploy-pub deploys, but it is a workaround.

The following task doesn't work fine when using vagrant (port 2222 and its ssh key):

- name: "Get SS API Key"
  shell: >
    echo "select \`key\` from tastypie_apikey where id in (select id from auth_user where username = '{{ archivematica_src_configure_ss_user }}');"
    | {{ archivematica_src_ss_virtualenv }}/bin/python manage.py dbshell | tail -n1
  args:
    chdir: "{{ archivematica_src_ss_app }}"
    executable: /bin/bash
  environment: "{{ archivematica_src_ss_environment }}"
  delegate_to: "{{ archivematica_src_configure_ss_url|urlsplit('hostname') }}"
  become: yes
  remote_user: "{{ archivematica_src_configure_ss_ssh_user | default('artefactual') }}"
  register: archivematica_src_configure_ss_api_key_temp
  when: 
     - "archivematica_src_configure_dashboard|bool or archivematica_src_configure_ss|bool"
     - "archivematica_src_configure_ss_api_key is undefined"

So we should check this task, especially the delegate_to directive. It only should be used when SS is in a separate VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant