BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
telly
SAS Employee

Hello, I got blocked with below error when I deploy SAS Viya3.5 with [ ansible-playbook site.yml ] command.

And I tried to this 3 ways to solve this, but didn't work.

1. After sudo su then enter command.

2. Do not sudo su and enter command.

3. Clear all fails with this [ sudo yum remove -y sas-* ] command and do it again.

 

Do you have any ideas?

Permission denied...?

Fail to create snapshot...?

 

 

Error:

telly_0-1591944664965.png

 

TASK [create-snapshot : Create /sas/install/sas_viya_playbook/snapshot/1591944223] *************************************************************************************************************
fatal: [deployTarget -> localhost]: FAILED! => {"changed": false, "msg": "There was an issue creating /sas/install/sas_viya_playbook/snapshot/1591944223 as requested: [Errno 13] Permission denied: '/sas/install/sas_viya_playbook/snapshot/1591944223'", "path": "/sas/install/sas_viya_playbook/snapshot/1591944223", "state": "absent"}

NO MORE HOSTS LEFT *****************************************************************************************************************************************************************************

PLAY RECAP *************************************************************************************************************************************************************************************
deployTarget : ok=87 changed=5 unreachable=0 failed=1
localhost : ok=9 changed=0 unreachable=0 failed=0

1 ACCEPTED SOLUTION

Accepted Solutions
AnandVyas
Ammonite | Level 13
Is the path "/sas/install/sas_viya_playbook/snapshot/" created on the server file-system? If yes, what are the permissions assigned to it?

View solution in original post

11 REPLIES 11
AnandVyas
Ammonite | Level 13
Is the path "/sas/install/sas_viya_playbook/snapshot/" created on the server file-system? If yes, what are the permissions assigned to it?
telly
SAS Employee

Thank you for your hlep!

I checked my settings, configurations again and it worked!

pradeep_rana
Calcite | Level 5

Hello, Could you please confirm which permission provided to resolve issue

 

Here is reference of permission provided, but still facing same issue

drwxrwxrwx 2 sas sas 6 May 26 17:47 snapshot

 

pradeep_rana_0-1653568391308.png

 

gwootton
SAS Super FREQ
This error message suggests we are unable to create the directory /sas/install/sas_viya_playbook/snapshot/1653567722 on host cas-controller-1. Is that where you are looking? Are you able to create that directory outside of ansible?
--
Greg Wootton | Principal Systems Technical Support Engineer
pradeep_rana
Calcite | Level 5

Hello Team,

 

Please help to resolve following problem,

 

TASK [vault_gencerts : Create machine certificate] *********************************************************************************************************************
fatal: [cas-controller-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/sas/install/sas_viya_playbook/roles/vault_gencerts/tasks/main.yml': line 9, 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: Create machine certificate\n ^ here\n"}
fatal: [cas-backup-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/sas/install/sas_viya_playbook/roles/vault_gencerts/tasks/main.yml': line 9, 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: Create machine certificate\n ^ here\n"}
fatal: [cas-worker-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/sas/install/sas_viya_playbook/roles/vault_gencerts/tasks/main.yml': line 9, 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: Create machine certificate\n ^ here\n"}
fatal: [cas-worker-2]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/sas/install/sas_viya_playbook/roles/vault_gencerts/tasks/main.yml': line 9, 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: Create machine certificate\n ^ here\n"}
fatal: [cas-microservices-1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/sas/install/sas_viya_playbook/roles/vault_gencerts/tasks/main.yml': line 9, 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: Create machine certificate\n ^ here\n"}
fatal: [cas-microservices-2]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/sas/install/sas_viya_playbook/roles/vault_gencerts/tasks/main.yml': line 9, 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: Create machine certificate\n ^ here\n"}
fatal: [cas-microservices-3]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/sas/install/sas_viya_playbook/roles/vault_gencerts/tasks/main.yml': line 9, 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: Create machine certificate\n ^ here\n"}

NO MORE HOSTS LEFT *****************************************************************************************************************************************************

PLAY RECAP *************************************************************************************************************************************************************
cas-backup-1 : ok=134 changed=22 unreachable=0 failed=1 skipped=303 rescued=0 ignored=0
cas-controller-1 : ok=165 changed=37 unreachable=0 failed=1 skipped=355 rescued=0 ignored=0
cas-microservices-1 : ok=106 changed=20 unreachable=0 failed=1 skipped=176 rescued=0 ignored=0
cas-microservices-2 : ok=106 changed=20 unreachable=0 failed=1 skipped=176 rescued=0 ignored=0
cas-microservices-3 : ok=106 changed=20 unreachable=0 failed=1 skipped=176 rescued=0 ignored=0
cas-worker-1 : ok=157 changed=22 unreachable=0 failed=1 skipped=935 rescued=0 ignored=0
cas-worker-2 : ok=157 changed=23 unreachable=0 failed=1 skipped=935 rescued=0 ignored=0
localhost : ok=11 changed=1 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0

pradeep_rana_0-1654012594374.png

 

 

gwootton
SAS Super FREQ
The error is saying we are missing a variable definition.

That particular task uses several variables:
{{ INSTALL_USER }}
{{ SASHOME }}
{{ sas_vars.hostname_fqdn }}
{{ SAS_CONFIG_ROOT }}
{{ sas_vars.internal_deployment_ipv4 }}
{{ hostvars[groups[''consul''][0]][''sas_vars''][''hostname_fqdn''] }}

While those in CAP are from group_vars/all, the lowercase ones come from your inventory.ini file. Do you have a valid host defined under the consul group in your inventory.ini?
--
Greg Wootton | Principal Systems Technical Support Engineer
Chethandeepak
Calcite | Level 5

fatal: [deployTarget]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'host_keys'\n\nThe error appears to be in '/sasdata/SASInstall/sas_viya_playbook/internal/validate.yml': line 80, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n when: host_connection_register is defined and host_connection_register.failed is defined and host_connection_register.failed\n - name: Add host connection results to stored data\n ^ here\n"
}
fatal: [cascontrollers]: FAILED! => {
"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'host_keys'\n\nThe error appears to be in '/sasdata/SASInstall/sas_viya_playbook/internal/validate.yml': line 80, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n when: host_connection_register is defined and host_connection_register.failed is defined and host_connection_register.failed\n - name: Add host connection results to stored data\n ^ here\n"

 

getting this error while running system-assessment.yml . please help me out

gwootton
SAS Super FREQ
Are you able to ssh to these hosts as defined in inventory.ini from your playbook host?
--
Greg Wootton | Principal Systems Technical Support Engineer
ahmedaldorr
Fluorite | Level 6

any luck with this issue?

MikeKola
Calcite | Level 5

Is this issue resolved? I'm having the same issue

MikeKola
Calcite | Level 5

I'm able to ssh in without any problem

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Discussion stats
  • 11 replies
  • 3562 views
  • 3 likes
  • 7 in conversation