We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use this cloud-init.yaml file:
#cloud-config users: - name: asterisk gecos: 'Asterisk User' groups: users sudo: ['ALL=(ALL) NOPASSWD:ALL'] shell: /bin/bash lock_passwd: true write_files: - path: /var/log/asterisk/empty.log owner: asterisk:asterisk permissions: '0664' content: | ---LOG BEGINS---
The file does not get written to /var/log/asterisk/empty.log Remove owner: asterisk:asterisk and try again, voila, it works.
owner: asterisk:asterisk
https://pastebin.canonical.com/p/7njH9PswGW/
The text was updated successfully, but these errors were encountered:
@rajannpatel , if you add defer: true to your write_files definition, I think it should work:
defer: true
write_files: - path: /var/log/asterisk/empty.log owner: asterisk:asterisk permissions: "0664" defer: true content: | ---LOG BEGINS---
By default, write_files runs before users and groups get created, but defer tells it to run later in boot.
defer
Sorry, something went wrong.
No branches or pull requests
Bug report
Steps to reproduce the problem
Use this cloud-init.yaml file:
The file does not get written to /var/log/asterisk/empty.log
Remove
owner: asterisk:asterisk
and try again, voila, it works.Environment details
cloud-init logs
https://pastebin.canonical.com/p/7njH9PswGW/
The text was updated successfully, but these errors were encountered: