User Tools

Site Tools


cloud-init:from_scratch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cloud-init:from_scratch [2019/07/18 09:43]
127.0.0.1 external edit
cloud-init:from_scratch [2019/07/18 09:44] (current)
dodger [Examples]
Line 70: Line 70:
  
 ====== Examples ====== ====== Examples ======
-<file yaml cloud-init.yaml> +[[cloud-init:standard-cloudinit-yaml|Standard cloud-init script]]
-#​cloud-config +
-package_upgrade:​ true +
-preserve_hostname:​ false +
-fqdnbvclb-psql-002.ciberterminal.net +
-hostname: bvclb-psql-002 +
-manage_resolv_conf:​ false +
-network: +
-  config: disabled +
- +
-bootcmd: +
-  - echo DEVICE=eth0 > /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo TYPE=Ethernet >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo ONBOOT=yes >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo BOOTPROTO=none >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo IPADDR=10.50.84.52 >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo PREFIX=22 >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo GATEWAY=10.50.84.1 >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo DNS1=10.40.3.101 >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - echo DNS2=10.40.3.102 >> /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 +
-  - ifdown eth0 +
-  - ifup eth0 +
- +
- +
-users: +
-  - name: bofher +
-    sudo: ['​ALL=(ALL) NOPASSWD:​ALL'​] +
-    ssh-authorized-keys:​ +
-      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMyKlWiO3YkoIc2ZfuLi+nEojn3mLcGOETB54c1Ih3jC/​v8uWoC+rGYDDXU3dEbI1mVVWEpbrxeHPPBrQnv6ZySuqpqScpAPfb4/​0OciR2hRfBCoLCzuKBMC7QlXYfzlBOPn5BzR/​1XKLrshOHDVPxV/​AmqVqpz86xVWYJYK7aMgHTEabWINCANXTDvWgm2UGTuhSh/​1/​wGcI+DL141cUeDB9LUSikWRuoepmSYC/​ZascRAV2g7g3oqGCTM8xgSmP11YWMuzkGNGN1HiFdh3fP0xQVOeEehswlWOwZ3/​ztpl2o0Kx2jomHuadCEJ2HhhDblipE2VOV9+1ruTkvuuRX dodger@ciberterminal.net@jhterminal +
-      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA/​mtymKfb9u5KGOgIysjDrX4ztUXKtHCaP+hnBEi/​T1t8gOHCO0qA7SpyOwlkGZA2zWo+Wyihs5nZ5803AtvZd8Pd/​6+0BdSSrgn/​mh4vuAV1IlkhTw0HNm0PBdQJTlLGR3rMZEss4Mf4kjyfnkhdUiyei6AwtczL6uzW8KrI3pt2U6IJ8C8wZP74hXPHoc12hA0v4D29t5WLvLvNdZ3sLvpEdGZZHXLrVzkT3bC8Lve0gyMMeyryjDYxF19zW1XkF0YMKHb/​dr9mX8OCub/​VyIJmK1SZj7h5/​cJxDAa+vMCH9mPxWxxfLo8htEQBFYtNZ+Ttgp8lo2r1vB+JISU3 warlock86@gmail.com@fvlin-sis-arod +
-      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzA69Atu99/​l2RTsIouFbbTY6DRhSYpYF09NVee/​UjizMS/​TXjvt5qMPQSNE2WhG5vSPxCkgdcliwubLSEbLJvvff9jw/​B7aBm6VF6KiVPvR4FWvm4yKXnzjhMiDZ4zqa2ZljT5ttr5xjIUVMRJFbI1aVwxXylV+9t6aCLfcvSIucO19Zj9aCoPGm3VYU4ek7a4NiZb4k+IQbYkTamURsJXvDD0/​oRyOPZIas46eI7CQzeFsBd/​d0C42riaEM+ODCT6q6sOwgglom1TZYHsUf1mDXsF/​zDMszHnHvEJzVzbfezav8my9KaLCGcwp9ny8B0NDTnZPe5zG0iefu1JnBL warlock86@gmail.com@VVW10-SYS-003 +
-    lock-passwd:​ false +
-    passwd: $6$RvKfWhor$ve1U0Ni.cwS4wy/​kvcp9jcp2sETsp/​BSmQZJdWNHFSTAUQ89uFMBNzMIWMCl7C5/​Q8x4O/​iMCzw7tujrrvS4E0 +
- +
-packages: +
-  - bash-completion +
-  - vim +
-  - tmux +
-  - strace +
-  - lsof +
-  - mlocate +
-  - git +
-  - subversion +
-  - nmap +
-  - tcpdump +
-  - jq +
-  - nc +
-  - telnet +
-  - man +
-  - yum-utils +
-  - unzip +
-  - pigz +
-  - pbzip2 +
-  - ntpdate +
-  - rlwrap +
-  - expectk +
-  - psmisc +
-  - lvm2 +
-  - htop +
-  - elinks +
-  - wget +
-  - dmidecode +
-  - python-setuptools +
-  - git +
-  - sl +
-  - cyrus-sasl-devel +
-  - cyrus-sasl-gs2 +
-  - cyrus-sasl-gssapi +
-  - cyrus-sasl-ldap +
-  - cyrus-sasl-ntlm +
-  - cyrus-sasl-plain +
-  - cyrus-sasl-scram +
-  - cyrus-sasl-sql +
-  - cyrus-sasl-sql +
-  - krb5-workstation +
-  - samba-common-tools +
-  - sssd-ad +
-  - salt-minion +
- +
-runcmd: +
-  - [ yum, -y, groupinstall,​ "​Development tools" ] +
-  - [ systemctl, stop, firewalld ] +
-  - [ systemctl, disable, firewalld ] +
-  - [ systemctl, enable, salt-minion ] +
-  - [ sed, -i, "​s/​SELINUX=enforcing/​SELINUX=disabled/​g",​ /​etc/​selinux/​config ] +
-  - [ sed, -i, "​s/​SELINUX=permissive/​SELINUX=disabled/​g",​ /​etc/​selinux/​config ] +
-  - [ wall, "​CLOUD-INIT finished, restarting to finish install"​ ] +
-  - [ shutdown, -r, -t, 10 ] +
- +
-</​file>​ +
- +
cloud-init/from_scratch.txt · Last modified: 2019/07/18 09:44 by dodger