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: + '*': +