From 3505869c5585de591d24ba2c4014a125f8d25616 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 26 Nov 2023 21:35:49 +0200 Subject: [PATCH] 6 --- gen-cloud-init/.gitignore | 5 +++++ gen-cloud-init/meta-data-alma | 2 ++ gen-cloud-init/meta-data-rocky | 2 ++ gen-cloud-init/user-data-alma | 33 +++++++++++++++++++++++++++++++++ gen-cloud-init/user-data-rocky | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 gen-cloud-init/meta-data-alma create mode 100644 gen-cloud-init/meta-data-rocky create mode 100644 gen-cloud-init/user-data-alma create mode 100644 gen-cloud-init/user-data-rocky diff --git a/gen-cloud-init/.gitignore b/gen-cloud-init/.gitignore index 0be2d4d..1bca6c5 100644 --- a/gen-cloud-init/.gitignore +++ b/gen-cloud-init/.gitignore @@ -2,3 +2,8 @@ build.log init.iso *-init-*.*.iso tmp/ +*.iso +user-data +meta-data +user-data.in +meta-data.in diff --git a/gen-cloud-init/meta-data-alma b/gen-cloud-init/meta-data-alma new file mode 100644 index 0000000..7221c11 --- /dev/null +++ b/gen-cloud-init/meta-data-alma @@ -0,0 +1,2 @@ +instance-id: ##INSTANCE_ID## +local-hostname: ##HOSTNAME## \ No newline at end of file diff --git a/gen-cloud-init/meta-data-rocky b/gen-cloud-init/meta-data-rocky new file mode 100644 index 0000000..7221c11 --- /dev/null +++ b/gen-cloud-init/meta-data-rocky @@ -0,0 +1,2 @@ +instance-id: ##INSTANCE_ID## +local-hostname: ##HOSTNAME## \ No newline at end of file diff --git a/gen-cloud-init/user-data-alma b/gen-cloud-init/user-data-alma new file mode 100644 index 0000000..47fca8f --- /dev/null +++ b/gen-cloud-init/user-data-alma @@ -0,0 +1,33 @@ +#cloud-config + +# remove this block entirely if not using password authentication +password: ###PASSWORD### +ssh_pwauth: True +chpasswd: { expire: False } + +#package_upgrade: true +#packages: +#- git +#- tmux +#- wget + +# replace with your own public key (e.g. ~/.ssh/id_rsa.pub) +ssh_authorized_keys: + - ###SSH_KEY_1### + - ###SSH_KEY_2### + - ###SSH_KEY_3### + +users: + - default + - name: root + ssh_authorized_keys: + - ###SSH_KEY_1### + - ###SSH_KEY_2### + - ###SSH_KEY_3### + +runcmd: + - [ "/usr/bin/curl" , "https://gist.githubusercontent.com/elico/aa7cf0bf563361b72afe9cadafdbf688/raw/7ca31701051cd3bfd8974cfd31eaaeaa32b4c4c0/rhel-create-swap-file.sh" , "-o" , "/usr/loca/bin/rhel-create-swap-file.sh" ] + - [ "/bin/bash" , "/usr/loca/bin/rhel-create-swap-file.sh" ] + - [ "/usr/bin/curl" , "http://www.ngtech.co.il/static/finihsed" , "-o" , "/dev/null" ] + +final_message: "The system is finally up, after $UPTIME seconds" diff --git a/gen-cloud-init/user-data-rocky b/gen-cloud-init/user-data-rocky new file mode 100644 index 0000000..47fca8f --- /dev/null +++ b/gen-cloud-init/user-data-rocky @@ -0,0 +1,33 @@ +#cloud-config + +# remove this block entirely if not using password authentication +password: ###PASSWORD### +ssh_pwauth: True +chpasswd: { expire: False } + +#package_upgrade: true +#packages: +#- git +#- tmux +#- wget + +# replace with your own public key (e.g. ~/.ssh/id_rsa.pub) +ssh_authorized_keys: + - ###SSH_KEY_1### + - ###SSH_KEY_2### + - ###SSH_KEY_3### + +users: + - default + - name: root + ssh_authorized_keys: + - ###SSH_KEY_1### + - ###SSH_KEY_2### + - ###SSH_KEY_3### + +runcmd: + - [ "/usr/bin/curl" , "https://gist.githubusercontent.com/elico/aa7cf0bf563361b72afe9cadafdbf688/raw/7ca31701051cd3bfd8974cfd31eaaeaa32b4c4c0/rhel-create-swap-file.sh" , "-o" , "/usr/loca/bin/rhel-create-swap-file.sh" ] + - [ "/bin/bash" , "/usr/loca/bin/rhel-create-swap-file.sh" ] + - [ "/usr/bin/curl" , "http://www.ngtech.co.il/static/finihsed" , "-o" , "/dev/null" ] + +final_message: "The system is finally up, after $UPTIME seconds"