- Set up SSH key in Github, this'll make clone repos much less hassle in the long run
wget https://raw.githubusercontent.com/michaelstone/local-setup/master/ubuntu-bootstrap.sh && chmod 744 ubuntu-bootstrap.sh && ./ubuntu-bootstrap.sh- Enable WSL
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux- Run provisioning script
Invoke-WebRequest -Uri https://raw.githubusercontent.com/michaelstone/local-setup/master/windows-bootstrap.ps1 -OutFile windows-bootstrap.ps1; Start-Process powershell -Verb runAs "-NoExit -ExecutionPolicy Bypass -Command cd $pwd; & .\windows-bootstrap.ps1"#. Run ansible independently
ansible-playbook windows_master.yml -i HOSTS_WINDOWS.yml --vault-id @promptNotes:
- Had to separate out ubuntu and windows master files due to create two localhost hosts
- Had to create a local administrator account to run the winrm session against
- Chrome
- nvm
- fix creates directory using ansible_user_id
- split task to create alias for default node version
- fix env variable for accessing nvm
- npm
- install latest version of npm instead of node bundled
- node
- dynamically get the latest version instead of using default var
- Update windows bootstrap to run ansible
- Update windows playbook to run role to also install/update ubuntu
- Npm install fails, try this:
- ansible/ansible-modules-extras#2128
- node isn't available when run as sudo - sudo doesn't load ~/profile
- create symlink to node binary in nvm dir before running npm tasks
- What worked: I was running ansible-playbook as sudo, left that off and set individual tasks as sudo using become and passing in -K
- Error running ansible: Could not get lock /var/lib/dpkg/lock
- Fix 1: look for other apt or apt-get processes and kill them
- Fix 2: delete the lock files
- sudo rm /var/lib/dpkg/lock
- sudo dpkg --configure -a