Skip to content

Commit

Permalink
Devcontainer - Change Ansible to 2.16 and fix CMCI int test issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Latham committed Oct 30, 2024
1 parent 0579e81 commit 641fff8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"remoteUser": "root",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/collections/ansible_collections/ibm/ibm_zos_cics,type=bind",
"workspaceFolder": "/workspace/collections",
"postAttachCommand": "bash /workspace/collections/ansible_collections/ibm/ibm_zos_cics/.devcontainer/setup.sh",
"postAttachCommand": "bash /workspace/collections/ansible_collections/ibm/ibm_zos_cics/.devcontainer/setup.sh",
"initializeCommand": "eval \"$(ssh-agent -s)\" > /dev/null && grep -slR \"PRIVATE\" ~/.ssh | xargs ssh-add",
"postCreateCommand": {
"gitMarkSafe": "git config --global --add safe.directory /workspaces/collections/ansible_collections/ibm/ibm_zos_cics"
},
Expand Down
7 changes: 1 addition & 6 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ fi
eval "$(ssh-agent)"
ssh-add

python_ver=$(python -c 'import platform; major, minor, patch = platform.python_version_tuple(); print("{0}.{1}".format(major,minor))')

python3 -m pip install --user ansible-core==2.17.4
python3 -m pip install --user ansible-core==2.16

ansible-galaxy collection install ibm.ibm_zos_core:==1.9.1 -p /workspace/collections
ansible-galaxy collection install community.general -p /workspace/collections
Expand All @@ -24,9 +22,6 @@ echo -e "[defaults]\nstdout_callback=community.general.yaml\nCOLLECTIONS_PATHS=/
pip install -r /workspace/collections/ansible_collections/ibm/ibm_zos_cics/dev-requirements.txt
pip install -r /workspace/collections/ansible_collections/ibm/ibm_zos_cics/doc-requirements.txt

# Remove additional pythons from bin so we can use shorthand ansible commands
find /usr/bin/python* -type f -not -name python"${python_ver}" -exec rm -v {} +

mkdir -p /commandhistory
touch /commandhistory/.zsh_history
chown -R root /commandhistory
Expand Down

0 comments on commit 641fff8

Please sign in to comment.