diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8f4a5dc1..2883797e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,10 +10,8 @@ "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", - "initializeCommand": "eval \"$(ssh-agent -s)\" > /dev/null && grep -slR \"PRIVATE\" ~/.ssh | xargs ssh-add", "mounts" : [ - "source=vscode-shell-history,target=/commandhistory,type=volume", - "source=${localEnv:HOME}/.ssh,target=/root/.ssh-local,type=bind,consistency=cached" + "source=vscode-shell-history,target=/commandhistory,type=volume" ], "customizations": { "vscode": { @@ -22,7 +20,16 @@ "ms-python.python", "eamodio.gitlens", "ms-vsliveshare.vsliveshare" - ] + ], + "settings": { + "terminal.integrated.defaultProfile.linux": "zsh", + "terminal.integrated.profiles.linux": { + "zsh": { + "path": "/bin/zsh" + } + }, + "terminal.integrated.cwd": "/workspace/collections/ansible_collections/ibm/ibm_zos_cics/" + } } } } \ No newline at end of file diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index ee952104..36b863a1 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -1,38 +1,9 @@ #!/usr/bin/env bash # Copy contents to the .ssh directory -cp -r /root/.ssh-local/. /root/.ssh -if [ -e /root/.ssh/config ]; then - # If config file exists - mv ~/.ssh/config ~/.ssh/config-local - touch ~/.ssh/config - cat ~/.ssh/config-local > ~/.ssh/config - rm ~/.ssh/config-local -fi - 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 -echo -e "[defaults]\nstdout_callback=community.general.yaml\nCOLLECTIONS_PATHS=/workspace/collections" > ~/.ansible.cfg - 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 - -mkdir -p /commandhistory -touch /commandhistory/.zsh_history -chown -R root /commandhistory - -{ - # Add history to zsh shell - echo "export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.zsh_history" - - # Make this ansible_cics_collection repo the default repo when opening a new zsh terminal - echo "cd /workspace/collections/ansible_collections/ibm/ibm_zos_cics/" - echo "git config --global --add safe.directory /workspaces/collections/ansible_collections/ibm/ibm_zos_cics" -} >> "/root/.zshrc" - - - -# .zshrc file configuration - Use default zsh_theme -sed -i '/^ZSH_THEME/c\ZSH_THEME="robbyrussell"' ~/.zshrc +pip install -r /workspace/collections/ansible_collections/ibm/ibm_zos_cics/doc-requirements.txt \ No newline at end of file