From d6d76baf893a7128b868401fabdc693031c6a934 Mon Sep 17 00:00:00 2001 From: pitch Date: Sun, 18 Jun 2023 17:53:50 +0200 Subject: [PATCH] first try --- cloud-init/cloud-init.txt | 38 ++++++++++++++++++++++++++++++++++++++ salt/top.sls | 3 +++ 2 files changed, 41 insertions(+) create mode 100644 cloud-init/cloud-init.txt create mode 100644 salt/top.sls diff --git a/cloud-init/cloud-init.txt b/cloud-init/cloud-init.txt new file mode 100644 index 0000000..13b6b2e --- /dev/null +++ b/cloud-init/cloud-init.txt @@ -0,0 +1,38 @@ +#cloud-config + +fqdn: 🧂 +package_update: true +package_upgrade: true +packages: + - python-pygit2 + +runcmd: + - mkdir /run/salt-bootstrap + - curl -o /run/salt-bootstrap/bootstrap-salt.sh -L https://bootstrap.saltproject.io + - chmod +x /run/salt-bootstrap/bootstrap-salt.sh + - /run/salt-bootstrap/bootstrap-salt.sh -MP + +ssh_pwauth: false +users: + - default + - name: salt + ssh_authorized_keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC9YAnzUrXGVCJOc73cqswYEeIRou8Y/I2gDOGeUouZv flipdot + sudo: true +write_files: + path: /etc/salt/master + permissions: '0660' +- content: | + # salt master config by cloud-init + fileserver_backend: + - gitfs + gitfs_remotes: + - https://github.com/saltstack-formulas/salt-formula.git + gitfs_root: salt + + path: /etc/salt/minion + permissions: '0660' +- content: | + # salt minion config by cloud-init + file_client: local + diff --git a/salt/top.sls b/salt/top.sls new file mode 100644 index 0000000..3700e02 --- /dev/null +++ b/salt/top.sls @@ -0,0 +1,3 @@ +base: + '*': +