--- # Does final setup including up-to-date config for the user. # Assumes that bin/zone is present in $PWD # # Usage: ansible-playbook -l --extra-vars '{ "local_pwd": "/home/alastair/Personal" }' /user_stuff.yml # Usage: ansible-playbook -l --extra-vars '{ "local_pwd": "'"$PWD"'" }' /user_stuff.yml # (-e is short for --extra-vars) # # Dependencies: # sudo apt update; sudo apt install git subversion aptitude man-db bash-completion command-not-found # # For hosts where /home has the noexec mount flag, first run these commands on the remote host: # sudo usermod -aG root $LOGNAME # sudo chmod g+x /root && sudo install -d -o $LOGNAME /root/alastair_temp # # Then use one of the following (depending on your shell) locally to run one of the above commands: # $ ANSIBLE_REMOTE_TEMP=/root/alastair_temp ... # % (setenv ANSIBLE_REMOTE_TEMP /root/alastair_temp ; ...) # # TO-DO: # + re-write co_dotfiles as tasks - hosts: all gather_facts: False vars: setup_script: ~/src/tools/userconfig/co_dotfiles tasks: - name: Run user setup script # note that creates=... is not a real script argument script: "{{setup_script}} creates=tmp/old" - name: Copy 'zone' script copy: src="{{local_pwd}}/bin/zone" dest=bin/zone mode=0755 force=yes