Skip to content

Instantly share code, notes, and snippets.


jpmens/all.yml Secret

Created Dec 10, 2019
What would you like to do?
Simple Ansible playbook to install BIND and nginx in 170 jails
- hosts: bsd
remote_user: root
serial: 10
packagelist: [ bash, micro_httpd, bind-tools, bind914, nginx-lite ]
- name: copy a file
copy: src=all.yml dest=/tmp/all.yml
- name: install packages
pkgng: name="{{ packagelist }}"
- kick_nginx
- name: enable named
command: /usr/sbin/sysrc named_enable=YES
- name: rndc-confgen
command: /usr/local/sbin/rndc-confgen -a creates=/usr/local/etc/namedb/rndc.key
notify: kick_named
- name: install named.conf from template
template: src=named.conf dest=/usr/local/etc/namedb/named.conf
notify: kick_named
- name: kick_named
service: name=named state=restarted
- name: kick_nginx
service: name=nginx state=restarted enabled=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment