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

Ansible request for directory creation on Windows #2711

Open
sxa opened this issue Aug 25, 2022 · 6 comments
Open

Ansible request for directory creation on Windows #2711

sxa opened this issue Aug 25, 2022 · 6 comments
Assignees
Labels
ansible awxDeployFailure Issues relating to playbook deployment failures reliability

Comments

@sxa
Copy link
Member

sxa commented Aug 25, 2022

Please put the name of the software product (and affected platforms if relevant) in the title of this issue

Delete as appropriate from this list:

  • Bug in ansible playbook

Details:
Windows playbooks utilise but do not create c:\temp which is required for some playbook roles and it is not on all machines by default. Similarly c:\openjdk which is required when creating the symbolic links with mklink will fail with The system cannot find the path specified

@sxa sxa added the ansible label Aug 25, 2022
@steelhead31 steelhead31 self-assigned this Sep 1, 2022
@steelhead31 steelhead31 added this to the 2022-09 (September) milestone Sep 1, 2022
@steelhead31
Copy link
Contributor

steelhead31 commented Sep 2, 2022

@sxa believe these directories are created at the very beginning of the Common role in the windows playbook. Can you see if you can reproduce this, as I am unable.

TASK [Common : Create C:\temp directory] ***************************************
changed: [192.168.50.8]

TASK [Common : Create C:\openjdk directory] ************************************
changed: [192.168.50.8]

@sxa sxa removed this from the 2022-09 (September) milestone Sep 5, 2022
@sxa
Copy link
Member Author

sxa commented Sep 5, 2022

Removing from the September plan until I can attempt to reproduce on a clean Azure deployment (Unsure which type of machine I hit this on)

@sxa sxa added reliability awxDeployFailure Issues relating to playbook deployment failures labels Sep 5, 2022
@sxa
Copy link
Member Author

sxa commented Oct 18, 2022

Hit this again today when using a new Windows system created at Azure:
AWX link: https://awx2.adoptopenjdk.net/#/jobs/playbook/553

TASK [WMF_5.1 : Get WMF 5.1 Packages] ******************************************
fatal: [build-sxa-win2012r2-x64-1]: FAILED! => {"changed": false, "dest": "C:/temp/WMFinstaller.msu", "elapsed": 0, "msg": "The path 'C:\\temp' does not exist for destination 'C:/temp/WMFinstaller.msu', or is not visible to the current user.  Ensure download destination folder exists (perhaps using win_file state=directory) before win_get_url runs.", "url": "https://go.microsoft.com/fwlink/?linkid=839516"}
PLAY RECAP *********************************************************************
build-sxa-win2012r2-x64-1  : ok=8    changed=2    unreachable=0    failed=1    skipped=5    rescued=0    ignored=0   

Created the directory manually to work around it.

@steelhead31
Copy link
Contributor

I notice in the awx jobit has the skipped tag "basic_config" , the task that creates the c:\temp dir has this tag..
- name: Create C:\temp directory
 win_file:
   path: C:\temp
   state: directory
 tags: basic_config

@sxa
Copy link
Member Author

sxa commented Oct 18, 2022

Similarly I'm missing C:\openjdk resulting in this:

TASK [Java7 : Create symlink to Java 7] ****************************************
fatal: [build-sxa-win2012r2-x64-1]: FAILED! => {"changed": true, "cmd": "mklink /D \"C:\\openjdk\\jdk-7\" \"C:\\Program Files\\Java\\java-se-7u75-ri\"", "delta": "0:00:00.062500", "end": "2022-10-18 01:08:21.670590", "msg": "non-zero return code", "rc": 1, "start": "2022-10-18 01:08:21.608089", "stderr": "The system cannot find the path specified.\r\n", "stderr_lines": ["The system cannot find the path specified."], "stdout": "", "stdout_lines": []}
PLAY RECAP *********************************************************************
build-sxa-win2012r2-x64-1  : ok=44   changed=25   unreachable=0    failed=1    skipped=5    rescued=0    ignored=0   

@sxa
Copy link
Member Author

sxa commented Oct 18, 2022

I notice in the awx jobit has the skipped tag "basic_config" , the task that creates the c:\temp dir has this tag.. - name: Create C:\temp directory win_file: path: C:\temp state: directory tags: basic_config

Well spotted - I don't recall why that is there. We should probably check whether the use of that role is a sensible approach for creating those directories ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible awxDeployFailure Issues relating to playbook deployment failures reliability
Projects
None yet
Development

No branches or pull requests

2 participants