[ansible] irregular-apocalypse setup
change
commit 61adf4dc63f866aebdd2706cf0a368710d1185e7
author Alpha Chen <alpha@kejadlen.dev>
date
parent 1221c83c
diff --git a/.ssh/config b/.ssh/config
index af659fe8..d0906715 100644
--- a/.ssh/config
+++ b/.ssh/config
@@ -4,6 +4,8 @@ ControlMaster auto
 ControlPath /tmp/%r@%h:%p
 ControlPersist yes
 
+Include ~/.ssh/config.local
+
 Host kejadlen.console.xen.prgmr.com
   IdentityFile ~/.ssh/prgmr_rsa
   User kejadlen
diff --git a/ansible/irregular-apocalypse/.ssh/config.local b/ansible/irregular-apocalypse/.ssh/config.local
new file mode 100644
index 00000000..9d5705a0
--- /dev/null
+++ b/ansible/irregular-apocalypse/.ssh/config.local
@@ -0,0 +1 @@
+IdentityFile ~/.ssh/id_irregular_apocalypse
diff --git a/ansible/irregular-apocalypse/main.yml b/ansible/irregular-apocalypse/main.yml
index 2b931aa2..ba76605a 100644
--- a/ansible/irregular-apocalypse/main.yml
+++ b/ansible/irregular-apocalypse/main.yml
@@ -8,6 +8,7 @@
       ignore_errors: yes
   tasks:
     - name: install dependencies
+      become: yes
       apt:
         name: "{{ item }}"
         update_cache: yes
@@ -21,13 +22,14 @@
         - python3-pip
         - software-properties-common
         - zsh
-      become: yes
 
 - hosts: all
   roles:
     - dotfiles
     - zsh
 
+- import_playbook: js.yml
+
 - hosts: all
   tasks:
     - name: create home dirs
@@ -59,7 +61,7 @@
 
         - stat: path=/usr/local/bin/ruby-install
           register: ruby_install
-        - import_tasks: irregular-apocalypse/ruby-install.yml
+        - import_tasks: ruby-install.yml
           vars:
             version: 0.6.1
           when: ruby_install.stat.exists == False
@@ -73,7 +75,7 @@
       block:
         - stat: path=~/.cargo/bin/rustup
           register: rustup
-        - import_tasks: irregular-apocalypse/rustup.yml
+        - import_tasks: rustup.yml
           when: rustup.stat.exists == False
 
         - command: ~/.cargo/bin/rustup toolchain list
@@ -91,9 +93,6 @@
         #     - exa
         #     - ripgrep
 
-    - name: set up JS dev environment
-      import_playbook: js.yml
-
     - name: install fzf
       block:
         - git:
@@ -106,3 +105,9 @@
         src: ~/.dotfiles/ansible/irregular-apocalypse/.zshrc.local
         dest: ~/.zshrc.local
         state: link
+
+    - name: link SSH config.local
+      file:
+        src: ~/.dotfiles/ansible/irregular-apocalypse/.ssh/config.local
+        dest: ~/.ssh/config.local
+        state: link