-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update profile and vsi to use cloud-init to install nfs
Signed-off-by: Paul Bastide <[email protected]>
- Loading branch information
Showing
2 changed files
with
4 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,14 @@ | ||
|
||
#cloud-config | ||
packages: | ||
- bind | ||
- bind-utils | ||
- httpd | ||
- mod_ssl | ||
- nfs-utils | ||
- squid | ||
write_files: | ||
- path: /tmp/named-conf-edit.sed | ||
permissions: '0640' | ||
content: | | ||
/^\s*listen-on port 53 /s/127\.0\.0\.1/127\.0\.0\.1; MYIP/ | ||
/^\s*allow-query /s/localhost/any/ | ||
/^\s*dnssec-validation /s/ yes/ no/ | ||
/^\s*type hint;/s/ hint/ forward/ | ||
/^\s*file\s"named.ca";/d | ||
/^\s*type forward/a \\tforward only;\n\tforwarders { 161.26.0.7; 161.26.0.8; }; | ||
- path: /etc/exports | ||
permissions: '0640' | ||
content: | | ||
/export *(rw) | ||
- path: /etc/squid/squid.conf | ||
permissions: '0640' | ||
content: | | ||
acl localnet src 10.0.0.0/8 | ||
acl localnet src 172.16.0.0/12 | ||
acl localnet src 192.168.0.0/16 | ||
http_access deny !localnet | ||
http_port 3128 | ||
coredump_dir /var/spool/squid | ||
runcmd: | ||
- export MYIP=`hostname -I`; sed -i.bak "s/MYIP/$MYIP/" /tmp/named-conf-edit.sed | ||
- sed -i.orig -f /tmp/named-conf-edit.sed /etc/named.conf | ||
- systemctl enable named.service nfs-server squid | ||
- systemctl start named.service nfs-server squid | ||
- systemctl enable nfs-server | ||
- systemctl start nfs-server | ||
- mkdir -p /export && chmod -R 777 /export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters