Container-Optimized OS includes the
OS Config
agent. You can use OS Config's guest policies to configure your
instance. packages
and
packageRepositories
features of guest policies are not supported on Container-Optimized OS.
To enable OS Config and create a guest policy, see Enable OS Config agent and Create a guest policy, respectively.
Here is an example that shows how users can use assignment
and recipes
features of guest policies to create a file on instances located at
us-central1-a.
assignment:
zones:
- us-central1-a
recipes:
- name: recipe-runscript
desiredState: INSTALLED
installSteps:
- scriptRun:
interpreter: SHELL
script: touch /tmp/TOUCH_FILE