]> Vexing Labs - k8s-cluster.git/commitdiff
wip, users main
authorAdam Shamblin <adam@vexingworkshop.com>
Mon, 30 Oct 2023 04:01:07 +0000 (22:01 -0600)
committerAdam Shamblin <adam@vexingworkshop.com>
Mon, 30 Oct 2023 04:01:07 +0000 (22:01 -0600)
install.yml
users.yml

index b6d258bea60c8b882203b91d372e8bfb55474503..294ac56f42d0f48b2af89a9370467dec5a7e1011 100644 (file)
           - docker-buildx-plugin
           - docker-compose-plugin
 
           - docker-buildx-plugin
           - docker-compose-plugin
 
-    - name: Configure user
-      ansible.builtin.user:
-        name: cloud_user
-        groups: docker
-
     - name: Create containerd config file
       ansible.builtin.shell: sed -i 's/disabled_plugins/#disabled_plugins/' /etc/containerd/config.toml
 
     - name: Create containerd config file
       ansible.builtin.shell: sed -i 's/disabled_plugins/#disabled_plugins/' /etc/containerd/config.toml
 
index 7f614075c53057970bc0901285dfe25ebbf55182..6aabd52f4e46f68b258c1d5bf8ca8d4aea52e9f6 100644 (file)
--- a/users.yml
+++ b/users.yml
@@ -1,18 +1,25 @@
 ---
 ---
-- hosts: "workers, masters"
+- hosts: "all"
   become: yes
 
   tasks:
     - name: Create the kube user account
   become: yes
 
   tasks:
     - name: Create the kube user account
-      user: name=kube append=yes state=present createhome=yes shell=/bin/bash
+      ansible.builtin.user:
+        name: kube
+        append: yes
+        state: present
+        createhome: yes
+        shell: /bin/bash
+        groups: docker
 
     - name: allow 'kube' to use sudo w/out a password
 
     - name: allow 'kube' to use sudo w/out a password
-      lineinfile:
+      ansible.builtin.lineinfile:
         dest: /etc/sudoers
         line: 'kube ALL=(ALL) NOPASSWD: ALL'
         validate: 'visudo -cf %s'
 
     - name: set up authorized_keys for the kube user
         dest: /etc/sudoers
         line: 'kube ALL=(ALL) NOPASSWD: ALL'
         validate: 'visudo -cf %s'
 
     - name: set up authorized_keys for the kube user
-      authorized_key: user=kube key="{{item}}"
-      with_file:
-        - ~/.ssh/id_rsa.pub
+      ansible.posix.authorized_key:
+        user: kube
+        key: "{{ lookup('file', '/home/signal9/.ssh/id_rsa.pub') }}"
+        state: present