Reorganize user salt creation

This now allows for easier home directory imports
Gonna whip up a playbook to initialize a fresh Ubuntu install on my workstations
This commit is contained in:
Salt 2019-10-11 16:37:18 -05:00
parent 86562b3ccc
commit 2bb29965bd

View File

@ -37,11 +37,17 @@
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDyOzdOFNONNhr++/2L3iSN04JsLwYHkapslDMEImI0x4chvdfdA9OkEOZHP5EoMUG6uWL3xZZdQ9Egp931oHDc4W5ylPQ1VtqQ2vcyffCfBTOEaUeEgw2tHBDngMqBgTajMSFvTbaC7JNSIdcGP1KTCCYZ3f8DPjVmG8FAKq1kDnCyI4sXHQswi/AbIBrOsWSW+qjrQdD/jU7T2LPQbU9FB+afinDizhGXUzkmbRkOD5z/YsyrWDfaKhGS4EwJpZbEwT7ocnCaQSa74xYLwUlBONhg3u2wq00mrh7vc2WbeGB7VoCsojPIj5r6KoCKzRBVog2HLQ4W7QqfSW/nXR21 salt@iridium" key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDyOzdOFNONNhr++/2L3iSN04JsLwYHkapslDMEImI0x4chvdfdA9OkEOZHP5EoMUG6uWL3xZZdQ9Egp931oHDc4W5ylPQ1VtqQ2vcyffCfBTOEaUeEgw2tHBDngMqBgTajMSFvTbaC7JNSIdcGP1KTCCYZ3f8DPjVmG8FAKq1kDnCyI4sXHQswi/AbIBrOsWSW+qjrQdD/jU7T2LPQbU9FB+afinDizhGXUzkmbRkOD5z/YsyrWDfaKhGS4EwJpZbEwT7ocnCaQSa74xYLwUlBONhg3u2wq00mrh7vc2WbeGB7VoCsojPIj5r6KoCKzRBVog2HLQ4W7QqfSW/nXR21 salt@iridium"
become: yes become: yes
become_user: salt become_user: salt
- name: Check for dotfile initialization
stat: path=$HOME/.dotfiles
register: p
become: yes
become_user: salt
- name: Configure git SSH substitute for GitHub - name: Configure git SSH substitute for GitHub
git_config: git_config:
name: url."https://github.com/".insteadOf name: url."https://github.com/".insteadOf
value: "git@github.com:" value: "git@github.com:"
scope: global scope: global
when: not p.stat.exists
become: yes become: yes
become_user: salt become_user: salt
- name: Configure git SSH substitute for GitLab - name: Configure git SSH substitute for GitLab
@ -49,11 +55,7 @@
name: url."https://gitlab.com/".insteadOf name: url."https://gitlab.com/".insteadOf
value: "git@gitlab.com:" value: "git@gitlab.com:"
scope: global scope: global
become: yes when: not p.stat.exists
become_user: salt
- name: Check for dotfile initialization
stat: path=$HOME/.dotfiles
register: p
become: yes become: yes
become_user: salt become_user: salt
- name: Clone bootstrap script - name: Clone bootstrap script
@ -71,6 +73,15 @@
when: not p.stat.exists when: not p.stat.exists
become: yes become: yes
become_user: salt become_user: salt
- name: Disable untracked files on dotfiles
git_config:
name: status.showUntrackedFiles
value: "no"
scope: local
repo: ~/.dotfiles
when: not p.stat.exists
become: yes
become_user: salt
- name: Remove bootstrap script directory - name: Remove bootstrap script directory
file: file:
path: ~/bootstrap path: ~/bootstrap
@ -78,11 +89,3 @@
when: not p.stat.exists when: not p.stat.exists
become: yes become: yes
become_user: salt become_user: salt
- name: Disable untracked files on dotfiles
git_config:
name: status.showUntrackedFiles
value: "no"
scope: local
repo: ~/.dotfiles
become: yes
become_user: salt