https://github.com/cloud-init/cloud-init/tree/master/doc/examples
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
#cloud-config package_upgrade: true packages: - httpd
#cloud-config package_update: true package_upgrade: all packages: - httpd24 - php56 - mysql55-server - php56-mysqlnd runcmd: - service httpd start - chkconfig httpd on - groupadd www - [ sh, -c, "usermod -a -G www ec2-user" ] - [ sh, -c, "chown -R root:www /var/www" ] - chmod 2775 /var/www - [ find, /var/www, -type, d, -exec, chmod, 2775, {}, + ] - [ find, /var/www, -type, f, -exec, chmod, 0664, {}, + ] - [ sh, -c, 'echo "" > /var/www/html/phpinfo.php' ]
#cloud-config power_state: delay: "+30" mode: poweroff message: Bye Bye timeout: 30 condition: True
#cloud-config runcmd: - [ sh, -c, 'echo ==== $(date) ====; echo HI WORLD; echo =======' ]
'Cloud' 카테고리의 다른 글
DNS Cache (0) | 2019.06.12 |
---|---|
Terraform에서 user_data를 파일로 지정하고 싶을 때 (0) | 2018.06.14 |
Magic Quadrant for IaaS, Worldwide (0) | 2018.05.29 |