├── roles ├── ansible-base │ ├── .gitignore │ ├── tests │ │ ├── inventory │ │ └── test.yml │ ├── vars │ │ └── main.yml │ ├── templates │ │ ├── resources.xml.j2 │ │ └── etc │ │ │ ├── hosts.j2 │ │ │ └── dhcp │ │ │ └── dhclient.conf.j2 │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ ├── debian_update_dns_search.yml │ │ ├── debian_update_dns_nameservers.yml │ │ ├── redhat.yml │ │ ├── main.yml │ │ ├── debian.yml │ │ ├── manage_ssh_known_hosts.yml │ │ └── generate_rundeck_resources.yml │ ├── .travis.yml │ ├── defaults │ │ └── main.yml │ ├── README.md │ └── meta │ │ └── main.yml ├── ansible-bootstrap │ ├── tests │ │ ├── inventory │ │ └── test.yml │ ├── vars │ │ └── main.yml │ ├── docs │ │ ├── _build │ │ │ ├── html │ │ │ │ ├── objects.inv │ │ │ │ ├── _static │ │ │ │ │ ├── up.png │ │ │ │ │ ├── down.png │ │ │ │ │ ├── file.png │ │ │ │ │ ├── minus.png │ │ │ │ │ ├── plus.png │ │ │ │ │ ├── comment.png │ │ │ │ │ ├── ajax-loader.gif │ │ │ │ │ ├── up-pressed.png │ │ │ │ │ ├── comment-close.png │ │ │ │ │ ├── down-pressed.png │ │ │ │ │ ├── comment-bright.png │ │ │ │ │ ├── pygments.css │ │ │ │ │ ├── doctools.js │ │ │ │ │ ├── underscore.js │ │ │ │ │ ├── alabaster.css │ │ │ │ │ └── basic.css │ │ │ │ ├── .buildinfo │ │ │ │ ├── searchindex.js │ │ │ │ ├── _sources │ │ │ │ │ └── index.txt │ │ │ │ ├── genindex.html │ │ │ │ ├── search.html │ │ │ │ └── index.html │ │ │ └── doctrees │ │ │ │ ├── index.doctree │ │ │ │ └── environment.pickle │ │ ├── index.rst │ │ ├── make.bat │ │ ├── Makefile │ │ └── conf.py │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ ├── debian.yml │ │ ├── main.yml │ │ ├── redhat.yml │ │ ├── debian_security.yml │ │ ├── lockdown.yml │ │ └── redhat_security.yml │ ├── defaults │ │ └── main.yml │ ├── .travis.yml │ ├── README.md │ └── meta │ │ └── main.yml ├── ansible-quagga │ ├── tasks │ │ ├── centos.yml │ │ ├── main.yml │ │ ├── debian.yml │ │ ├── config_interfaces.yml │ │ └── config_quagga.yml │ ├── vars │ │ └── main.yml │ ├── requirements.yml │ ├── handlers │ │ └── main.yml │ ├── templates │ │ ├── etc │ │ │ ├── quagga │ │ │ │ ├── vtysh.conf.j2 │ │ │ │ ├── zebra.conf.j2 │ │ │ │ ├── debian.conf.j2 │ │ │ │ ├── daemons.j2 │ │ │ │ ├── ospfd.conf.j2 │ │ │ │ └── bgpd.conf.j2 │ │ │ └── network │ │ │ │ └── interfaces.d │ │ │ │ └── int.cfg.j2 │ │ └── opt │ │ │ └── scripts │ │ │ ├── fault_quagga.sh.j2 │ │ │ ├── backup_quagga.sh.j2 │ │ │ ├── master_quagga.sh.j2 │ │ │ └── primary-backup.sh.j2 │ ├── meta │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ └── README.md └── ansible-config-interfaces │ ├── vars │ └── main.yml │ ├── handlers │ └── main.yml │ ├── tasks │ ├── main.yml │ ├── gather_interfaces.yml │ └── debian.yml │ ├── templates │ ├── host_interfaces.j2 │ └── etc │ │ └── network │ │ ├── interfaces.j2.orig │ │ ├── interfaces.d │ │ └── interfaces.j2.orig │ │ └── interfaces.j2 │ ├── meta │ └── main.yml │ ├── defaults │ └── main.yml │ └── README.md ├── ansible.cfg ├── hosts ├── .gitignore ├── host_vars ├── node0 │ ├── node0.yml │ └── quagga.yml ├── node1 │ ├── node1.yml │ └── quagga.yml ├── node2 │ ├── node2.yml │ └── quagga.yml └── node3 │ ├── node3.yml │ └── quagga.yml ├── cleanup.sh ├── requirements.yml ├── gather_interfaces.yml ├── playbook.yml ├── bootstrap.sh ├── group_vars └── quagga-routers │ └── quagga.yml ├── bootstrap.yml └── Vagrantfile /roles/ansible-base/.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | -------------------------------------------------------------------------------- /roles/ansible-base/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | -------------------------------------------------------------------------------- /roles/ansible-quagga/tasks/centos.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | -------------------------------------------------------------------------------- /ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking=False 3 | -------------------------------------------------------------------------------- /hosts: -------------------------------------------------------------------------------- 1 | .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory -------------------------------------------------------------------------------- /roles/ansible-base/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for ansible-base 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.retry 2 | .DS_Store 3 | .galaxy_install_info 4 | .vagrant 5 | -------------------------------------------------------------------------------- /roles/ansible-quagga/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for ansible-quagga 3 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for ansible-bootstrap 3 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for ansible-config-interfaces 3 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for ansible-config-interfaces 3 | -------------------------------------------------------------------------------- /roles/ansible-quagga/requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - src: https://github.com/mrlesmithjr/ansible-quagga.git 3 | -------------------------------------------------------------------------------- /roles/ansible-base/templates/resources.xml.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /roles/ansible-base/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - ansible-base 6 | -------------------------------------------------------------------------------- /roles/ansible-base/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for ansible-base 3 | - name: update resolvconf 4 | shell: resolvconf -u 5 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - ansible-bootstrap 6 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for ansible-config-interfaces 3 | - include: debian.yml 4 | when: ansible_os_family == "Debian" 5 | -------------------------------------------------------------------------------- /host_vars/node0/node0.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ansible_ssh_port: 22 3 | ansible_ssh_host: 192.168.250.10 4 | ansible_ssh_private_key_file: .vagrant/machines/node0/virtualbox/private_key 5 | -------------------------------------------------------------------------------- /host_vars/node1/node1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ansible_ssh_port: 22 3 | ansible_ssh_host: 192.168.250.11 4 | ansible_ssh_private_key_file: .vagrant/machines/node1/virtualbox/private_key 5 | -------------------------------------------------------------------------------- /host_vars/node2/node2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ansible_ssh_port: 22 3 | ansible_ssh_host: 192.168.250.12 4 | ansible_ssh_private_key_file: .vagrant/machines/node2/virtualbox/private_key 5 | -------------------------------------------------------------------------------- /host_vars/node3/node3.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ansible_ssh_port: 22 3 | ansible_ssh_host: 192.168.250.13 4 | ansible_ssh_private_key_file: .vagrant/machines/node3/virtualbox/private_key 5 | -------------------------------------------------------------------------------- /roles/ansible-quagga/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for ansible-quagga 3 | - name: "restart quagga" 4 | service: 5 | name: "quagga" 6 | state: "restarted" 7 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/objects.inv -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/up.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/down.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/minus.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/plus.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/comment.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/etc/quagga/vtysh.conf.j2: -------------------------------------------------------------------------------- 1 | ! 2 | ! Sample configuration file for vtysh. 3 | ! 4 | service integrated-vtysh-config 5 | !hostname quagga-router 6 | username root nopassword 7 | ! 8 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrlesmithjr/vagrant-ansible-routing-template/HEAD/roles/ansible-bootstrap/docs/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | vagrant destroy -f 3 | for file in *.retry; do 4 | if [[ -f $file ]]; then 5 | rm $file 6 | fi 7 | done 8 | if [ -d .vagrant ]; then 9 | rm -rf .vagrant 10 | fi 11 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for ansible-bootstrap 3 | - name: restart ssh 4 | service: name=ssh state=restarted 5 | 6 | - name: restart sshd 7 | service: name=sshd state=restarted 8 | -------------------------------------------------------------------------------- /requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - src: https://github.com/mrlesmithjr/ansible-base.git 3 | - src: https://github.com/mrlesmithjr/ansible-bootstrap.git 4 | - src: https://github.com/mrlesmithjr/ansible-config-interfaces.git 5 | - src: https://github.com/mrlesmithjr/ansible-quagga.git 6 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 6318f7152a54c3ab682620aaacc0575d 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /roles/ansible-base/templates/etc/hosts.j2: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost 2 | 127.0.1.1 {{ ansible_hostname }}.{{ pri_domain_name }} {{ ansible_hostname }} 3 | 4 | # The following lines are desirable for IPv6 capable hosts 5 | ::1 localhost ip6-localhost ip6-loopback 6 | ff02::1 ip6-allnodes 7 | ff02::2 ip6-allrouters 8 | -------------------------------------------------------------------------------- /host_vars/node1/quagga.yml: -------------------------------------------------------------------------------- 1 | --- 2 | quagga_interfaces_lo: 3 | - int: "lo{{ ':' }}0" 4 | address: '10.1.1.11/32' 5 | method: 'static' 6 | configure: true 7 | quagga_ospf_area_config: 8 | - network: '192.168.1.0/24' 9 | area: '{{ quagga_ospf_area }}' 10 | quagga_ospf_routerid: '10.1.1.11' 11 | -------------------------------------------------------------------------------- /host_vars/node2/quagga.yml: -------------------------------------------------------------------------------- 1 | --- 2 | quagga_interfaces_lo: 3 | - int: "lo{{ ':' }}0" 4 | address: '10.2.2.12/32' 5 | method: 'static' 6 | configure: true 7 | quagga_ospf_area_config: 8 | - network: '192.168.2.0/24' 9 | area: '{{ quagga_ospf_area }}' 10 | quagga_ospf_routerid: '10.2.2.12' 11 | -------------------------------------------------------------------------------- /host_vars/node3/quagga.yml: -------------------------------------------------------------------------------- 1 | --- 2 | quagga_interfaces_lo: 3 | - int: "lo{{ ':' }}0" 4 | address: '10.3.3.13/32' 5 | method: 'static' 6 | configure: true 7 | quagga_ospf_area_config: 8 | - network: '192.168.3.0/24' 9 | area: '{{ quagga_ospf_area }}' 10 | quagga_ospf_routerid: '10.3.3.13' 11 | -------------------------------------------------------------------------------- /roles/ansible-base/tasks/debian_update_dns_search.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: debian | setting dns search suffix 3 | lineinfile: 4 | dest: "/etc/network/interfaces" 5 | regexp: "^dns-search" 6 | line: "dns-search {{ base_dns_search }}" 7 | state: "{{ base_dns_search_state }}" 8 | notify: "update resolvconf" 9 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({envversion:46,filenames:["index"],objects:{},objnames:{},objtypes:{},terms:{content:0,index:0,modul:0,page:0,search:0},titles:["Welcome to ansible-bootstrap’s documentation!"],titleterms:{ansibl:0,bootstrap:0,document:0,indic:0,tabl:0,welcom:0}}) -------------------------------------------------------------------------------- /gather_interfaces.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: quagga-routers 3 | tasks: 4 | # - name: loop through loopback addresses 5 | # shell: "ip -o link show | awk -F': ' '{ print $2 }'" 6 | # register: "ip_links" 7 | 8 | - debug: msg=Found 9 | when: item.int in ansible_interfaces 10 | with_items: '{{ quagga_interfaces_lo }}' 11 | -------------------------------------------------------------------------------- /roles/ansible-base/tasks/debian_update_dns_nameservers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: debian_update_dns_nameservers | setting dns nameservers 3 | lineinfile: 4 | dest: "/etc/network/interfaces" 5 | regexp: "^dns-nameservers" 6 | line: "dns-nameservers {{ base_dns_nameservers|join (' ') }}" 7 | state: "{{ base_dns_nameservers_state }}" 8 | notify: "update resolvconf" 9 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/templates/host_interfaces.j2: -------------------------------------------------------------------------------- 1 | --- 2 | interfaces: 3 | {% for item in show_interfaces.stdout_lines %} 4 | - name: {{ item }} 5 | address: 6 | configure: {{ default_configure_interface|lower }} 7 | gateway: 8 | method: {{ default_interface_method }} 9 | netmask: 10 | netmask_cidr: 11 | network: 12 | {% endfor %} 13 | -------------------------------------------------------------------------------- /playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: quagga-routers 3 | remote_user: vagrant 4 | become: true 5 | vars: 6 | roles: 7 | - role: ansible-bootstrap 8 | - role: ansible-base 9 | - role: ansible-quagga 10 | tasks: 11 | - name: installing packages 12 | apt: 13 | name: "{{ item }}" 14 | state: "present" 15 | with_items: 16 | - 'traceroute' 17 | -------------------------------------------------------------------------------- /roles/ansible-quagga/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for ansible-quagga 3 | - include: debian.yml 4 | when: ansible_os_family == "Debian" 5 | 6 | - include: centos.yml 7 | when: ansible_os_family == "RedHat" 8 | 9 | - include: config_interfaces.yml 10 | when: quagga_config_interfaces 11 | 12 | - include: config_quagga.yml 13 | tags: 14 | - quagga_config 15 | when: quagga_config 16 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tasks/debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Remove vmware tools package repo - errors out trying to update 3 | - name: debian | removing vmware tools package repo 4 | apt_repository: 5 | repo: "deb http://packages.vmware.com/packages/ubuntu trusty main" 6 | state: absent 7 | 8 | - name: debian | running apt-get update 9 | apt: 10 | update_cache: yes 11 | cache_valid_time: 86400 12 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | debian_set_root_pw: false #Only set to true if desired to set root password...for Debian/Ubuntu systems 3 | reboot: true # reboot after changing hostname to match inventory_hostname - set to false if you do not want to reboot 4 | root_password: [] #define root password for hosts....define here or in group_vars/all...If Ubuntu/Debian choose wisely if you want to do this 5 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for ansible-bootstrap 3 | - include: debian.yml 4 | when: ansible_os_family == "Debian" 5 | 6 | - include: debian_security.yml 7 | when: ansible_os_family == "Debian" 8 | 9 | - include: redhat.yml 10 | when: ansible_os_family == "RedHat" 11 | 12 | - include: redhat_security.yml 13 | when: ansible_os_family == "RedHat" 14 | 15 | - include: lockdown.yml 16 | -------------------------------------------------------------------------------- /roles/ansible-quagga/tasks/debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: debian | installing quagga pre-reqs 3 | apt: 4 | name: "{{ item }}" 5 | state: "present" 6 | with_items: 7 | - lldpd 8 | - vlan 9 | 10 | - name: debian | installing quagga 11 | apt: 12 | name: "quagga" 13 | state: "present" 14 | 15 | - name: debian | enabling quagga 16 | service: 17 | name: "quagga" 18 | state: "started" 19 | enabled: yes 20 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/templates/etc/network/interfaces.j2.orig: -------------------------------------------------------------------------------- 1 | # {{ ansible_managed }} 2 | # Any changes made here will be lost 3 | 4 | auto lo 5 | iface lo inet loopback 6 | 7 | {% if dns_nameservers is defined %} 8 | dns-nameservers {{ item.dns_nameservers|join (' ') }} 9 | {% endif %} 10 | {% if dns_search is defined %} 11 | dns-search {{ dns_search }} 12 | {% endif %} 13 | 14 | # path to interfaces files 15 | source /etc/network/interfaces.d/* 16 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tasks/redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: redhat | installing pre-reqs 3 | yum: 4 | name: "{{ item }}" 5 | state: present 6 | with_items: 7 | - libselinux-python 8 | - python-dnf #preparing for switchover to dnf instead of yum 9 | when: > 10 | ansible_distribution != "Fedora" 11 | 12 | - name: redhat | installing pre-reqs 13 | dnf: 14 | name: "{{ item }}" 15 | state: present 16 | with_items: 17 | - libselinux-python 18 | when: > 19 | ansible_distribution == "Fedora" 20 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/etc/network/interfaces.d/int.cfg.j2: -------------------------------------------------------------------------------- 1 | auto {{ item.int }} 2 | iface {{ item.int }} inet {{ item.method }} 3 | {% if item.method|lower == "static" %} 4 | address {{ item.address }} 5 | {% if item.netmask is defined %} 6 | netmask {{ item.netmask }} 7 | {% endif %} 8 | {% if item.gateway is defined %} 9 | gateway {{ item.gateway }} 10 | {% endif %} 11 | {% if item.addl_settings is defined %} 12 | {% for setting in item.addl_settings %} 13 | {{ setting }} 14 | {% endfor %} 15 | {% endif %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. ansible-bootstrap documentation master file, created by 2 | sphinx-quickstart on Fri Mar 4 12:27:25 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to ansible-bootstrap's documentation! 7 | ============================================= 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | 23 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. ansible-bootstrap documentation master file, created by 2 | sphinx-quickstart on Fri Mar 4 12:27:25 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to ansible-bootstrap's documentation! 7 | ============================================= 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | 23 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/etc/quagga/zebra.conf.j2: -------------------------------------------------------------------------------- 1 | ! 2 | ! Zebra configuration saved from vty 3 | ! 2014/09/28 21:25:52 4 | ! 5 | {% if quagga_hostname is defined %} 6 | hostname {{ quagga_hostname }} 7 | {% endif %} 8 | {% if quagga_hostname is not defined %} 9 | hostname {{ ansible_hostname }} 10 | {% endif %} 11 | password {{ quagga_password }} 12 | enable password {{ quagga_enable_password }} 13 | log file /var/log/quagga/zebra.log 14 | log syslog 15 | service password-encryption 16 | ! 17 | debug zebra events 18 | debug zebra packet 19 | ! 20 | ip forwarding 21 | ipv6 forwarding 22 | ! 23 | ! 24 | line vty 25 | ! 26 | -------------------------------------------------------------------------------- /host_vars/node0/quagga.yml: -------------------------------------------------------------------------------- 1 | --- 2 | quagga_interfaces_lo: 3 | - int: "lo{{ ':' }}0" 4 | address: '10.0.0.10/32' 5 | method: 'static' 6 | configure: true 7 | # - int: "lo{{ ':' }}1" 8 | # address: '10.0.0.11/32' 9 | # method: 'static' 10 | # configure: false 11 | # - int: "lo{{ ':' }}2" 12 | # address: '10.0.0.12/32' 13 | # method: 'static' 14 | # configure: false 15 | quagga_ospf_area_config: 16 | - network: '192.168.1.0/24' 17 | area: '{{ quagga_ospf_area }}' 18 | - network: '192.168.2.0/24' 19 | area: '{{ quagga_ospf_area }}' 20 | - network: '192.168.3.0/24' 21 | area: '{{ quagga_ospf_area }}' 22 | quagga_ospf_routerid: '10.0.0.10' 23 | -------------------------------------------------------------------------------- /roles/ansible-base/tasks/redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: redhat | installing base packages 3 | yum: 4 | name: "{{ item }}" 5 | state: "present" 6 | with_items: 7 | - 'curl' 8 | - 'git' 9 | - 'nano' 10 | - 'net-tools' 11 | - 'ntp' 12 | - 'python-dnf' #preparing for switching over to dnf instead of yum 13 | - 'sg3_utils' 14 | when: ansible_distribution != "Fedora" 15 | 16 | - name: redhat | installing base packages 17 | dnf: 18 | name: "{{ item }}" 19 | state: "present" 20 | with_items: 21 | - 'curl' 22 | - 'git' 23 | - 'nano' 24 | - 'net-tools' 25 | - 'ntp' 26 | - 'sg3_utils' 27 | when: ansible_distribution == "Fedora" 28 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/opt/scripts/fault_quagga.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # {{ ansible_managed }} 3 | 4 | # Stops all services on standby node 5 | #/etc/init.d/quagga stop 6 | service quagga stop 7 | #/etc/init.d/isc-dhcp-server stop 8 | #/etc/init.d/dnsmasq stop 9 | service dnsmasq stop 10 | #/etc/init.d/nginx stop 11 | #/etc/init.d/haproxy stop 12 | service haproxy stop 13 | 14 | # shutting down interfaces on standby node 15 | 16 | ip addr del {{ quagga_ospf_routerid }}/32 dev lo 17 | 18 | # Adds default route back on {{ quagga_mgmt_int }} when in standby mode 19 | #/sbin/route add default gw {{ quagga_mgmt_gateway }} 20 | 21 | /opt/scripts/primary-backup.sh fault 22 | 23 | service keepalived restart 24 | 25 | 26 | touch /var/log/faulted_node 27 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/tasks/gather_interfaces.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | remote_user: vagrant 4 | sudo: true 5 | vars: 6 | - default_configure_interface: false 7 | - default_interface_method: dhcp 8 | - host_vars_path: ./host_vars 9 | roles: 10 | tasks: 11 | - name: grabbing interfaces 12 | shell: ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d' 13 | register: show_interfaces 14 | - name: ensuring host_vars exists 15 | file: path={{ host_vars_path }} state=directory 16 | delegate_to: localhost 17 | sudo: false 18 | run_once: true 19 | - name: configuring host_vars 20 | template: src=host_interfaces.j2 dest={{ host_vars_path }}/{{ inventory_hostname }}_interfaces 21 | delegate_to: localhost 22 | sudo: false 23 | -------------------------------------------------------------------------------- /bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if [ -f /etc/debian_version ]; then 3 | codename="$(lsb_release -c | awk {'print $2}')" 4 | if [[ $codename == "vivid" ]]; then 5 | sudo apt-get update && \ 6 | sudo apt-get -y install python-simplejson 7 | fi 8 | if [[ $codename == "wily" ]]; then 9 | sudo apt-get update && \ 10 | sudo apt-get -y install python-simplejson 11 | fi 12 | if [[ $codename == "xenial" ]]; then 13 | sudo apt-get update && \ 14 | sudo apt-get -y install python-simplejson 15 | fi 16 | fi 17 | if [ -f /etc/redhat-release ]; then 18 | codename="$(gawk -F= '/^NAME/{print $2}' /etc/os-release)" 19 | if [[ $codename == "Fedora" ]]; then 20 | sudo dnf -y install python-devel python-dnf && \ 21 | sudo dnf -y group install "C Development Tools and Libraries" 22 | fi 23 | fi 24 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/etc/quagga/debian.conf.j2: -------------------------------------------------------------------------------- 1 | # 2 | # If this option is set the /etc/init.d/quagga script automatically loads 3 | # the config via "vtysh -b" when the servers are started. 4 | # Check /etc/pam.d/quagga if you intend to use "vtysh"! 5 | # 6 | vtysh_enable=yes 7 | zebra_options=" --daemon -A 127.0.0.1 -P 2601 -u {{ quagga_user }} -g quagga --keep_kernel --retain" 8 | bgpd_options=" --daemon -A 127.0.0.1 -P 2605 -u {{ quagga_user }} -g quagga --retain -p 179" 9 | ospfd_options=" --daemon -A 127.0.0.1 -P 2604 -u {{ quagga_user }} -g quagga" 10 | ospf6d_options=" --daemon -A ::1 -P 2606 -u {{ quagga_user }} -g quagga" 11 | ripd_options=" --daemon -A 127.0.0.1 -P 2602 -u {{ quagga_user }} -g quagga --retain" 12 | ripngd_options=" --daemon -A ::1 -P 2603 -u {{ quagga_user }} -g quagga --retain" 13 | isisd_options=" --daemon -A 127.0.0.1 -P 2608 -u {{ quagga_user }} -g quagga" 14 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/opt/scripts/backup_quagga.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # {{ ansible_managed }} 3 | 4 | # Stops all services on standby node 5 | #/etc/init.d/quagga stop 6 | service quagga stop 7 | #/etc/init.d/isc-dhcp-server stop 8 | #/etc/init.d/dnsmasq stop 9 | service dnsmasq stop 10 | #/etc/init.d/nginx stop 11 | #/etc/init.d/haproxy stop 12 | service haproxy stop 13 | 14 | # shutting down interfaces on standby node 15 | 16 | ip addr del {{ quagga_ospf_routerid }}/32 dev lo 17 | 18 | # Adds default route back on {{ quagga_mgmt_int }} when in standby mode 19 | #/sbin/route add default gw {{ quagga_mgmt_gateway }} 20 | 21 | # Reload KeepAliveD to make sure 22 | #/etc/init.d/keepalived reload 23 | 24 | /opt/scripts/primary-backup.sh backup 25 | 26 | iptables -t nat -F POSTROUTING 27 | 28 | touch /var/log/standby_node 29 | rm /var/log/primary_node 30 | rm /var/log/faulted_node 31 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/opt/scripts/master_quagga.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # {{ ansible_managed }} 3 | 4 | # Brings interfaces back up on primary node 5 | 6 | # Starts all services which should be running primary node 7 | #/etc/init.d/quagga restart 8 | service quagga restart 9 | #/etc/init.d/isc-dhcp-server start 10 | #/etc/init.d/dnsmasq restart 11 | service dnsmasq restart 12 | #/etc/init.d/nginx start 13 | #/etc/init.d/haproxy restart 14 | service haproxy restart 15 | 16 | # Removes default route back on {{ quagga_mgmt_int }} when in standby mode 17 | #/sbin/route del default gw {{ quagga_mgmt_gateway }} 18 | 19 | iptables -t nat -F POSTROUTING 20 | # iptables -t nat -A POSTROUTING -s {{ item.network }} -o {{ keepalived_vip_int }} -j SNAT --to {{ keepalived_vip }} 21 | 22 | /opt/scripts/primary-backup.sh primary 23 | 24 | touch /var/log/primary_node 25 | rm /var/log/standby_node 26 | rm /var/log/faulted_node 27 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/templates/etc/network/interfaces.d/interfaces.j2.orig: -------------------------------------------------------------------------------- 1 | 2 | # {{ ansible_managed }} 3 | 4 | {% if item.configure %} 5 | {% if item.method == "static" %} 6 | auto {{ item.name }} 7 | iface {{ item.name }} inet {{ item.method }} 8 | {% if item.address is defined and item.address != None %} 9 | address {{ item.address }} 10 | {% endif %} 11 | {% if item.netmask is defined and item.netmask != None %} 12 | netmask {{ item.netmask }} 13 | {% endif %} 14 | {% if item.gateway is defined and item.gateway != None %} 15 | gateway {{ item.gateway }} 16 | {% endif %} 17 | {% endif %} 18 | {% if item.method == "dhcp" %} 19 | auto {{ item.name }} 20 | iface {{ item.name }} inet {{ item.method }} 21 | {% endif %} 22 | {% if item.wireless_network is defined and item.wireless_network %} 23 | wpa-ssid {{ item.wpa_ssid }} 24 | wpa-psk {{ item.wpa_psk }} 25 | {% endif %} 26 | {% endif %} 27 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tasks/debian_security.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: debian_security | allowing SSH password authentication 3 | lineinfile: 4 | dest: /etc/ssh/sshd_config 5 | regexp: "^PasswordAuthentication" 6 | line: "PasswordAuthentication yes" 7 | state: present 8 | notify: restart ssh 9 | 10 | - name: debian_security | disabling SSH GSS API authentication 11 | lineinfile: 12 | dest: /etc/ssh/sshd_config 13 | regexp: "^GSSAPIAuthentication" 14 | line: "GSSAPIAuthentication no" 15 | state: present 16 | notify: restart ssh 17 | 18 | - name: debian_security | installing fail2ban 19 | apt: 20 | name: fail2ban 21 | state: present 22 | when: install_fail2ban is defined and install_fail2ban 23 | 24 | - name: debian_security | removing fail2ban 25 | apt: 26 | name: fail2ban 27 | state: absent 28 | when: > 29 | (install_fail2ban is defined and not install_fail2ban) or 30 | install_fail2ban is not defined 31 | -------------------------------------------------------------------------------- /roles/ansible-base/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for ansible-base 3 | - include: debian.yml 4 | tags: 5 | - base 6 | when: ansible_os_family == "Debian" 7 | 8 | - include: debian_update_dns_nameservers.yml 9 | tags: 10 | - update_dns_nameservers 11 | when: > 12 | ansible_os_family == "Debian" and 13 | base_update_dns_nameservers 14 | 15 | - include: debian_update_dns_search.yml 16 | tags: 17 | - update_dns_search 18 | when: > 19 | ansible_os_family == "Debian" and 20 | base_update_dns_search 21 | 22 | - include: redhat.yml 23 | tags: 24 | - base 25 | when: ansible_os_family == "RedHat" 26 | 27 | # - include: manage_ssh_known_hosts.yml 28 | # tags: 29 | # - manage_ssh_known_hosts 30 | # when: base_ssh_manage_ssh_known_hosts 31 | 32 | # - include: generate_rundeck_resources.yml 33 | # tags: 34 | # - generate_rundeck_resources 35 | # when: > 36 | # base_rundeck_generate_resources_xml and 37 | # base_rundeck_server is defined 38 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tasks/lockdown.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: lockdown | disabling root SSH access 3 | lineinfile: 4 | dest: /etc/ssh/sshd_config 5 | regexp: "^PermitRootLogin" 6 | line: "PermitRootLogin no" 7 | state: present 8 | notify: restart ssh 9 | when: ansible_os_family == "Debian" 10 | 11 | - name: lockdown | disabling root SSH access 12 | lineinfile: 13 | dest: /etc/ssh/sshd_config 14 | regexp: "^PermitRootLogin" 15 | line: "PermitRootLogin no" 16 | state: present 17 | notify: restart sshd 18 | when: ansible_os_family == "RedHat" 19 | 20 | - name: lockdown | changing root password (RedHat) 21 | user: 22 | name: root 23 | password: "{{ root_password }}" 24 | when: ansible_os_family == "RedHat" 25 | 26 | - name: lockdown | changing/setting root password (Debian) 27 | user: 28 | name: root 29 | password: "{{ root_password }}" 30 | when: > 31 | (debian_set_root_pw is defined and debian_set_root_pw) and 32 | ansible_os_family == "Debian" and 33 | root_password is defined 34 | -------------------------------------------------------------------------------- /roles/ansible-base/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: python 3 | python: "2.7" 4 | 5 | env: 6 | - SITE=test.yml 7 | 8 | before_install: 9 | - sudo apt-get update -qq 10 | - sudo apt-get install -y curl 11 | 12 | install: 13 | # Install Ansible. 14 | - pip install ansible 15 | 16 | # Add ansible.cfg to pick up roles path. 17 | - "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg" 18 | 19 | script: 20 | # Check the role/playbook's syntax. 21 | - "ansible-playbook -i tests/inventory tests/$SITE --syntax-check" 22 | 23 | # Run the role/playbook with ansible-playbook. 24 | - "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo" 25 | 26 | # Run the role/playbook again, checking to make sure it's idempotent. 27 | - > 28 | ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo 29 | | grep -q 'changed=0.*failed=0' 30 | && (echo 'Idempotence test: pass' && exit 0) 31 | || (echo 'Idempotence test: fail' && exit 1) 32 | 33 | # Make sure Ansible is installed (yes, this is contrived, since Ansible was 34 | # already installed via pip earlier...). 35 | - "which ansible" 36 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: python 3 | python: "2.7" 4 | 5 | env: 6 | - SITE=test.yml 7 | 8 | before_install: 9 | - sudo apt-get update -qq 10 | - sudo apt-get install -y curl 11 | 12 | install: 13 | # Install Ansible. 14 | - pip install ansible 15 | 16 | # Add ansible.cfg to pick up roles path. 17 | - "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg" 18 | 19 | script: 20 | # Check the role/playbook's syntax. 21 | - "ansible-playbook -i tests/inventory tests/$SITE --syntax-check" 22 | 23 | # Run the role/playbook with ansible-playbook. 24 | - "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo" 25 | 26 | # Run the role/playbook again, checking to make sure it's idempotent. 27 | - > 28 | ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo 29 | | grep -q 'changed=0.*failed=0' 30 | && (echo 'Idempotence test: pass' && exit 0) 31 | || (echo 'Idempotence test: fail' && exit 1) 32 | 33 | # Make sure Ansible is installed (yes, this is contrived, since Ansible was 34 | # already installed via pip earlier...). 35 | - "which ansible" 36 | -------------------------------------------------------------------------------- /roles/ansible-base/tasks/debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: debian | removing vmware tools package repo 3 | apt_repository: 4 | repo: "deb http://packages.vmware.com/packages/ubuntu trusty main" 5 | state: "absent" 6 | 7 | - name: debian | running apt-get update 8 | apt: 9 | update_cache: yes 10 | cache_valid_time: 86400 11 | tags: 12 | - apt_update 13 | 14 | - name: debian | running apt-get update (forced) 15 | apt: 16 | update_cache: yes 17 | tags: 18 | - force-apt-update 19 | when: > 20 | base_force_apt_update is defined and 21 | base_force_apt_update 22 | 23 | - name: debian | installing base packages 24 | apt: 25 | name: "{{ item }}" 26 | state: "present" 27 | with_items: 28 | - 'build-essential' 29 | - 'software-properties-common' 30 | - 'curl' 31 | - 'git' 32 | - 'git-core' 33 | - 'ntp' 34 | - 'scsitools' 35 | 36 | - name: debian | resetting /etc/dhcp/dhclient.conf to default 37 | template: 38 | src: "etc/dhcp/dhclient.conf.j2" 39 | dest: "/etc/dhcp/dhclient.conf" 40 | owner: "root" 41 | group: "root" 42 | mode: 0644 43 | tags: 44 | - update_dhcpclient_conf 45 | when: > 46 | base_update_dhcpclient_conf is defined and 47 | base_update_dhcpclient_conf 48 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | Initial host configurations (Bootstrap)...Security, SSH, etc. 5 | 6 | [![Build Status](https://travis-ci.org/mrlesmithjr/ansible-bootstrap.svg?branch=master)](https://travis-ci.org/mrlesmithjr/ansible-bootstrap) 7 | Requirements 8 | ------------ 9 | 10 | None 11 | 12 | Role Variables 13 | -------------- 14 | 15 | ```` 16 | --- 17 | debian_set_root_pw: false #Only set to true if desired to set root password...for Debian/Ubuntu systems 18 | reboot: true # reboot after changing hostname to match inventory_hostname - set to false if you do not want to reboot 19 | root_password: [] #define root password for hosts....define here or in group_vars/all...If Ubuntu/Debian choose wisely if you want to do this 20 | ```` 21 | 22 | Dependencies 23 | ------------ 24 | 25 | None 26 | 27 | Example Playbook 28 | ---------------- 29 | 30 | Example Playbook 31 | ---------------- 32 | #### Galaxy 33 | ----------- 34 | - hosts: servers 35 | roles: 36 | - mrlesmithjr.bootstrap 37 | - mrlesmithjr.users 38 | #### GitHub 39 | ----------- 40 | - hosts: servers 41 | roles: 42 | - ansible-bootstrap 43 | - ansible-users 44 | 45 | License 46 | ------- 47 | 48 | BSD 49 | 50 | Author Information 51 | ------------------ 52 | 53 | Larry Smith Jr. 54 | - @mrlesmithjr 55 | - http://everythingshouldbevirtual.com 56 | - mrlesmithjr [at] gmail.com 57 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/etc/quagga/daemons.j2: -------------------------------------------------------------------------------- 1 | # This file tells the quagga package which daemons to start. 2 | # 3 | # Entries are in the format: =(yes|no|priority) 4 | # 0, "no" = disabled 5 | # 1, "yes" = highest priority 6 | # 2 .. 10 = lower priorities 7 | # Read /usr/share/doc/quagga/README.Debian for details. 8 | # 9 | # Sample configurations for these daemons can be found in 10 | # /usr/share/doc/quagga/examples/. 11 | # 12 | # ATTENTION: 13 | # 14 | # When activation a daemon at the first time, a config file, even if it is 15 | # empty, has to be present *and* be owned by the user and group "quagga", else 16 | # the daemon will not be started by /etc/init.d/quagga. The permissions should 17 | # be u=rw,g=r,o=. 18 | # When using "vtysh" such a config file is also needed. It should be owned by 19 | # group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too. 20 | # 21 | zebra=yes 22 | {% if (quagga_enable_bgpd is defined and not quagga_enable_bgpd) or quagga_enable_bgpd is not defined %} 23 | bgpd=no 24 | {% endif %} 25 | {% if quagga_enable_bgpd is defined and quagga_enable_bgpd %} 26 | bgpd=yes 27 | {% endif %} 28 | {% if (quagga_enable_ospfd is defined and not quagga_enable_ospfd) or quagga_enable_ospfd is not defined %} 29 | ospfd=no 30 | {% endif %} 31 | {% if quagga_enable_ospfd is defined and quagga_enable_ospfd %} 32 | ospfd=yes 33 | {% endif %} 34 | ospf6d=no 35 | ripd=no 36 | ripngd=no 37 | isisd=no 38 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/etc/quagga/ospfd.conf.j2: -------------------------------------------------------------------------------- 1 | ! 2 | ! Zebra configuration saved from vty 3 | ! 2014/09/28 16:51:40 4 | ! 5 | {% if quagga_hostname is defined %} 6 | hostname {{ quagga_hostname }} 7 | {% endif %} 8 | {% if quagga_hostname is not defined %} 9 | hostname {{ ansible_hostname }} 10 | {% endif %} 11 | password {{ quagga_password }} 12 | enable password {{ quagga_enable_password }} 13 | log file /var/log/quagga/ospfd.log 14 | log stdout 15 | log syslog 16 | log monitor 17 | service password-encryption 18 | ! 19 | debug ospf event 20 | debug ospf packet all 21 | ! 22 | {% if quagga_config_ospfd is defined and quagga_config_ospfd %} 23 | router ospf 24 | {% if quagga_ospf_routerid is defined %} 25 | ospf router-id {{ quagga_ospf_routerid }} 26 | {% endif %} 27 | log-adjacency-changes 28 | {% if quagga_ospf_redistribute is defined %} 29 | {% for item in quagga_ospf_redistribute %} 30 | redistribute {{ item }} 31 | {% endfor %} 32 | {% endif %} 33 | {% if quagga_passive_int is defined %} 34 | {% for item in quagga_passive_int %} 35 | passive-interface {{ item.int }} 36 | {% endfor %} 37 | {% endif %} 38 | {% if quagga_no_passive_int is defined %} 39 | {% for item in quagga_no_passive_int %} 40 | no passive-interface {{ item.int }} 41 | {% endfor %} 42 | {% endif %} 43 | {% if quagga_ospf_area_config is defined %} 44 | {% for item in quagga_ospf_area_config %} 45 | network {{ item.network }} area {{ item.area }} 46 | {% endfor %} 47 | {% endif %} 48 | {% endif %} 49 | ! 50 | line vty 51 | ! 52 | -------------------------------------------------------------------------------- /roles/ansible-base/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for ansible-base 3 | base_dns_nameservers: # Define DNS servers to update to if update_dns_nameservers = true 4 | - '8.8.8.8' 5 | - '8.8.4.4' 6 | # Defines if /etc/network/interfaces dns-nameservers is present or not...Only used when update_dns_nameservers=true 7 | base_dns_nameservers_state: 'present' 8 | base_dns_search: 'example.org' # Defines dns-search for /etc/network/interfaces 9 | # Defines if /etc/network/interfaces dns-search is present or not...Only used if base_update_dns_search=true 10 | base_dns_search_state: 'present' 11 | base_force_apt_update: false # Defines if apt-get udpate should be forced 12 | base_rundeck_generate_resources_xml: false # Defines if rundeck CI resources.xml should be generated if using rundeck... 13 | base_rundeck_resources_xml_file: 'resources.xml' # Defines the name of the resources file to be created on rundeck server 14 | # Defines defaults location on rundeck server to store the new resources.xml file 15 | base_rundeck_resources_xml_location: '/var/lib/rundeck/var' 16 | # Define server that is running rundeck CI if used...define here or globally in group_vars/all/servers 17 | base_rundeck_server: [] 18 | base_ssh_manage_ssh_known_hosts: false # Define if hosts ssh_known_hosts should be managed 19 | # Defines if dhcp client config should be updated...define here or globally in group_vars/all/configs 20 | base_update_dhcpclient_conf: false 21 | # Defines if dns servers should be updated...define here or globally in group_vars/all/configs 22 | base_update_dns_nameservers: false 23 | # Defines if dns search domain should be updated...define here or globally in group_vars/all/configs 24 | base_update_dns_search: false 25 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/tasks/redhat_security.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: redhat_security | allowing SSH password authentication 3 | lineinfile: 4 | dest: /etc/ssh/sshd_config 5 | regexp: "^PasswordAuthentication" 6 | line: "PasswordAuthentication yes" 7 | state: present 8 | notify: restart sshd 9 | 10 | - name: redhat_security | disabling SSH GSS API authentication 11 | lineinfile: 12 | dest: /etc/ssh/sshd_config 13 | regexp: "^GSSAPIAuthentication" 14 | line: "GSSAPIAuthentication no" 15 | state: present 16 | notify: restart sshd 17 | 18 | - name: redhat_security | adding EPEL repo 19 | yum: 20 | name: epel-release 21 | state: present 22 | when: > 23 | ansible_distribution != "Fedora" 24 | 25 | - name: redhat_security | installing fail2ban 26 | yum: 27 | name: fail2ban 28 | state: present 29 | when: > 30 | (install_fail2ban is defined and install_fail2ban) and 31 | ansible_distribution != "Fedora" 32 | 33 | - name: redhat_security | installing fail2ban 34 | dnf: 35 | name: fail2ban 36 | state: present 37 | when: > 38 | (install_fail2ban is defined and install_fail2ban) and 39 | ansible_distribution == "Fedora" 40 | 41 | - name: redhat_security | removing fail2ban 42 | yum: 43 | name: fail2ban 44 | state: absent 45 | when: > 46 | ((install_fail2ban is defined and not install_fail2ban) or 47 | install_fail2ban is not defined) and 48 | ansible_distribution != "Fedora" 49 | 50 | - name: redhat_security | removing fail2ban 51 | dnf: 52 | name: fail2ban 53 | state: absent 54 | when: > 55 | ((install_fail2ban is defined and not install_fail2ban) or 56 | install_fail2ban is not defined) and 57 | ansible_distribution == "Fedora" 58 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/tasks/debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: debian | installing pre-req packages 3 | apt: name={{ item }} state=present 4 | with_items: 5 | - bridge-utils 6 | - ifenslave 7 | - lldpd 8 | - vlan 9 | 10 | #- name: debian | grabbing interfaces 11 | # shell: ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d' 12 | # register: show_interfaces 13 | 14 | - name: debian | configuring defined interfaces 15 | template: src=etc/network/interfaces.j2 dest=/etc/network/interfaces owner=root group=root mode=0644 16 | register: config_interface 17 | when: config_network_interfaces is defined and config_network_interfaces 18 | 19 | #- name: debian | ensuring interfaces.d folder exists 20 | # file: path=/etc/network/interfaces.d state=directory 21 | 22 | #- name: debian | configuring defined interfaces 23 | # template: src=etc/network/interfaces.d/interfaces.j2 dest=/etc/network/interfaces.d/ifcfg-{{ item.name }} owner=root group=root mode=0644 24 | # register: config_interface 25 | # with_items: interfaces 26 | # when: config_network_interfaces is defined and config_network_interfaces 27 | 28 | - name: debian | restarting network interfaces 29 | shell: bash -c "ifdown {{ item.name }} && ifup {{ item.name }}" 30 | with_items: network_interfaces 31 | when: (config_network_interfaces is defined and config_network_interfaces) and item.configure and config_interface.changed and (enable_configured_interfaces_after_defining is defined and enable_configured_interfaces_after_defining) 32 | 33 | - name: debian | restarting network interfaces 34 | shell: bash -c "ifdown {{ item.name }} && ifup {{ item.name }}" 35 | with_items: network_vlans 36 | when: (config_network_vlans is defined and config_network_vlans) and item.configure and config_interface.changed and (enable_configured_interfaces_after_defining is defined and enable_configured_interfaces_after_defining) 37 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/etc/quagga/bgpd.conf.j2: -------------------------------------------------------------------------------- 1 | ! -*- bgp -*- 2 | ! 3 | ! BGPd sample configuratin file 4 | ! 5 | ! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $ 6 | ! 7 | {% if quagga_hostname is defined %} 8 | hostname {{ quagga_hostname }} 9 | {% endif %} 10 | {% if quagga_hostname is not defined %} 11 | hostname {{ ansible_hostname }} 12 | {% endif %} 13 | password {{ quagga_password }} 14 | enable password {{ quagga_enable_password }} 15 | ! 16 | log file /var/log/quagga/bgpd.log 17 | log stdout 18 | log syslog 19 | log monitor 20 | ! 21 | service password-encryption 22 | ! 23 | {% if quagga_config_bgpd is defined and quagga_config_bgpd %} 24 | {% if quagga_bgp_router_configs is defined %} 25 | {% if item.prefix_lists is defined %} 26 | {% for pl in item.prefix_lists %} 27 | ip prefix-list {{ pl.name }} seq {{ pl.sequence }} {{ pl.action }} {{ pl.network }} 28 | {% endfor %} 29 | {% endif %} 30 | router bgp {{ item.local_as }} 31 | bgp router-id {{ item.router_id }} 32 | bgp log-neighbor-changes 33 | {% if item.network_advertisements is defined %} 34 | {% for adv in item.network_advertisements %} 35 | network {{ adv }} 36 | {% endfor %} 37 | {% endif %} 38 | {% for nbr in item.neighbors %} 39 | neighbor {{ nbr.neighbor }} remote-as {{ nbr.remote_as }} 40 | {% if nbr.description is defined %} 41 | neighbor {{ nbr.neighbor }} description "{{ nbr.description }}" 42 | {% endif %} 43 | neighbor {{ nbr.neighbor }} next-hop-self 44 | neighbor {{ nbr.neighbor }} soft-reconfiguration inbound 45 | {% if nbr.prefix_lists is defined %} 46 | {% for pl in nbr.prefix_lists %} 47 | neighbor {{ nbr.neighbor }} capability orf prefix-list {{ pl.orf }} 48 | {% if pl.orf|lower == "send" or pl.orf|lower == "both" %} 49 | neighbor {{ nbr.neighbor }} prefix-list {{ pl.name }} {{ pl.direction }} 50 | {% endif %} 51 | {% endfor %} 52 | {% endif %} 53 | {% endfor %} 54 | {% endif %} 55 | {% endif %} 56 | -------------------------------------------------------------------------------- /roles/ansible-base/tasks/manage_ssh_known_hosts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: identifying hosts 3 | local_action: ping 4 | register: "id_hosts" 5 | 6 | - name: cleaning up 7 | file: 8 | path: "/tmp/hosts" 9 | state: "absent" 10 | 11 | - name: cleaning up 12 | file: 13 | path: "/tmp/hosts" 14 | state: "absent" 15 | delegate_to: 'localhost' 16 | run_once: true 17 | 18 | - name: creating temporary hosts file 19 | file: 20 | path: "/tmp/hosts" 21 | state: "touch" 22 | mode: 0777 23 | delegate_to: 'localhost' 24 | run_once: true 25 | 26 | - name: adding hosts to temporary hosts file 27 | lineinfile: 28 | dest: "/tmp/hosts" 29 | regexp: "^{{ ansible_hostname }}" 30 | line: "{{ ansible_hostname }}" 31 | state: "present" 32 | delegate_to: 'localhost' 33 | with_items: '{{ id_hosts.results }}' 34 | when: id_hosts is defined 35 | 36 | - name: adding hosts to temporary hosts file 37 | lineinfile: 38 | dest: "/tmp/hosts" 39 | regexp: "^{{ ansible_hostname }}.{{ pri_domain_name }}" 40 | line: "{{ ansible_hostname }}.{{ pri_domain_name }}" 41 | state: "present" 42 | delegate_to: 'localhost' 43 | with_items: '{{ id_hosts.results }}' 44 | when: id_hosts is defined 45 | 46 | - name: adding hosts to temporary hosts file 47 | lineinfile: 48 | dest: "/tmp/hosts" 49 | regexp: "^{{ ansible_default_ipv4.address }}" 50 | line: "{{ ansible_default_ipv4.address }}" 51 | state: "present" 52 | delegate_to: 'localhost' 53 | with_items: '{{ id_hosts.results }}' 54 | when: id_hosts is defined 55 | 56 | - name: keyscan 57 | shell: "ssh-keyscan -H -f /tmp/hosts >> /tmp/hosts.ready" 58 | delegate_to: 'localhost' 59 | run_once: true 60 | 61 | - name: sort 62 | shell: "sort -u /tmp/hosts.ready > /tmp/hosts.sorted" 63 | delegate_to: 'localhost' 64 | run_once: true 65 | 66 | - name: copying new ssh_known_hosts 67 | copy: 68 | src: "/tmp/hosts.sorted" 69 | dest: "/etc/ssh/ssh_known_hosts" 70 | 71 | - name: cleaning up 72 | file: 73 | path: "/tmp/hosts" 74 | state: "absent" 75 | delegate_to: 'localhost' 76 | run_once: true 77 | -------------------------------------------------------------------------------- /roles/ansible-base/templates/etc/dhcp/dhclient.conf.j2: -------------------------------------------------------------------------------- 1 | # {{ ansible_managed }} 2 | # Configuration file for /sbin/dhclient, which is included in Debian's 3 | # dhcp3-client package. 4 | # 5 | # This is a sample configuration file for dhclient. See dhclient.conf's 6 | # man page for more information about the syntax of this file 7 | # and a more comprehensive list of the parameters understood by 8 | # dhclient. 9 | # 10 | # Normally, if the DHCP server provides reasonable information and does 11 | # not leave anything out (like the domain name, for example), then 12 | # few changes must be made to this file, if any. 13 | # 14 | 15 | option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; 16 | 17 | #send host-name "andare.fugue.com"; 18 | send host-name = gethostname(); 19 | #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; 20 | #send dhcp-lease-time 3600; 21 | #supersede domain-name "fugue.com home.vix.com"; 22 | #prepend domain-name-servers 127.0.0.1; 23 | request subnet-mask, broadcast-address, time-offset, routers, 24 | domain-name, domain-name-servers, domain-search, host-name, 25 | dhcp6.name-servers, dhcp6.domain-search, 26 | netbios-name-servers, netbios-scope, interface-mtu, 27 | rfc3442-classless-static-routes, ntp-servers, 28 | dhcp6.fqdn, dhcp6.sntp-servers; 29 | #require subnet-mask, domain-name-servers; 30 | #timeout 60; 31 | #retry 60; 32 | #reboot 10; 33 | #select-timeout 5; 34 | #initial-interval 2; 35 | #script "/etc/dhcp3/dhclient-script"; 36 | #media "-link0 -link1 -link2", "link0 link1"; 37 | #reject 192.33.137.209; 38 | 39 | #alias { 40 | # interface "eth0"; 41 | # fixed-address 192.5.5.213; 42 | # option subnet-mask 255.255.255.255; 43 | #} 44 | 45 | #lease { 46 | # interface "eth0"; 47 | # fixed-address 192.33.137.200; 48 | # medium "link0 link1"; 49 | # option host-name "andare.swiftmedia.com"; 50 | # option subnet-mask 255.255.255.0; 51 | # option broadcast-address 192.33.137.255; 52 | # option routers 192.33.137.250; 53 | # option domain-name-servers 127.0.0.1; 54 | # renew 2 2000/1/12 00:00:01; 55 | # rebind 2 2000/1/12 00:00:01; 56 | # expire 2 2000/1/12 00:00:01; 57 | #} 58 | -------------------------------------------------------------------------------- /roles/ansible-quagga/tasks/config_interfaces.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: config_interfaces | Configuring Loopback Interfaces 3 | template: 4 | src: "etc/network/interfaces.d/int.cfg.j2" 5 | dest: "/etc/network/interfaces.d/{{ item.int }}.cfg" 6 | register: "loopback_interfaces_configured" 7 | with_items: '{{ quagga_interfaces_lo }}' 8 | when: > 9 | quagga_interfaces_lo is defined and 10 | item.configure 11 | 12 | - name: config_interfaces | Restarting Loopback Interfaces 13 | shell: bash -c "ifdown {{ item.int }} && ifup {{ item.int }}" 14 | with_items: '{{ quagga_interfaces_lo }}' 15 | when: > 16 | quagga_interfaces_lo is defined and 17 | item.configure and 18 | loopback_interfaces_configured.changed 19 | 20 | - name: config_interfaces | Shutting Down Loopback Interfaces (Un-Configured) 21 | shell: bash -c "ifdown {{ item.int }}" 22 | register: "loopback_interfaces_shutdown" 23 | with_items: '{{ quagga_interfaces_lo }}' 24 | when: not item.configure 25 | 26 | - name: config_interfaces | Removing Loopback Interfaces (Un-Configured) 27 | file: 28 | path: "/etc/network/interfaces.d/{{ item.int }}.cfg" 29 | state: "absent" 30 | with_items: '{{ quagga_interfaces_lo }}' 31 | when: loopback_interfaces_shutdown.changed 32 | 33 | - name: config_interfaces | Configuring Interfaces 34 | template: 35 | src: "etc/network/interfaces.d/int.cfg.j2" 36 | dest: "/etc/network/interfaces.d/{{ item.int }}.cfg" 37 | register: "interfaces_configured" 38 | with_items: '{{ quagga_interfaces }}' 39 | when: > 40 | quagga_interfaces is defined and 41 | item.configure 42 | 43 | - name: config_interfaces | Restarting Interfaces 44 | shell: bash -c "ifdown {{ item.int }} && ifup {{ item.int }}" 45 | with_items: '{{ quagga_interfaces }}' 46 | when: > 47 | quagga_interfaces is defined and 48 | item.configure and 49 | interfaces_configured.changed 50 | 51 | - name: config_interfaces | Shutting Down Interfaces (Un-Configured) 52 | shell: bash -c "ifdown {{ item.int }}" 53 | register: "interfaces_shutdown" 54 | with_items: '{{ quagga_interfaces }}' 55 | when: not item.configure 56 | 57 | - name: config_interfaces | Removing Interfaces (Un-Configured) 58 | file: 59 | path: "/etc/network/interfaces.d/{{ item.int }}.cfg" 60 | state: "absent" 61 | with_items: '{{ quagga_interfaces }}' 62 | when: interfaces_shutdown.changed 63 | -------------------------------------------------------------------------------- /roles/ansible-quagga/tasks/config_quagga.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: quagga_config | ensuring vlan package is installed 3 | apt: 4 | name: "vlan" 5 | state: "present" 6 | 7 | - name: quagga_config | configuring network settings 8 | sysctl: 9 | name: "{{ item.name }}" 10 | value: "{{ item.value }}" 11 | state: "present" 12 | reload: yes 13 | with_items: '{{ quagga_sysctl_network_settings }}' 14 | when: quagga_sysctl_network_settings is defined 15 | 16 | - name: quagga_config | configuring quagga 17 | template: 18 | src: "etc/quagga/{{ item }}.j2" 19 | dest: "{{ quagga_root_dir }}/{{ item }}" 20 | owner: "quagga" 21 | group: "quagga" 22 | mode: 0644 23 | notify: "restart quagga" 24 | with_items: '{{ quagga_configs }}' 25 | 26 | - name: quagga_config | configuring ospf 27 | template: 28 | src: "etc/quagga/ospfd.conf.j2" 29 | dest: "{{ quagga_root_dir }}/ospfd.conf" 30 | owner: "quagga" 31 | group: "quagga" 32 | mode: 0644 33 | notify: "restart quagga" 34 | when: quagga_enable_ospfd 35 | 36 | - name: quagga_config | configuring bgp 37 | template: 38 | src: "etc/quagga/bgpd.conf.j2" 39 | dest: "{{ quagga_root_dir }}/bgpd.conf" 40 | owner: "quagga" 41 | group: "quagga" 42 | mode: 0644 43 | notify: "restart quagga" 44 | with_items: '{{ quagga_bgp_router_configs }}' 45 | when: > 46 | quagga_bgp_router_configs is defined and 47 | quagga_enable_bgpd and 48 | not quagga_config_bgpd 49 | 50 | - name: quagga_config | configuring bgp 51 | template: 52 | src: "etc/quagga/bgpd.conf.j2" 53 | dest: "{{ quagga_root_dir }}/bgpd.conf" 54 | owner: "quagga" 55 | group: "quagga" 56 | mode: 0644 57 | notify: "restart quagga" 58 | with_items: '{{ quagga_bgp_router_configs }}' 59 | when: > 60 | (quagga_bgp_router_configs is defined and 61 | (item.name == inventory_hostname)) and 62 | quagga_enable_bgpd and 63 | quagga_config_bgpd 64 | 65 | # - name: quagga_config | setting permissions on files within {{ quagga_root_dir }} 66 | # file: 67 | # path: "{{ quagga_root_dir }}" 68 | # owner: "quagga" 69 | # group: "quagga" 70 | # mode: 0644 71 | # state: "directory" 72 | # recurse: yes 73 | # 74 | # - name: quagga_config | setting permissions on folder {{ quagga_root_dir }} 75 | # file: 76 | # path: "{{ quagga_root_dir }}" 77 | # owner: "quagga" 78 | # group: "quaggavty" 79 | # mode: 0775 80 | # state: "directory" 81 | -------------------------------------------------------------------------------- /roles/ansible-base/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | Common base role for all hosts. Should be ran after mrlesmithjr.bootstrap role. 5 | (Configure update dhcp client,update dns servers,configure lvm) 6 | 7 | Requirements 8 | ------------ 9 | 10 | If creating, resizing or creating LVM volumes/volume groups ensure that you 11 | define the correct current disk and the new disk(s) added. If you choose to use 12 | apt-cacher ensure that you already have a server built and configured correctly 13 | for apt-caching. 14 | 15 | Role Variables 16 | -------------- 17 | 18 | ``` 19 | --- 20 | # defaults file for ansible-base 21 | base_dns_nameservers: # Define DNS servers to update to if update_dns_nameservers = true 22 | - '8.8.8.8' 23 | - '8.8.4.4' 24 | # Defines if /etc/network/interfaces dns-nameservers is present or not...Only used when update_dns_nameservers=true 25 | base_dns_nameservers_state: 'present' 26 | base_dns_search: 'example.org' # Defines dns-search for /etc/network/interfaces 27 | # Defines if /etc/network/interfaces dns-search is present or not...Only used if base_update_dns_search=true 28 | base_dns_search_state: 'present' 29 | base_force_apt_update: false # Defines if apt-get udpate should be forced 30 | base_rundeck_generate_resources_xml: false # Defines if rundeck CI resources.xml should be generated if using rundeck... 31 | base_rundeck_resources_xml_file: 'resources.xml' # Defines the name of the resources file to be created on rundeck server 32 | # Defines defaults location on rundeck server to store the new resources.xml file 33 | base_rundeck_resources_xml_location: '/var/lib/rundeck/var' 34 | # Define server that is running rundeck CI if used...define here or globally in group_vars/all/servers 35 | base_rundeck_server: [] 36 | base_ssh_manage_ssh_known_hosts: false # Define if hosts ssh_known_hosts should be managed 37 | # Defines if dhcp client config should be updated...define here or globally in group_vars/all/configs 38 | base_update_dhcpclient_conf: false 39 | # Defines if dns servers should be updated...define here or globally in group_vars/all/configs 40 | base_update_dns_nameservers: false 41 | # Defines if dns search domain should be updated...define here or globally in group_vars/all/configs 42 | base_update_dns_search: false 43 | ``` 44 | 45 | Dependencies 46 | ------------ 47 | 48 | None 49 | 50 | Example Playbook 51 | ---------------- 52 | 53 | #### Galaxy 54 | ----------- 55 | - hosts: servers 56 | roles: 57 | - mrlesmithjr.base 58 | #### GitHub 59 | ----------- 60 | - hosts: servers 61 | roles: 62 | - ansible-base 63 | 64 | License 65 | ------- 66 | 67 | BSD 68 | 69 | Author Information 70 | ------------------ 71 | 72 | Larry Smith Jr. 73 | - @mrlesmithjr 74 | - http://everythingshouldbevirtual.com 75 | - mrlesmithjr [at] gmail.com 76 | -------------------------------------------------------------------------------- /roles/ansible-base/tasks/generate_rundeck_resources.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: identifying hosts 3 | action: ping 4 | register: "id_hosts" 5 | 6 | - name: checking for exsisting resources.xml 7 | stat: 8 | path: "{{ base_rundeck_resources_xml_location }}/{{ base_rundeck_resources_xml_file }}" 9 | delegate_to: '{{ base_rundeck_server }}' 10 | register: "resources_xml" 11 | run_once: true 12 | 13 | - name: creating resources.xml 14 | template: 15 | src: "{{ base_rundeck_resources_xml_file }}.j2" 16 | dest: "{{ base_rundeck_resources_xml_location }}/{{ base_rundeck_resources_xml_file }}" 17 | owner: "rundeck" 18 | group: "rundeck" 19 | mode: 0755 20 | delegate_to: '{{ base_rundeck_server }}' 21 | run_once: true 22 | when: not resources_xml.stat.exists 23 | 24 | - name: creating rundeck resources.xml (not base_rundeck_server) 25 | lineinfile: 26 | dest: "{{ base_rundeck_resources_xml_location }}/{{ base_rundeck_resources_xml_file }}" 27 | line: "" 28 | insertbefore: "^" 29 | state: "present" 30 | delegate_to: '{{ base_rundeck_server }}' 31 | with_items: '{{ id_hosts.results }}' 32 | when: (inventory_hostname != base_rundeck_server) 33 | 34 | - name: creating rundeck resources.xml (base_rundeck_server) 35 | lineinfile: 36 | dest: "{{ base_rundeck_resources_xml_location }}/{{ base_rundeck_resources_xml_file }}" 37 | line: "" 38 | insertbefore: "^" 39 | state: "present" 40 | delegate_to: '{{ base_rundeck_server }}' 41 | with_items: '{{ id_hosts.results }}' 42 | when: (inventory_hostname == base_rundeck_server) 43 | 44 | - name: cleaning up tags in resources.xml 45 | shell: "sed -i -e \"s/[][]//g\" {{ base_rundeck_resources_xml_location }}/{{ base_rundeck_resources_xml_file }}" 46 | delegate_to: '{{ base_rundeck_server }}' 47 | run_once: true 48 | 49 | - name: cleaning up resources.xml 50 | shell: "sed -i -e \"s/'//g\" {{ base_rundeck_resources_xml_location }}/{{ base_rundeck_resources_xml_file }}" 51 | delegate_to: '{{ base_rundeck_server }}' 52 | run_once: true 53 | 54 | - name: ensuring resources.xml is still owned by rundeck user 55 | file: 56 | path: "{{ base_rundeck_resources_xml_location }}/{{ base_rundeck_resources_xml_file }}" 57 | owner: "rundeck" 58 | group: "rundeck" 59 | mode: 0755 60 | delegate_to: '{{ base_rundeck_server }}' 61 | run_once: true 62 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Index — ansible-bootstrap 1.0 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 |
37 |
38 |
39 | 40 | 41 |

Index

42 | 43 |
44 | 45 |
46 | 47 | 48 |
49 |
50 |
51 | 77 |
78 |
79 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Larry Smith Jr. 4 | description: Initial host configurations (Bootstrap)...Security, SSH, etc. 5 | #company: your company (optional) 6 | # Some suggested licenses: 7 | # - BSD (default) 8 | # - MIT 9 | # - GPLv2 10 | # - GPLv3 11 | # - Apache 12 | # - CC-BY 13 | license: license (GPLv2, CC-BY, etc) 14 | min_ansible_version: 1.2 15 | # 16 | # Below are all platforms currently available. Just uncomment 17 | # the ones that apply to your role. If you don't see your 18 | # platform on this list, let us know and we'll get it added! 19 | # 20 | platforms: 21 | - name: EL 22 | versions: 23 | # - all 24 | # - 5 25 | - 6 26 | - 7 27 | #- name: GenericUNIX 28 | # versions: 29 | # - all 30 | # - any 31 | #- name: Fedora 32 | # versions: 33 | # - all 34 | # - 16 35 | # - 17 36 | # - 18 37 | # - 19 38 | # - 20 39 | # - 21 40 | # - 22 41 | #- name: Windows 42 | # versions: 43 | # - all 44 | # - 2012R2 45 | #- name: SmartOS 46 | # versions: 47 | # - all 48 | # - any 49 | #- name: opensuse 50 | # versions: 51 | # - all 52 | # - 12.1 53 | # - 12.2 54 | # - 12.3 55 | # - 13.1 56 | # - 13.2 57 | #- name: Amazon 58 | # versions: 59 | # - all 60 | # - 2013.03 61 | # - 2013.09 62 | #- name: GenericBSD 63 | # versions: 64 | # - all 65 | # - any 66 | #- name: FreeBSD 67 | # versions: 68 | # - all 69 | # - 8.0 70 | # - 8.1 71 | # - 8.2 72 | # - 8.3 73 | # - 8.4 74 | # - 9.0 75 | # - 9.1 76 | # - 9.1 77 | # - 9.2 78 | - name: Ubuntu 79 | versions: 80 | # - all 81 | # - lucid 82 | # - maverick 83 | # - natty 84 | # - oneiric 85 | - precise 86 | # - quantal 87 | # - raring 88 | # - saucy 89 | - trusty 90 | # - utopic 91 | # - vivid 92 | #- name: SLES 93 | # versions: 94 | # - all 95 | # - 10SP3 96 | # - 10SP4 97 | # - 11 98 | # - 11SP1 99 | # - 11SP2 100 | # - 11SP3 101 | #- name: GenericLinux 102 | # versions: 103 | # - all 104 | # - any 105 | #- name: Debian 106 | # versions: 107 | # - all 108 | # - etch 109 | # - jessie 110 | # - lenny 111 | # - squeeze 112 | # - wheezy 113 | # 114 | # Below are all categories currently available. Just as with 115 | # the platforms above, uncomment those that apply to your role. 116 | # 117 | categories: 118 | #- cloud 119 | #- cloud:ec2 120 | #- cloud:gce 121 | #- cloud:rax 122 | #- clustering 123 | #- database 124 | #- database:nosql 125 | #- database:sql 126 | #- development 127 | #- monitoring 128 | #- networking 129 | #- packaging 130 | - system 131 | #- web 132 | dependencies: [] 133 | # List your role dependencies here, one per line. Only 134 | # dependencies available via galaxy should be listed here. 135 | # Be sure to remove the '[]' above if you add dependencies 136 | # to this list. 137 | -------------------------------------------------------------------------------- /roles/ansible-quagga/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Larry Smith Jr. 4 | description: Installs Quagga Routing http://www.nongnu.org/quagga/ 5 | #company: your company (optional) 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | # Some suggested licenses: 10 | # - BSD (default) 11 | # - MIT 12 | # - GPLv2 13 | # - GPLv3 14 | # - Apache 15 | # - CC-BY 16 | license: license (GPLv2, CC-BY, etc) 17 | min_ansible_version: 1.2 18 | # 19 | # Below are all platforms currently available. Just uncomment 20 | # the ones that apply to your role. If you don't see your 21 | # platform on this list, let us know and we'll get it added! 22 | # 23 | platforms: 24 | #- name: EL 25 | # versions: 26 | # - all 27 | # - 5 28 | # - 6 29 | # - 7 30 | #- name: GenericUNIX 31 | # versions: 32 | # - all 33 | # - any 34 | #- name: Fedora 35 | # versions: 36 | # - all 37 | # - 16 38 | # - 17 39 | # - 18 40 | # - 19 41 | # - 20 42 | # - 21 43 | # - 22 44 | #- name: Windows 45 | # versions: 46 | # - all 47 | # - 2012R2 48 | #- name: SmartOS 49 | # versions: 50 | # - all 51 | # - any 52 | #- name: opensuse 53 | # versions: 54 | # - all 55 | # - 12.1 56 | # - 12.2 57 | # - 12.3 58 | # - 13.1 59 | # - 13.2 60 | #- name: Amazon 61 | # versions: 62 | # - all 63 | # - 2013.03 64 | # - 2013.09 65 | #- name: GenericBSD 66 | # versions: 67 | # - all 68 | # - any 69 | #- name: FreeBSD 70 | # versions: 71 | # - all 72 | # - 8.0 73 | # - 8.1 74 | # - 8.2 75 | # - 8.3 76 | # - 8.4 77 | # - 9.0 78 | # - 9.1 79 | # - 9.1 80 | # - 9.2 81 | - name: Ubuntu 82 | versions: 83 | # - all 84 | # - lucid 85 | # - maverick 86 | # - natty 87 | # - oneiric 88 | # - precise 89 | # - quantal 90 | # - raring 91 | # - saucy 92 | - trusty 93 | # - utopic 94 | # - vivid 95 | - xenial 96 | #- name: SLES 97 | # versions: 98 | # - all 99 | # - 10SP3 100 | # - 10SP4 101 | # - 11 102 | # - 11SP1 103 | # - 11SP2 104 | # - 11SP3 105 | #- name: GenericLinux 106 | # versions: 107 | # - all 108 | # - any 109 | #- name: Debian 110 | # versions: 111 | # - all 112 | # - etch 113 | # - jessie 114 | # - lenny 115 | # - squeeze 116 | # - wheezy 117 | # 118 | # Below are all categories currently available. Just as with 119 | # the platforms above, uncomment those that apply to your role. 120 | # 121 | categories: 122 | #- cloud 123 | #- cloud:ec2 124 | #- cloud:gce 125 | #- cloud:rax 126 | #- clustering 127 | #- database 128 | #- database:nosql 129 | #- database:sql 130 | #- development 131 | #- monitoring 132 | - networking 133 | #- packaging 134 | - system 135 | #- web 136 | dependencies: [] 137 | # List your role dependencies here, one per line. 138 | # Be sure to remove the '[]' above if you add dependencies 139 | # to this list. 140 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Larry Smith Jr. 4 | description: Configures network interfaces for either static, dhcp or manual. Ability to create VLAN, Bond and Bridge interfaces as well. 5 | #company: your company (optional) 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | # Some suggested licenses: 10 | # - BSD (default) 11 | # - MIT 12 | # - GPLv2 13 | # - GPLv3 14 | # - Apache 15 | # - CC-BY 16 | license: license (GPLv2, CC-BY, etc) 17 | min_ansible_version: 1.2 18 | # 19 | # Below are all platforms currently available. Just uncomment 20 | # the ones that apply to your role. If you don't see your 21 | # platform on this list, let us know and we'll get it added! 22 | # 23 | platforms: 24 | #- name: EL 25 | # versions: 26 | # - all 27 | # - 5 28 | # - 6 29 | # - 7 30 | #- name: GenericUNIX 31 | # versions: 32 | # - all 33 | # - any 34 | #- name: Fedora 35 | # versions: 36 | # - all 37 | # - 16 38 | # - 17 39 | # - 18 40 | # - 19 41 | # - 20 42 | # - 21 43 | # - 22 44 | #- name: Windows 45 | # versions: 46 | # - all 47 | # - 2012R2 48 | #- name: SmartOS 49 | # versions: 50 | # - all 51 | # - any 52 | #- name: opensuse 53 | # versions: 54 | # - all 55 | # - 12.1 56 | # - 12.2 57 | # - 12.3 58 | # - 13.1 59 | # - 13.2 60 | #- name: Amazon 61 | # versions: 62 | # - all 63 | # - 2013.03 64 | # - 2013.09 65 | #- name: GenericBSD 66 | # versions: 67 | # - all 68 | # - any 69 | #- name: FreeBSD 70 | # versions: 71 | # - all 72 | # - 8.0 73 | # - 8.1 74 | # - 8.2 75 | # - 8.3 76 | # - 8.4 77 | # - 9.0 78 | # - 9.1 79 | # - 9.1 80 | # - 9.2 81 | - name: Ubuntu 82 | versions: 83 | # - all 84 | # - lucid 85 | # - maverick 86 | # - natty 87 | # - oneiric 88 | - precise 89 | - quantal 90 | - raring 91 | - saucy 92 | - trusty 93 | - utopic 94 | - vivid 95 | #- name: SLES 96 | # versions: 97 | # - all 98 | # - 10SP3 99 | # - 10SP4 100 | # - 11 101 | # - 11SP1 102 | # - 11SP2 103 | # - 11SP3 104 | #- name: GenericLinux 105 | # versions: 106 | # - all 107 | # - any 108 | #- name: Debian 109 | # versions: 110 | # - all 111 | # - etch 112 | # - jessie 113 | # - lenny 114 | # - squeeze 115 | # - wheezy 116 | # 117 | # Below are all categories currently available. Just as with 118 | # the platforms above, uncomment those that apply to your role. 119 | # 120 | categories: 121 | #- cloud 122 | #- cloud:ec2 123 | #- cloud:gce 124 | #- cloud:rax 125 | #- clustering 126 | #- database 127 | #- database:nosql 128 | #- database:sql 129 | #- development 130 | #- monitoring 131 | - networking 132 | #- packaging 133 | - system 134 | #- web 135 | dependencies: [] 136 | # List your role dependencies here, one per line. 137 | # Be sure to remove the '[]' above if you add dependencies 138 | # to this list. 139 | -------------------------------------------------------------------------------- /roles/ansible-base/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Larry Smith Jr. 4 | description: Common base role for all hosts. Should be ran after mrlesmithjr.bootstrap role. (Configure update dhcp client,update dns servers,configure lvm) 5 | #company: your company (optional) 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | # Some suggested licenses: 10 | # - BSD (default) 11 | # - MIT 12 | # - GPLv2 13 | # - GPLv3 14 | # - Apache 15 | # - CC-BY 16 | license: license (GPLv2, CC-BY, etc) 17 | min_ansible_version: 1.2 18 | # 19 | # Below are all platforms currently available. Just uncomment 20 | # the ones that apply to your role. If you don't see your 21 | # platform on this list, let us know and we'll get it added! 22 | # 23 | platforms: 24 | - name: EL 25 | versions: 26 | # - all 27 | # - 5 28 | # - 6 29 | - 7 30 | #- name: GenericUNIX 31 | # versions: 32 | # - all 33 | # - any 34 | #- name: Fedora 35 | # versions: 36 | # - all 37 | # - 16 38 | # - 17 39 | # - 18 40 | # - 19 41 | # - 20 42 | # - 21 43 | # - 22 44 | #- name: Windows 45 | # versions: 46 | # - all 47 | # - 2012R2 48 | #- name: SmartOS 49 | # versions: 50 | # - all 51 | # - any 52 | #- name: opensuse 53 | # versions: 54 | # - all 55 | # - 12.1 56 | # - 12.2 57 | # - 12.3 58 | # - 13.1 59 | # - 13.2 60 | #- name: Amazon 61 | # versions: 62 | # - all 63 | # - 2013.03 64 | # - 2013.09 65 | #- name: GenericBSD 66 | # versions: 67 | # - all 68 | # - any 69 | #- name: FreeBSD 70 | # versions: 71 | # - all 72 | # - 8.0 73 | # - 8.1 74 | # - 8.2 75 | # - 8.3 76 | # - 8.4 77 | # - 9.0 78 | # - 9.1 79 | # - 9.1 80 | # - 9.2 81 | - name: Ubuntu 82 | versions: 83 | # - all 84 | # - lucid 85 | # - maverick 86 | # - natty 87 | # - oneiric 88 | - precise 89 | # - quantal 90 | # - raring 91 | # - saucy 92 | - trusty 93 | # - utopic 94 | # - vivid 95 | #- name: SLES 96 | # versions: 97 | # - all 98 | # - 10SP3 99 | # - 10SP4 100 | # - 11 101 | # - 11SP1 102 | # - 11SP2 103 | # - 11SP3 104 | #- name: GenericLinux 105 | # versions: 106 | # - all 107 | # - any 108 | #- name: Debian 109 | # versions: 110 | # - all 111 | # - etch 112 | # - jessie 113 | # - lenny 114 | # - squeeze 115 | # - wheezy 116 | # 117 | # Below are all categories currently available. Just as with 118 | # the platforms above, uncomment those that apply to your role. 119 | # 120 | categories: 121 | #- cloud 122 | #- cloud:ec2 123 | #- cloud:gce 124 | #- cloud:rax 125 | #- clustering 126 | #- database 127 | #- database:nosql 128 | #- database:sql 129 | #- development 130 | #- monitoring 131 | - networking 132 | #- packaging 133 | - system 134 | #- web 135 | dependencies: [] 136 | # List your role dependencies here, one per line. 137 | # Be sure to remove the '[]' above if you add dependencies 138 | # to this list. 139 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Search — ansible-bootstrap 1.0 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 |
44 |
45 |
46 | 47 |

Search

48 |
49 | 50 |

51 | Please activate JavaScript to enable the search 52 | functionality. 53 |

54 |
55 |

56 | From here you can search these documents. Enter your search 57 | words into the box below and click "search". Note that the search 58 | function will automatically search for all of the words. Pages 59 | containing fewer words won't appear in the result list. 60 |

61 |
62 | 63 | 64 | 65 |
66 | 67 |
68 | 69 |
70 | 71 |
72 |
73 |
74 | 84 |
85 |
86 | 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /group_vars/quagga-routers/quagga.yml: -------------------------------------------------------------------------------- 1 | --- 2 | quagga_bgp_router_configs: 3 | - name: 'node0' 4 | local_as: '64512' 5 | neighbors: 6 | - neighbor: '192.168.1.11' 7 | description: 'node1' 8 | remote_as: '64512' 9 | prefix_lists: # Define specific BGP neighbore prefix lists 10 | - name: 'FILTER01-out' # Define name of filter 11 | direction: 'out' # define direction (in|out) 12 | orf: 'send' # Define outbound route filter (send|receive|both) 13 | - neighbor: '192.168.2.12' 14 | description: 'node2' 15 | prefix_lists: 16 | - name: 'FILTER02-in' 17 | direction: 'in' 18 | orf: 'receive' 19 | remote_as: '64513' 20 | - neighbor: '192.168.3.13' 21 | description: 'node3' 22 | remote_as: '64514' 23 | network_advertisements: #networks to advertise 24 | - '10.0.0.10/32' 25 | - '192.168.1.0/24' 26 | - '192.168.2.0/24' 27 | - '192.168.3.0/24' 28 | router_id: '10.0.0.10' 29 | prefix_lists: 30 | - name: 'FILTER01-out' 31 | action: 'permit' 32 | network: '10.0.0.10/32' 33 | sequence: '10' 34 | - name: 'FILTER01-out' 35 | action: 'permit' 36 | network: '192.168.1.0/24' 37 | sequence: '20' 38 | - name: 'FILTER01-out' 39 | action: 'permit' 40 | network: '192.168.2.0/24' 41 | sequence: '30' 42 | - name: 'FILTER01-out' 43 | action: 'deny' 44 | network: 'any' 45 | sequence: '40' 46 | - name: 'node1' 47 | local_as: '64512' 48 | neighbors: 49 | - neighbor: '192.168.1.10' # Peering with loopback address for iBGP 50 | description: 'node0' 51 | remote_as: '64512' 52 | prefix_lists: 53 | - name: 'FILTER01-in' 54 | direction: 'in' 55 | orf: 'receive' 56 | network_advertisements: #networks to advertise 57 | - '10.1.1.11/32' 58 | - '192.168.1.0/24' 59 | router_id: '10.1.1.11' 60 | - name: 'node2' 61 | local_as: '64513' 62 | neighbors: 63 | - neighbor: '192.168.2.10' 64 | description: 'node0' 65 | prefix_lists: 66 | - name: 'FILTER02-out' 67 | direction: 'out' 68 | orf: 'send' 69 | remote_as: '64512' 70 | network_advertisements: #networks to advertise 71 | # - '10.2.2.12/32' 72 | - '192.168.2.0/24' 73 | prefix_lists: 74 | - name: 'FILTER02-out' 75 | action: 'permit' 76 | network: '192.168.2.0/24' 77 | sequence: '10' 78 | - name: 'FILTER01-out' 79 | action: 'deny' 80 | network: 'any' 81 | sequence: '20' 82 | router_id: '10.2.2.12' 83 | - name: 'node3' 84 | local_as: '64514' 85 | neighbors: 86 | - neighbor: '192.168.3.10' 87 | description: 'node0' 88 | remote_as: '64512' 89 | network_advertisements: #networks to advertise 90 | - '10.3.3.13/32' 91 | - '192.168.3.0/24' 92 | router_id: '10.3.3.13' 93 | quagga_config_bgpd: false #defines if quagga bgpd should be configured based on quagga_bgp_router_configs...makes it easy to disable auto routing in order to define your routes manually 94 | quagga_config_interfaces: true 95 | quagga_config_ospfd: false #defines if quagga ospfd should be configured based on quagga_ospf_ vars...makes it easy to disable auto routing in order to define your routes manually 96 | quagga_config: true 97 | quagga_enable_bgpd: false 98 | quagga_enable_ospfd: false 99 | -------------------------------------------------------------------------------- /roles/ansible-quagga/templates/opt/scripts/primary-backup.sh.j2: -------------------------------------------------------------------------------- 1 | # {{ ansible_managed }} 2 | 3 | #!/bin/sh 4 | # 5 | # (C) 2006-2011 by Pablo Neira Ayuso 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Description: 13 | # 14 | # This is the script for primary-backup setups for keepalived 15 | # (http://www.keepalived.org). You may adapt it to make it work with other 16 | # high-availability managers. 17 | # 18 | # Do not forget to include the required modifications to your keepalived.conf 19 | # file to invoke this script during keepalived's state transitions. 20 | # 21 | # Contributions to improve this script are welcome :). 22 | # 23 | 24 | CONNTRACKD_BIN=/usr/sbin/conntrackd 25 | CONNTRACKD_LOCK=/var/lock/conntrack.lock 26 | CONNTRACKD_CONFIG=/etc/conntrackd/conntrackd.conf 27 | 28 | case "$1" in 29 | primary) 30 | # 31 | # commit the external cache into the kernel table 32 | # 33 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -c 34 | if [ $? -eq 1 ] 35 | then 36 | logger "ERROR: failed to invoke conntrackd -c" 37 | fi 38 | 39 | # 40 | # flush the internal and the external caches 41 | # 42 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -f 43 | if [ $? -eq 1 ] 44 | then 45 | logger "ERROR: failed to invoke conntrackd -f" 46 | fi 47 | 48 | # 49 | # resynchronize my internal cache to the kernel table 50 | # 51 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -R 52 | if [ $? -eq 1 ] 53 | then 54 | logger "ERROR: failed to invoke conntrackd -R" 55 | fi 56 | 57 | # 58 | # send a bulk update to backups 59 | # 60 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -B 61 | if [ $? -eq 1 ] 62 | then 63 | logger "ERROR: failed to invoke conntrackd -B" 64 | fi 65 | ;; 66 | backup) 67 | # 68 | # is conntrackd running? request some statistics to check it 69 | # 70 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -s 71 | if [ $? -eq 1 ] 72 | then 73 | # 74 | # something's wrong, do we have a lock file? 75 | # 76 | if [ -f $CONNTRACKD_LOCK ] 77 | then 78 | logger "WARNING: conntrackd was not cleanly stopped." 79 | logger "If you suspect that it has crashed:" 80 | logger "1) Enable coredumps" 81 | logger "2) Try to reproduce the problem" 82 | logger "3) Post the coredump to netfilter-devel@vger.kernel.org" 83 | rm -f $CONNTRACKD_LOCK 84 | fi 85 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -d 86 | if [ $? -eq 1 ] 87 | then 88 | logger "ERROR: cannot launch conntrackd" 89 | exit 1 90 | fi 91 | fi 92 | # 93 | # shorten kernel conntrack timers to remove the zombie entries. 94 | # 95 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -t 96 | if [ $? -eq 1 ] 97 | then 98 | logger "ERROR: failed to invoke conntrackd -t" 99 | fi 100 | 101 | # 102 | # request resynchronization with master firewall replica (if any) 103 | # Note: this does nothing in the alarm approach. 104 | # 105 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -n 106 | if [ $? -eq 1 ] 107 | then 108 | logger "ERROR: failed to invoke conntrackd -n" 109 | fi 110 | ;; 111 | fault) 112 | # 113 | # shorten kernel conntrack timers to remove the zombie entries. 114 | # 115 | $CONNTRACKD_BIN -C $CONNTRACKD_CONFIG -t 116 | if [ $? -eq 1 ] 117 | then 118 | logger "ERROR: failed to invoke conntrackd -t" 119 | fi 120 | ;; 121 | *) 122 | logger "ERROR: unknown state transition" 123 | echo "Usage: primary-backup.sh {primary|backup|fault}" 124 | exit 1 125 | ;; 126 | esac 127 | 128 | exit 0 129 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ 8 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 9 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 10 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ 11 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 12 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 14 | .highlight .ge { font-style: italic } /* Generic.Emph */ 15 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 16 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 17 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 18 | .highlight .go { color: #333333 } /* Generic.Output */ 19 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 20 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 21 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 22 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 23 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 24 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 25 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 26 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 27 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 28 | .highlight .kt { color: #902000 } /* Keyword.Type */ 29 | .highlight .m { color: #208050 } /* Literal.Number */ 30 | .highlight .s { color: #4070a0 } /* Literal.String */ 31 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 32 | .highlight .nb { color: #007020 } /* Name.Builtin */ 33 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 34 | .highlight .no { color: #60add5 } /* Name.Constant */ 35 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 36 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 37 | .highlight .ne { color: #007020 } /* Name.Exception */ 38 | .highlight .nf { color: #06287e } /* Name.Function */ 39 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 40 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 41 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 42 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 43 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 44 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 45 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 46 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 47 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 48 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 49 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 50 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 51 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 52 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 53 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 54 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 55 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 56 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 57 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 58 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 59 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 60 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 61 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 62 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 63 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 64 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 65 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Welcome to ansible-bootstrap’s documentation! — ansible-bootstrap 1.0 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 |
37 |
38 | 39 |
40 |

Welcome to ansible-bootstrap’s documentation!

41 |

Contents:

42 |
43 |
    44 |
45 |
46 |
47 |
48 |

Indices and tables

49 | 54 |
55 | 56 | 57 |
58 |
59 |
60 | 96 |
97 |
98 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/templates/etc/network/interfaces.j2: -------------------------------------------------------------------------------- 1 | # {{ ansible_managed }} 2 | # Any changes made here will be lost 3 | 4 | auto lo 5 | iface lo inet loopback 6 | 7 | {% if config_network_interfaces is defined and config_network_interfaces %} 8 | ########## Network Interfaces 9 | {% for item in network_interfaces %} 10 | {% if item.configure is defined and item.configure %} 11 | {% if item.comment is defined and item.comment != None %} 12 | # {{ item.comment }} 13 | {% endif %} 14 | {% if item.method == "static" or item.method == "manual" %} 15 | auto {{ item.name }} 16 | iface {{ item.name }} inet {{ item.method }} 17 | {% if item.address is defined and item.address != None %} 18 | address {{ item.address }} 19 | {% endif %} 20 | {% if item.netmask is defined and item.netmask != None %} 21 | netmask {{ item.netmask }} 22 | {% endif %} 23 | {% if item.gateway is defined and item.gateway != None %} 24 | gateway {{ item.gateway }} 25 | {% endif %} 26 | {% endif %} 27 | {% if item.method == "dhcp" %} 28 | auto {{ item.name }} 29 | iface {{ item.name }} inet {{ item.method }} 30 | {% endif %} 31 | {% if item.wireless_network is defined and item.wireless_network %} 32 | wpa-ssid {{ item.wpa_ssid }} 33 | wpa-psk {{ item.wpa_psk }} 34 | {% endif %} 35 | {% if item.addl_settings is defined and item.addl_settings != None %} 36 | {% for setting in item.addl_settings %} 37 | {{ setting }} 38 | {% endfor %} 39 | {% endif %} 40 | {% endif %} 41 | 42 | {% endfor %} 43 | ########## End of Network Interfaces 44 | {% endif %} 45 | 46 | {% if config_network_bonds is defined and config_network_bonds %} 47 | ########## Network Bonds 48 | {% for item in network_bonds %} 49 | {% if item.configure is defined and item.configure %} 50 | {% if item.comment is defined and item.comment != None %} 51 | # {{ item.comment }} 52 | {% endif %} 53 | auto {{ item.name }} 54 | iface {{ item.name }} inet {{ item.method }} 55 | {% if item.slaves is defined and item.slaves != None %} 56 | bond_slaves {{ item.slaves|join (' ') }} 57 | {% endif %} 58 | {% if item.primary is defined and item.primary != None %} 59 | bond_primary {{ item.primary }} 60 | {% endif %} 61 | {% if item.addl_settings is defined and item.addl_settings != None %} 62 | {% for setting in item.addl_settings %} 63 | {{ setting }} 64 | {% endfor %} 65 | {% endif %} 66 | {% endif %} 67 | 68 | {% endfor %} 69 | ########## End of Network Bonds 70 | {% endif %} 71 | 72 | {% if config_network_vlans is defined and config_network_vlans %} 73 | ########## Network VLANS 74 | {% for item in network_vlans %} 75 | {% if item.configure is defined and item.configure %} 76 | {% if item.comment is defined %} 77 | # {{ item.comment }} 78 | {% endif %} 79 | {% if item.method == "static" or item.method == "manual" %} 80 | auto {{ item.name }} 81 | iface {{ item.name }} inet {{ item.method }} 82 | {% if item.address is defined and item.address != None %} 83 | address {{ item.address }} 84 | {% endif %} 85 | {% if item.netmask is defined and item.netmask != None %} 86 | netmask {{ item.netmask }} 87 | {% endif %} 88 | {% if item.gateway is defined and item.gateway != None %} 89 | gateway {{ item.gateway }} 90 | {% endif %} 91 | {% endif %} 92 | {% if item.method == "dhcp" %} 93 | auto {{ item.name }} 94 | iface {{ item.name }} inet {{ item.method }} 95 | {% endif %} 96 | {% if item.addl_settings is defined and item.addl_settings != None %} 97 | {% for setting in item.addl_settings %} 98 | {{ setting }} 99 | {% endfor %} 100 | {% endif %} 101 | vlan_raw_device {{ item.vlan_device }} 102 | {% endif %} 103 | 104 | {% endfor %} 105 | ########## End of Network VLANS 106 | {% endif %} 107 | 108 | {% if config_network_bridges is defined and config_network_bridges %} 109 | ########## Network Bridges 110 | {% for item in network_bridges %} 111 | {% if item.configure is defined and item.configure %} 112 | {% if item.comment is defined %} 113 | # {{ item.comment }} 114 | {% endif %} 115 | {% if item.method == "static" or item.method == "manual" %} 116 | auto {{ item.name }} 117 | iface {{ item.name }} inet {{ item.method }} 118 | {% if item.address is defined and item.address != None %} 119 | address {{ item.address }} 120 | {% endif %} 121 | {% if item.netmask is defined and item.netmask != None %} 122 | netmask {{ item.netmask }} 123 | {% endif %} 124 | {% if item.gateway is defined and item.gateway != None %} 125 | gateway {{ item.gateway }} 126 | {% endif %} 127 | {% endif %} 128 | {% if item.method == "dhcp" %} 129 | auto {{ item.name }} 130 | iface {{ item.name }} inet {{ item.method }} 131 | {% endif %} 132 | {% if item.addl_settings is defined and item.addl_settings != None %} 133 | {% for setting in item.addl_settings %} 134 | {{ setting }} 135 | {% endfor %} 136 | {% endif %} 137 | bridge_ports {{ item.ports }} 138 | {% endif %} 139 | 140 | {% endfor %} 141 | ########## End of Network Bridges 142 | {% endif %} 143 | 144 | {% if dns_nameservers is defined %} 145 | dns-nameservers {{ dns_nameservers|join (' ') }} 146 | {% endif %} 147 | {% if dns_search is defined %} 148 | dns-search {{ dns_search }} 149 | {% endif %} 150 | -------------------------------------------------------------------------------- /bootstrap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | remote_user: vagrant 4 | become: true 5 | vars: 6 | host_vars_directory: './host_vars/{{ inventory_hostname }}' 7 | host_vars_file: '{{ host_vars_directory }}/{{ inventory_hostname }}.yml' 8 | pri_domain_name: 'vagrant.local' 9 | ssh_key_path: '.vagrant/machines/{{ inventory_hostname }}/virtualbox/private_key' 10 | update_host_vars: true 11 | roles: 12 | tasks: 13 | - name: updating apt cache (Debian) 14 | apt: 15 | update_cache: yes 16 | cache_valid_time: 3600 17 | when: ansible_os_family == "Debian" 18 | 19 | - name: installing ansible pre-reqs (Debian) 20 | apt: 21 | name: "{{ item }}" 22 | state: present 23 | with_items: 24 | - build-essential 25 | - libffi-dev 26 | - libssl-dev 27 | - python-dev 28 | - python-setuptools 29 | when: > 30 | ansible_os_family == "Debian" 31 | 32 | - name: installing epel repo (RedHat) 33 | yum: 34 | name: "epel-release" 35 | state: present 36 | when: > 37 | ansible_os_family == "RedHat" and 38 | ansible_distribution != "Fedora" 39 | 40 | - name: installing ansible pre-reqs (RedHat) 41 | yum: 42 | name: "{{ item }}" 43 | state: present 44 | with_items: 45 | - libffi-devel 46 | - openssl-devel 47 | - python-crypto 48 | - python-devel 49 | - python-setuptools 50 | when: > 51 | ansible_os_family == "RedHat" and 52 | ansible_distribution != "Fedora" 53 | 54 | - name: installing ansible pre-reqs (Fedora) 55 | dnf: 56 | name: "{{ item }}" 57 | state: present 58 | with_items: 59 | - gmp-devel 60 | - libffi-devel 61 | - openssl-devel 62 | - python-crypto 63 | - python-devel 64 | - python-dnf 65 | - python-setuptools 66 | - redhat-rpm-config 67 | when: > 68 | ansible_os_family == "RedHat" and 69 | ansible_distribution == "Fedora" 70 | 71 | - name: installing ansible pre-reqs (openSUSE) 72 | zypper: 73 | name: "{{ item }}" 74 | state: present 75 | with_items: 76 | - gmp-devel 77 | - libffi-devel 78 | - openssl-devel 79 | - python-crypto 80 | - python-devel 81 | - python-setuptools 82 | when: > 83 | ansible_os_family == "openSUSE Leap" 84 | 85 | - name: installing python pip 86 | easy_install: 87 | name: "pip" 88 | state: present 89 | 90 | - name: installing ansible 91 | pip: 92 | name: "ansible" 93 | state: present 94 | version: 1.9.6 95 | 96 | - name: ensuring host_vars directory exists 97 | file: 98 | path: "{{ item }}" 99 | state: "directory" 100 | delegate_to: "localhost" 101 | # run_once: true 102 | become: false 103 | with_items: 104 | - '{{ host_vars_directory }}' 105 | when: > 106 | update_host_vars is defined and 107 | update_host_vars 108 | 109 | - name: ensuring host file exists in host_vars 110 | stat: 111 | path: "{{ host_vars_file }}" 112 | delegate_to: localhost 113 | register: host_var 114 | become: false 115 | when: > 116 | update_host_vars is defined and 117 | update_host_vars 118 | 119 | - name: creating missing host_vars 120 | file: 121 | path: "{{ host_vars_file }}" 122 | state: touch 123 | delegate_to: localhost 124 | become: false 125 | when: not host_var.stat.exists 126 | 127 | - name: updating ansible_ssh_port 128 | lineinfile: 129 | dest: "{{ host_vars_file }}" 130 | regexp: "^ansible_ssh_port{{ ':' }}" 131 | line: "ansible_ssh_port{{ ':' }} 22" 132 | delegate_to: localhost 133 | become: false 134 | when: > 135 | (update_host_vars is defined and 136 | update_host_vars) and 137 | (ansible_eth1 is defined or 138 | ansible_enp0s8 is defined) 139 | 140 | - name: updating ansible_ssh_host 141 | lineinfile: 142 | dest: "{{ host_vars_file }}" 143 | regexp: "^ansible_ssh_host{{ ':' }}" 144 | line: "ansible_ssh_host{{ ':' }} {{ ansible_eth1.ipv4.address }}" 145 | delegate_to: localhost 146 | become: false 147 | when: > 148 | (update_host_vars is defined and 149 | update_host_vars) and 150 | ansible_eth1 is defined 151 | 152 | - name: updating ansible_ssh_host 153 | lineinfile: 154 | dest: "{{ host_vars_file }}" 155 | regexp: "^ansible_ssh_host{{ ':' }}" 156 | line: "ansible_ssh_host{{ ':' }} {{ ansible_enp0s8.ipv4.address }}" 157 | delegate_to: localhost 158 | become: false 159 | when: > 160 | (update_host_vars is defined and 161 | update_host_vars) and 162 | ansible_enp0s8 is defined 163 | 164 | - name: updating ansible_ssh_key 165 | lineinfile: 166 | dest: "{{ host_vars_file }}" 167 | regexp: "^ansible_ssh_private_key_file{{ ':' }}" 168 | line: "ansible_ssh_private_key_file{{ ':' }} {{ ssh_key_path }}" 169 | delegate_to: localhost 170 | become: false 171 | when: > 172 | update_host_vars is defined and 173 | update_host_vars 174 | 175 | - name: ensuring host_vars is yaml formatted 176 | lineinfile: 177 | dest: "{{ host_vars_file }}" 178 | regexp: "---" 179 | line: "---" 180 | insertbefore: BOF 181 | delegate_to: localhost 182 | become: false 183 | when: > 184 | update_host_vars is defined and 185 | update_host_vars 186 | -------------------------------------------------------------------------------- /roles/ansible-quagga/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for ansible-quagga 3 | quagga_bgp_router_configs: [] # Define BGP configurations for all router nodes 4 | # - name: 'node0' 5 | # local_as: '64512' 6 | # neighbors: 7 | # - neighbor: '192.168.1.11' 8 | # description: 'node1' 9 | # remote_as: '64512' 10 | # prefix_lists: # Define specific BGP neighbore prefix lists 11 | # - name: 'FILTER01-out' # Define name of filter 12 | # direction: 'out' # define direction (in|out) 13 | # orf: 'send' # Define outbound route filter (send|receive|both) 14 | # - neighbor: '192.168.2.12' 15 | # description: 'node2' 16 | # prefix_lists: 17 | # - name: 'FILTER02-in' 18 | # direction: 'in' 19 | # orf: 'receive' 20 | # remote_as: '64513' 21 | # - neighbor: '192.168.3.13' 22 | # description: 'node3' 23 | # remote_as: '64514' 24 | # network_advertisements: #networks to advertise 25 | # - '10.0.0.10/32' 26 | # - '192.168.1.0/24' 27 | # - '192.168.2.0/24' 28 | # - '192.168.3.0/24' 29 | # router_id: '10.0.0.10' 30 | # prefix_lists: 31 | # - name: 'FILTER01-out' 32 | # action: 'permit' 33 | # network: '10.0.0.10/32' 34 | # sequence: '10' 35 | # - name: 'FILTER01-out' 36 | # action: 'permit' 37 | # network: '192.168.1.0/24' 38 | # sequence: '20' 39 | # - name: 'FILTER01-out' 40 | # action: 'permit' 41 | # network: '192.168.2.0/24' 42 | # sequence: '30' 43 | # - name: 'FILTER01-out' 44 | # action: 'deny' 45 | # network: 'any' 46 | # sequence: '40' 47 | # - name: 'node1' 48 | # local_as: '64512' 49 | # neighbors: 50 | # - neighbor: '192.168.1.10' # Peering with loopback address for iBGP 51 | # description: 'node0' 52 | # remote_as: '64512' 53 | # prefix_lists: 54 | # - name: 'FILTER01-in' 55 | # direction: 'in' 56 | # orf: 'receive' 57 | # network_advertisements: #networks to advertise 58 | # - '10.1.1.11/32' 59 | # - '192.168.1.0/24' 60 | # router_id: '10.1.1.11' 61 | # - name: 'node2' 62 | # local_as: '64513' 63 | # neighbors: 64 | # - neighbor: '192.168.2.10' 65 | # description: 'node0' 66 | # prefix_lists: 67 | # - name: 'FILTER02-out' 68 | # direction: 'out' 69 | # orf: 'send' 70 | # remote_as: '64512' 71 | # network_advertisements: #networks to advertise 72 | # # - '10.2.2.12/32' 73 | # - '192.168.2.0/24' 74 | # prefix_lists: 75 | # - name: 'FILTER02-out' 76 | # action: 'permit' 77 | # network: '192.168.2.0/24' 78 | # sequence: '10' 79 | # - name: 'FILTER01-out' 80 | # action: 'deny' 81 | # network: 'any' 82 | # sequence: '20' 83 | # router_id: '10.2.2.12' 84 | # - name: 'node3' 85 | # local_as: '64514' 86 | # neighbors: 87 | # - neighbor: '192.168.3.10' 88 | # description: 'node0' 89 | # remote_as: '64512' 90 | # network_advertisements: #networks to advertise 91 | # - '10.3.3.13/32' 92 | # - '192.168.3.0/24' 93 | # router_id: '10.3.3.13' 94 | quagga_bgp_routerid: '{{ ansible_default_ipv4.address }}' 95 | quagga_config: false 96 | #defines if quagga bgpd should be configured based on quagga_bgp_router_configs 97 | #makes it easy to disable auto routing in order to define your routes manually 98 | quagga_config_bgpd: false 99 | quagga_config_interfaces: false 100 | #defines if quagga ospfd should be configured based on quagga_ospf_ vars... 101 | #makes it easy to disable auto routing in order to define your routes manually 102 | quagga_config_ospfd: false 103 | quagga_configs: 104 | - 'daemons' 105 | - 'debian.conf' 106 | - 'vtysh.conf' 107 | - 'zebra.conf' 108 | quagga_hostname: '{{ ansible_hostname }}' 109 | quagga_enable_bgpd: false 110 | quagga_enable_ospfd: false 111 | quagga_enable_password: 'quagga' #define here or in group_vars/group 112 | 113 | # Define interfaces to configure if desired 114 | quagga_interfaces: [] 115 | # - int: 'eth0' 116 | # method: 'static' 117 | # address: '10.1.1.10' 118 | # gateway: '10.1.1.1' 119 | # addl_settings: 120 | # - 'bond_master bond0' 121 | 122 | # Define addresses to assign on loopback interface...Can be multiple as well 123 | # We are defining these as sub-interfaces on the loopback adapter lo 124 | quagga_interfaces_lo: [] 125 | # - int: "lo{{ ':' }}0" 126 | # address: '10.0.0.10/32' 127 | # method: 'static' 128 | # configure: true 129 | # # - int: "lo{{ ':' }}1" 130 | # # address: '10.0.0.11/32' 131 | # # method: 'static' 132 | # # configure: false 133 | # # - int: "lo{{ ':' }}2" 134 | # # address: '10.0.0.12/32' 135 | # # method: 'static' 136 | # # configure: false 137 | 138 | quagga_no_passive_int: [] # Define any interfaces to not advertise routes on 139 | # - 'eth0' 140 | # - 'eth1' 141 | quagga_ospf_area: '51' #defines the desired area mapping for OSPF routing with upstream OSPF routers 142 | quagga_ospf_area_config: [] 143 | # - network: '192.168.1.0/24' 144 | # area: '{{ quagga_ospf_area }}' 145 | # - network: '192.168.2.0/24' 146 | # area: '{{ quagga_ospf_area }}' 147 | # - network: '192.168.3.0/24' 148 | # area: '{{ quagga_ospf_area }}' 149 | quagga_ospf_redistribute: 150 | - 'connected' 151 | # - 'kernel' 152 | # - 'static' 153 | # - 'isis' 154 | # - 'rip' 155 | quagga_ospf_routerid: '{{ ansible_default_ipv4.address }}' #defines the router id IP address for OSPF 156 | quagga_passive_int: [] 157 | quagga_password: 'quagga' #define in group_vars/all/accounts 158 | quagga_root_dir: '/etc/quagga' 159 | quagga_sysctl_network_settings: 160 | - name: 'net.ipv4.ip_forward' 161 | value: '1' 162 | - name: 'net.ipv4.conf.all.forwarding' 163 | value: '1' 164 | - name: 'net.ipv4.conf.default.forwarding' 165 | value: '1' 166 | - name: 'net.ipv4.tcp_tw_reuse' 167 | value: '1' 168 | - name: 'net.ipv4.ip_local_port_range' 169 | value: '1024 65023' 170 | - name: 'net.ipv4.tcp_max_syn_backlog' 171 | value: '40000' 172 | - name: 'net.ipv4.tcp_max_tw_buckets' 173 | value: '400000' 174 | - name: 'net.ipv4.tcp_max_orphans' 175 | value: '60000' 176 | - name: 'net.ipv4.tcp_syncookies' 177 | value: '1' 178 | - name: 'net.ipv4.tcp_synack_retries' 179 | value: '3' 180 | - name: 'net.core.somaxconn' 181 | value: '40000' 182 | - name: 'net.ipv4.tcp_fin_timeout' 183 | value: '5' 184 | quagga_user: 'quagga' 185 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for ansible-config-interfaces 3 | config_network_bonds: false #defines if kvm_network_bonds should be configured as defined...define in host_vars/host 4 | config_network_bridges: false #defines if kvm_network_bridges should be configured as defined...define in host_vars/host 5 | config_network_interfaces: false #defines if kvm_network_interfaces should be configured as defined...define in host_vars/host 6 | config_network_vlans: false #defines if kvm_network_vlans should be configured as defined...define in host_vars/host 7 | dns_nameservers: #defines all dns servers to configure...define here or globally in group_vars/all 8 | - '8.8.8.8' 9 | - '8.8.4.4' 10 | dns_search: '{{ pri_domain_name }}' #defines your global dns suffix search...define here or globally in group_vars/all 11 | enable_configured_interfaces_after_defining: false #defines if interfaces, bonds, bridges and vlans should be brought up after defining. 12 | kvm_mgmt_ip: '0.0.0.0' #defines management IP for var on network_bridges....This is for demo purposes only 13 | kvm_mgmt_gateway: '0.0.0.0' #defines management gateway for var on network_bridges....This is for demo purposes only 14 | kvm_nfs1_ip: '0.0.0.0' #defines IP address to define on Storage interface.....This is for demo purposes only 15 | network_bonds: #define network bonds and settings if desired (Define separately for each node in host_vars) - https://help.ubuntu.com/community/UbuntuBonding 16 | - name: 'bond0' 17 | configure: true 18 | comment: 'Management Networks' 19 | method: 'manual' 20 | slaves: 21 | - 'eth0' 22 | - 'eth1' 23 | primary: 'eth0' 24 | addl_settings: 25 | # - 'bond_mode balance-alb' 26 | - 'bond_miimon 100' 27 | - name: 'bond1' 28 | configure: true 29 | comment: 'Storage Networks' 30 | method: 'manual' 31 | slaves: 32 | - 'eth3' 33 | - 'eth4' 34 | primary: 'eth3' 35 | addl_settings: 36 | # - 'bond_mode balance-alb' 37 | - 'bond_miimon 100' 38 | - name: 'bond2' 39 | configure: true 40 | comment: 'VM Traffic Networks' 41 | method: 'manual' 42 | slaves: 43 | - 'eth2' 44 | - 'eth5' 45 | primary: 'eth2' 46 | addl_settings: 47 | - 'bond_mode balance-alb' 48 | - 'bond_miimon 100' 49 | network_bridges: #define network bridges and settings if desired (Define separately for each node in host_vars) - https://help.ubuntu.com/community/NetworkConnectionBridge 50 | - name: 'br0' 51 | configure: true 52 | comment: 'Management - VLAN106' 53 | method: 'static' 54 | address: '{{ kvm_mgmt_ip }}' 55 | netmask: '255.255.255.0' 56 | netmask_cidr: '24' 57 | gateway: '{{ kvm_mgmt_gateway }}' 58 | ports: 'bond0.106' 59 | addl_settings: 60 | - 'up route add default gw {{ kvm_mgmt_gateway }}' 61 | - 'bridge_stp off' 62 | - 'bridge_fd 0' 63 | - name: 'br1' 64 | configure: true 65 | comment: 'NFS-1 - VLAN127' 66 | method: 'static' 67 | address: '{{ kvm_nfs1_ip }}' 68 | netmask: '255.255.255.0' 69 | netmask_cidr: '24' 70 | gateway: 71 | ports: 'bond1.127' 72 | addl_settings: 73 | - 'bridge_stp off' 74 | - 'bridge_fd 0' 75 | - name: 'vmbr100' 76 | configure: true 77 | comment: 'Orange-DMZ - Virtual Networking' 78 | method: 'manual' 79 | address: 80 | netmask: 81 | netmask_cidr: 82 | gateway: 83 | ports: 'bond2.100' 84 | addl_settings: 85 | - 'bridge_stp off' 86 | - 'bridge_fd 0' 87 | - name: 'vmbr101' 88 | configure: true 89 | comment: 'Green-Servers - Virtual Networking' 90 | method: 'manual' 91 | address: 92 | netmask: 93 | netmask_cidr: 94 | gateway: 95 | ports: 'bond2.101' 96 | addl_settings: 97 | - 'bridge_stp off' 98 | - 'bridge_fd 0' 99 | network_interfaces: #define interfaces and settings. (Define separately for each node in host_vars) - Anything not defined can be added to addl_settings. 100 | - name: 'eth0' 101 | configure: true 102 | comment: 103 | method: 'manual' 104 | address: 105 | netmask: 106 | netmask_cidr: 107 | gateway: 108 | # wireless_network: false #defines if the interface is a wireless interface...not working so keep false or not defined 109 | # wpa_ssid: wireless #defines the wireless SSID to connect to 110 | # wpa_psk: wpapassword #defines the wireless key 111 | addl_settings: 112 | - 'bond_master bond0' 113 | - name: 'eth1' 114 | configure: true 115 | comment: 116 | method: 'manual' 117 | address: 118 | netmask: 119 | netmask_cidr: 120 | gateway: 121 | addl_settings: 122 | - 'bond_master bond0' 123 | - name: 'eth2' 124 | configure: true 125 | comment: 126 | method: 'manual' 127 | address: 128 | netmask: 129 | netmask_cidr: 130 | gateway: 131 | addl_settings: 132 | - 'bond_master bond2' 133 | - name: 'eth3' 134 | configure: true 135 | comment: 136 | method: 'manual' 137 | address: 138 | netmask: 139 | netmask_cidr: 140 | gateway: 141 | addl_settings: 142 | - 'bond_master bond1' 143 | - name: 'eth4' 144 | configure: true 145 | comment: 146 | method: 'manual' 147 | address: 148 | netmask: 149 | netmask_cidr: 150 | gateway: 151 | addl_settings: 152 | - 'bond_master bond1' 153 | - name: 'eth5' 154 | configure: true 155 | comment: 156 | method: 'manual' 157 | address: 158 | netmask: 159 | netmask_cidr: 160 | gateway: 161 | addl_settings: 162 | - 'bond_master bond2' 163 | network_vlans: #define vlans and settings if desired. (Define separately for each node in host_vars) 164 | - name: 'bond2.100' 165 | configure: true 166 | comment: 'Orange-DMZ' 167 | method: 'manual' 168 | address: 169 | netmask: 170 | netmask_cidr: 171 | gateway: 172 | vlan_device: 'bond2' 173 | addl_settings: 174 | - name: 'bond2.101' 175 | configure: true 176 | comment: 'Green-Servers' 177 | method: 'manual' 178 | address: 179 | netmask: 180 | netmask_cidr: 181 | gateway: 182 | vlan_device: 'bond2' 183 | addl_settings: 184 | - name: 'bond0.106' 185 | configure: true 186 | comment: 'Management' 187 | method: 'manual' 188 | address: 189 | netmask: 190 | netmask_cidr: 191 | gateway: 192 | vlan_device: 'bond0' 193 | addl_settings: 194 | - name: 'bond1.127' 195 | configure: true 196 | comment: 'NFS-1' 197 | method: 'manual' 198 | address: 199 | netmask: 200 | netmask_cidr: 201 | gateway: 202 | vlan_device: 'bond1' 203 | addl_settings: 204 | pri_domain_name: 'example.org' 205 | -------------------------------------------------------------------------------- /roles/ansible-quagga/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | An [Ansible] role to install [Quagga] 5 | 6 | Requirements 7 | ------------ 8 | 9 | None 10 | 11 | Role Variables 12 | -------------- 13 | 14 | ``` 15 | --- 16 | # defaults file for ansible-quagga 17 | quagga_bgp_router_configs: [] # Define BGP configurations for all router nodes 18 | # - name: 'node0' 19 | # local_as: '64512' 20 | # neighbors: 21 | # - neighbor: '192.168.1.11' 22 | # description: 'node1' 23 | # remote_as: '64512' 24 | # prefix_lists: # Define specific BGP neighbore prefix lists 25 | # - name: 'FILTER01-out' # Define name of filter 26 | # direction: 'out' # define direction (in|out) 27 | # orf: 'send' # Define outbound route filter (send|receive|both) 28 | # - neighbor: '192.168.2.12' 29 | # description: 'node2' 30 | # prefix_lists: 31 | # - name: 'FILTER02-in' 32 | # direction: 'in' 33 | # orf: 'receive' 34 | # remote_as: '64513' 35 | # - neighbor: '192.168.3.13' 36 | # description: 'node3' 37 | # remote_as: '64514' 38 | # network_advertisements: #networks to advertise 39 | # - '10.0.0.10/32' 40 | # - '192.168.1.0/24' 41 | # - '192.168.2.0/24' 42 | # - '192.168.3.0/24' 43 | # router_id: '10.0.0.10' 44 | # prefix_lists: 45 | # - name: 'FILTER01-out' 46 | # action: 'permit' 47 | # network: '10.0.0.10/32' 48 | # sequence: '10' 49 | # - name: 'FILTER01-out' 50 | # action: 'permit' 51 | # network: '192.168.1.0/24' 52 | # sequence: '20' 53 | # - name: 'FILTER01-out' 54 | # action: 'permit' 55 | # network: '192.168.2.0/24' 56 | # sequence: '30' 57 | # - name: 'FILTER01-out' 58 | # action: 'deny' 59 | # network: 'any' 60 | # sequence: '40' 61 | # - name: 'node1' 62 | # local_as: '64512' 63 | # neighbors: 64 | # - neighbor: '192.168.1.10' # Peering with loopback address for iBGP 65 | # description: 'node0' 66 | # remote_as: '64512' 67 | # prefix_lists: 68 | # - name: 'FILTER01-in' 69 | # direction: 'in' 70 | # orf: 'receive' 71 | # network_advertisements: #networks to advertise 72 | # - '10.1.1.11/32' 73 | # - '192.168.1.0/24' 74 | # router_id: '10.1.1.11' 75 | # - name: 'node2' 76 | # local_as: '64513' 77 | # neighbors: 78 | # - neighbor: '192.168.2.10' 79 | # description: 'node0' 80 | # prefix_lists: 81 | # - name: 'FILTER02-out' 82 | # direction: 'out' 83 | # orf: 'send' 84 | # remote_as: '64512' 85 | # network_advertisements: #networks to advertise 86 | # # - '10.2.2.12/32' 87 | # - '192.168.2.0/24' 88 | # prefix_lists: 89 | # - name: 'FILTER02-out' 90 | # action: 'permit' 91 | # network: '192.168.2.0/24' 92 | # sequence: '10' 93 | # - name: 'FILTER01-out' 94 | # action: 'deny' 95 | # network: 'any' 96 | # sequence: '20' 97 | # router_id: '10.2.2.12' 98 | # - name: 'node3' 99 | # local_as: '64514' 100 | # neighbors: 101 | # - neighbor: '192.168.3.10' 102 | # description: 'node0' 103 | # remote_as: '64512' 104 | # network_advertisements: #networks to advertise 105 | # - '10.3.3.13/32' 106 | # - '192.168.3.0/24' 107 | # router_id: '10.3.3.13' 108 | quagga_bgp_routerid: '{{ ansible_default_ipv4.address }}' 109 | quagga_config: false 110 | #defines if quagga bgpd should be configured based on quagga_bgp_router_configs 111 | #makes it easy to disable auto routing in order to define your routes manually 112 | quagga_config_bgpd: false 113 | quagga_config_interfaces: false 114 | #defines if quagga ospfd should be configured based on quagga_ospf_ vars... 115 | #makes it easy to disable auto routing in order to define your routes manually 116 | quagga_config_ospfd: false 117 | quagga_configs: 118 | - 'daemons' 119 | - 'debian.conf' 120 | - 'vtysh.conf' 121 | - 'zebra.conf' 122 | quagga_hostname: '{{ ansible_hostname }}' 123 | quagga_enable_bgpd: false 124 | quagga_enable_ospfd: false 125 | quagga_enable_password: 'quagga' #define here or in group_vars/group 126 | 127 | # Define interfaces to configure if desired 128 | quagga_interfaces: [] 129 | # - int: 'eth0' 130 | # method: 'static' 131 | # address: '10.1.1.10' 132 | # gateway: '10.1.1.1' 133 | # addl_settings: 134 | # - 'bond_master bond0' 135 | 136 | # Define addresses to assign on loopback interface...Can be multiple as well 137 | # We are defining these as sub-interfaces on the loopback adapter lo 138 | quagga_interfaces_lo: [] 139 | # - int: "lo{{ ':' }}0" 140 | # address: '10.0.0.10/32' 141 | # method: 'static' 142 | # configure: true 143 | # # - int: "lo{{ ':' }}1" 144 | # # address: '10.0.0.11/32' 145 | # # method: 'static' 146 | # # configure: false 147 | # # - int: "lo{{ ':' }}2" 148 | # # address: '10.0.0.12/32' 149 | # # method: 'static' 150 | # # configure: false 151 | 152 | quagga_no_passive_int: [] # Define any interfaces to not advertise routes on 153 | # - 'eth0' 154 | # - 'eth1' 155 | quagga_ospf_area: '51' #defines the desired area mapping for OSPF routing with upstream OSPF routers 156 | quagga_ospf_area_config: [] 157 | # - network: '192.168.1.0/24' 158 | # area: '{{ quagga_ospf_area }}' 159 | # - network: '192.168.2.0/24' 160 | # area: '{{ quagga_ospf_area }}' 161 | # - network: '192.168.3.0/24' 162 | # area: '{{ quagga_ospf_area }}' 163 | quagga_ospf_redistribute: 164 | - 'connected' 165 | # - 'kernel' 166 | # - 'static' 167 | # - 'isis' 168 | # - 'rip' 169 | quagga_ospf_routerid: '{{ ansible_default_ipv4.address }}' #defines the router id IP address for OSPF 170 | quagga_passive_int: [] 171 | quagga_password: 'quagga' #define in group_vars/all/accounts 172 | quagga_root_dir: '/etc/quagga' 173 | quagga_sysctl_network_settings: 174 | - name: 'net.ipv4.ip_forward' 175 | value: '1' 176 | - name: 'net.ipv4.conf.all.forwarding' 177 | value: '1' 178 | - name: 'net.ipv4.conf.default.forwarding' 179 | value: '1' 180 | - name: 'net.ipv4.tcp_tw_reuse' 181 | value: '1' 182 | - name: 'net.ipv4.ip_local_port_range' 183 | value: '1024 65023' 184 | - name: 'net.ipv4.tcp_max_syn_backlog' 185 | value: '40000' 186 | - name: 'net.ipv4.tcp_max_tw_buckets' 187 | value: '400000' 188 | - name: 'net.ipv4.tcp_max_orphans' 189 | value: '60000' 190 | - name: 'net.ipv4.tcp_syncookies' 191 | value: '1' 192 | - name: 'net.ipv4.tcp_synack_retries' 193 | value: '3' 194 | - name: 'net.core.somaxconn' 195 | value: '40000' 196 | - name: 'net.ipv4.tcp_fin_timeout' 197 | value: '5' 198 | quagga_user: 'quagga' 199 | ``` 200 | 201 | Dependencies 202 | ------------ 203 | 204 | None 205 | 206 | Example Playbook 207 | ---------------- 208 | 209 | ``` 210 | - hosts: all 211 | become: true 212 | vars: 213 | roles: 214 | - role: ansible-quagga 215 | tasks: 216 | ``` 217 | 218 | License 219 | ------- 220 | 221 | BSD 222 | 223 | Author Information 224 | ------------------ 225 | 226 | Larry Smith Jr. 227 | - @mrlesmithjr 228 | - http://everythingshouldbevirtual.com 229 | - mrlesmithjr [at] gmail.com 230 | 231 | [Ansible]: 232 | [Quagga]: 233 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | echo. coverage to run coverage check of the documentation if enabled 41 | goto end 42 | ) 43 | 44 | if "%1" == "clean" ( 45 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 46 | del /q /s %BUILDDIR%\* 47 | goto end 48 | ) 49 | 50 | 51 | REM Check if sphinx-build is available and fallback to Python version if any 52 | %SPHINXBUILD% 1>NUL 2>NUL 53 | if errorlevel 9009 goto sphinx_python 54 | goto sphinx_ok 55 | 56 | :sphinx_python 57 | 58 | set SPHINXBUILD=python -m sphinx.__init__ 59 | %SPHINXBUILD% 2> nul 60 | if errorlevel 9009 ( 61 | echo. 62 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 63 | echo.installed, then set the SPHINXBUILD environment variable to point 64 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 65 | echo.may add the Sphinx directory to PATH. 66 | echo. 67 | echo.If you don't have Sphinx installed, grab it from 68 | echo.http://sphinx-doc.org/ 69 | exit /b 1 70 | ) 71 | 72 | :sphinx_ok 73 | 74 | 75 | if "%1" == "html" ( 76 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 77 | if errorlevel 1 exit /b 1 78 | echo. 79 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 80 | goto end 81 | ) 82 | 83 | if "%1" == "dirhtml" ( 84 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 85 | if errorlevel 1 exit /b 1 86 | echo. 87 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 88 | goto end 89 | ) 90 | 91 | if "%1" == "singlehtml" ( 92 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 93 | if errorlevel 1 exit /b 1 94 | echo. 95 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 96 | goto end 97 | ) 98 | 99 | if "%1" == "pickle" ( 100 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 101 | if errorlevel 1 exit /b 1 102 | echo. 103 | echo.Build finished; now you can process the pickle files. 104 | goto end 105 | ) 106 | 107 | if "%1" == "json" ( 108 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 109 | if errorlevel 1 exit /b 1 110 | echo. 111 | echo.Build finished; now you can process the JSON files. 112 | goto end 113 | ) 114 | 115 | if "%1" == "htmlhelp" ( 116 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 117 | if errorlevel 1 exit /b 1 118 | echo. 119 | echo.Build finished; now you can run HTML Help Workshop with the ^ 120 | .hhp project file in %BUILDDIR%/htmlhelp. 121 | goto end 122 | ) 123 | 124 | if "%1" == "qthelp" ( 125 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 129 | .qhcp project file in %BUILDDIR%/qthelp, like this: 130 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\ansible-bootstrap.qhcp 131 | echo.To view the help file: 132 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\ansible-bootstrap.ghc 133 | goto end 134 | ) 135 | 136 | if "%1" == "devhelp" ( 137 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 138 | if errorlevel 1 exit /b 1 139 | echo. 140 | echo.Build finished. 141 | goto end 142 | ) 143 | 144 | if "%1" == "epub" ( 145 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 146 | if errorlevel 1 exit /b 1 147 | echo. 148 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 149 | goto end 150 | ) 151 | 152 | if "%1" == "latex" ( 153 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 154 | if errorlevel 1 exit /b 1 155 | echo. 156 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 157 | goto end 158 | ) 159 | 160 | if "%1" == "latexpdf" ( 161 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 162 | cd %BUILDDIR%/latex 163 | make all-pdf 164 | cd %~dp0 165 | echo. 166 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 167 | goto end 168 | ) 169 | 170 | if "%1" == "latexpdfja" ( 171 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 172 | cd %BUILDDIR%/latex 173 | make all-pdf-ja 174 | cd %~dp0 175 | echo. 176 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 177 | goto end 178 | ) 179 | 180 | if "%1" == "text" ( 181 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 182 | if errorlevel 1 exit /b 1 183 | echo. 184 | echo.Build finished. The text files are in %BUILDDIR%/text. 185 | goto end 186 | ) 187 | 188 | if "%1" == "man" ( 189 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 190 | if errorlevel 1 exit /b 1 191 | echo. 192 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 193 | goto end 194 | ) 195 | 196 | if "%1" == "texinfo" ( 197 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 198 | if errorlevel 1 exit /b 1 199 | echo. 200 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 201 | goto end 202 | ) 203 | 204 | if "%1" == "gettext" ( 205 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 206 | if errorlevel 1 exit /b 1 207 | echo. 208 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 209 | goto end 210 | ) 211 | 212 | if "%1" == "changes" ( 213 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 214 | if errorlevel 1 exit /b 1 215 | echo. 216 | echo.The overview file is in %BUILDDIR%/changes. 217 | goto end 218 | ) 219 | 220 | if "%1" == "linkcheck" ( 221 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 222 | if errorlevel 1 exit /b 1 223 | echo. 224 | echo.Link check complete; look for any errors in the above output ^ 225 | or in %BUILDDIR%/linkcheck/output.txt. 226 | goto end 227 | ) 228 | 229 | if "%1" == "doctest" ( 230 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 231 | if errorlevel 1 exit /b 1 232 | echo. 233 | echo.Testing of doctests in the sources finished, look at the ^ 234 | results in %BUILDDIR%/doctest/output.txt. 235 | goto end 236 | ) 237 | 238 | if "%1" == "coverage" ( 239 | %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage 240 | if errorlevel 1 exit /b 1 241 | echo. 242 | echo.Testing of coverage in the sources finished, look at the ^ 243 | results in %BUILDDIR%/coverage/python.txt. 244 | goto end 245 | ) 246 | 247 | if "%1" == "xml" ( 248 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 249 | if errorlevel 1 exit /b 1 250 | echo. 251 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 252 | goto end 253 | ) 254 | 255 | if "%1" == "pseudoxml" ( 256 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 257 | if errorlevel 1 exit /b 1 258 | echo. 259 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 260 | goto end 261 | ) 262 | 263 | :end 264 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help 23 | help: 24 | @echo "Please use \`make ' where is one of" 25 | @echo " html to make standalone HTML files" 26 | @echo " dirhtml to make HTML files named index.html in directories" 27 | @echo " singlehtml to make a single large HTML file" 28 | @echo " pickle to make pickle files" 29 | @echo " json to make JSON files" 30 | @echo " htmlhelp to make HTML files and a HTML help project" 31 | @echo " qthelp to make HTML files and a qthelp project" 32 | @echo " applehelp to make an Apple Help Book" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | @echo " coverage to run coverage check of the documentation (if enabled)" 49 | 50 | .PHONY: clean 51 | clean: 52 | rm -rf $(BUILDDIR)/* 53 | 54 | .PHONY: html 55 | html: 56 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 57 | @echo 58 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 59 | 60 | .PHONY: dirhtml 61 | dirhtml: 62 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 63 | @echo 64 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 65 | 66 | .PHONY: singlehtml 67 | singlehtml: 68 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 69 | @echo 70 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 71 | 72 | .PHONY: pickle 73 | pickle: 74 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 75 | @echo 76 | @echo "Build finished; now you can process the pickle files." 77 | 78 | .PHONY: json 79 | json: 80 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 81 | @echo 82 | @echo "Build finished; now you can process the JSON files." 83 | 84 | .PHONY: htmlhelp 85 | htmlhelp: 86 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 87 | @echo 88 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 89 | ".hhp project file in $(BUILDDIR)/htmlhelp." 90 | 91 | .PHONY: qthelp 92 | qthelp: 93 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 94 | @echo 95 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 96 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 97 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ansible-bootstrap.qhcp" 98 | @echo "To view the help file:" 99 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ansible-bootstrap.qhc" 100 | 101 | .PHONY: applehelp 102 | applehelp: 103 | $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp 104 | @echo 105 | @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." 106 | @echo "N.B. You won't be able to view it unless you put it in" \ 107 | "~/Library/Documentation/Help or install it in your application" \ 108 | "bundle." 109 | 110 | .PHONY: devhelp 111 | devhelp: 112 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 113 | @echo 114 | @echo "Build finished." 115 | @echo "To view the help file:" 116 | @echo "# mkdir -p $$HOME/.local/share/devhelp/ansible-bootstrap" 117 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ansible-bootstrap" 118 | @echo "# devhelp" 119 | 120 | .PHONY: epub 121 | epub: 122 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 123 | @echo 124 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 125 | 126 | .PHONY: latex 127 | latex: 128 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 129 | @echo 130 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 131 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 132 | "(use \`make latexpdf' here to do that automatically)." 133 | 134 | .PHONY: latexpdf 135 | latexpdf: 136 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 137 | @echo "Running LaTeX files through pdflatex..." 138 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 139 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 140 | 141 | .PHONY: latexpdfja 142 | latexpdfja: 143 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 144 | @echo "Running LaTeX files through platex and dvipdfmx..." 145 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 146 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 147 | 148 | .PHONY: text 149 | text: 150 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 151 | @echo 152 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 153 | 154 | .PHONY: man 155 | man: 156 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 157 | @echo 158 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 159 | 160 | .PHONY: texinfo 161 | texinfo: 162 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 163 | @echo 164 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 165 | @echo "Run \`make' in that directory to run these through makeinfo" \ 166 | "(use \`make info' here to do that automatically)." 167 | 168 | .PHONY: info 169 | info: 170 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 171 | @echo "Running Texinfo files through makeinfo..." 172 | make -C $(BUILDDIR)/texinfo info 173 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 174 | 175 | .PHONY: gettext 176 | gettext: 177 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 178 | @echo 179 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 180 | 181 | .PHONY: changes 182 | changes: 183 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 184 | @echo 185 | @echo "The overview file is in $(BUILDDIR)/changes." 186 | 187 | .PHONY: linkcheck 188 | linkcheck: 189 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 190 | @echo 191 | @echo "Link check complete; look for any errors in the above output " \ 192 | "or in $(BUILDDIR)/linkcheck/output.txt." 193 | 194 | .PHONY: doctest 195 | doctest: 196 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 197 | @echo "Testing of doctests in the sources finished, look at the " \ 198 | "results in $(BUILDDIR)/doctest/output.txt." 199 | 200 | .PHONY: coverage 201 | coverage: 202 | $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage 203 | @echo "Testing of coverage in the sources finished, look at the " \ 204 | "results in $(BUILDDIR)/coverage/python.txt." 205 | 206 | .PHONY: xml 207 | xml: 208 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 209 | @echo 210 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 211 | 212 | .PHONY: pseudoxml 213 | pseudoxml: 214 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 215 | @echo 216 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 217 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s == 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node) { 70 | if (node.nodeType == 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { 74 | var span = document.createElement("span"); 75 | span.className = className; 76 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 77 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 78 | document.createTextNode(val.substr(pos + text.length)), 79 | node.nextSibling)); 80 | node.nodeValue = val.substr(0, pos); 81 | } 82 | } 83 | else if (!jQuery(node).is("button, select, textarea")) { 84 | jQuery.each(node.childNodes, function() { 85 | highlight(this); 86 | }); 87 | } 88 | } 89 | return this.each(function() { 90 | highlight(this); 91 | }); 92 | }; 93 | 94 | /* 95 | * backward compatibility for jQuery.browser 96 | * This will be supported until firefox bug is fixed. 97 | */ 98 | if (!jQuery.browser) { 99 | jQuery.uaMatch = function(ua) { 100 | ua = ua.toLowerCase(); 101 | 102 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 103 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 104 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 105 | /(msie) ([\w.]+)/.exec(ua) || 106 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 107 | []; 108 | 109 | return { 110 | browser: match[ 1 ] || "", 111 | version: match[ 2 ] || "0" 112 | }; 113 | }; 114 | jQuery.browser = {}; 115 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 116 | } 117 | 118 | /** 119 | * Small JavaScript module for the documentation. 120 | */ 121 | var Documentation = { 122 | 123 | init : function() { 124 | this.fixFirefoxAnchorBug(); 125 | this.highlightSearchWords(); 126 | this.initIndexTable(); 127 | 128 | }, 129 | 130 | /** 131 | * i18n support 132 | */ 133 | TRANSLATIONS : {}, 134 | PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, 135 | LOCALE : 'unknown', 136 | 137 | // gettext and ngettext don't access this so that the functions 138 | // can safely bound to a different name (_ = Documentation.gettext) 139 | gettext : function(string) { 140 | var translated = Documentation.TRANSLATIONS[string]; 141 | if (typeof translated == 'undefined') 142 | return string; 143 | return (typeof translated == 'string') ? translated : translated[0]; 144 | }, 145 | 146 | ngettext : function(singular, plural, n) { 147 | var translated = Documentation.TRANSLATIONS[singular]; 148 | if (typeof translated == 'undefined') 149 | return (n == 1) ? singular : plural; 150 | return translated[Documentation.PLURALEXPR(n)]; 151 | }, 152 | 153 | addTranslations : function(catalog) { 154 | for (var key in catalog.messages) 155 | this.TRANSLATIONS[key] = catalog.messages[key]; 156 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 157 | this.LOCALE = catalog.locale; 158 | }, 159 | 160 | /** 161 | * add context elements like header anchor links 162 | */ 163 | addContextElements : function() { 164 | $('div[id] > :header:first').each(function() { 165 | $('\u00B6'). 166 | attr('href', '#' + this.id). 167 | attr('title', _('Permalink to this headline')). 168 | appendTo(this); 169 | }); 170 | $('dt[id]').each(function() { 171 | $('\u00B6'). 172 | attr('href', '#' + this.id). 173 | attr('title', _('Permalink to this definition')). 174 | appendTo(this); 175 | }); 176 | }, 177 | 178 | /** 179 | * workaround a firefox stupidity 180 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 181 | */ 182 | fixFirefoxAnchorBug : function() { 183 | if (document.location.hash) 184 | window.setTimeout(function() { 185 | document.location.href += ''; 186 | }, 10); 187 | }, 188 | 189 | /** 190 | * highlight the search words provided in the url in the text 191 | */ 192 | highlightSearchWords : function() { 193 | var params = $.getQueryParameters(); 194 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 195 | if (terms.length) { 196 | var body = $('div.body'); 197 | if (!body.length) { 198 | body = $('body'); 199 | } 200 | window.setTimeout(function() { 201 | $.each(terms, function() { 202 | body.highlightText(this.toLowerCase(), 'highlighted'); 203 | }); 204 | }, 10); 205 | $('') 207 | .appendTo($('#searchbox')); 208 | } 209 | }, 210 | 211 | /** 212 | * init the domain index toggle buttons 213 | */ 214 | initIndexTable : function() { 215 | var togglers = $('img.toggler').click(function() { 216 | var src = $(this).attr('src'); 217 | var idnum = $(this).attr('id').substr(7); 218 | $('tr.cg-' + idnum).toggle(); 219 | if (src.substr(-9) == 'minus.png') 220 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 221 | else 222 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 223 | }).css('display', ''); 224 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 225 | togglers.click(); 226 | } 227 | }, 228 | 229 | /** 230 | * helper function to hide the search marks again 231 | */ 232 | hideSearchWords : function() { 233 | $('#searchbox .highlight-link').fadeOut(300); 234 | $('span.highlighted').removeClass('highlighted'); 235 | }, 236 | 237 | /** 238 | * make the url absolute 239 | */ 240 | makeURL : function(relativeURL) { 241 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 242 | }, 243 | 244 | /** 245 | * get the current relative url 246 | */ 247 | getCurrentURL : function() { 248 | var path = document.location.pathname; 249 | var parts = path.split(/\//); 250 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 251 | if (this == '..') 252 | parts.pop(); 253 | }); 254 | var url = parts.join('/'); 255 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 256 | }, 257 | 258 | initOnKeyListeners: function() { 259 | $(document).keyup(function(event) { 260 | var activeElementType = document.activeElement.tagName; 261 | // don't navigate when in search box or textarea 262 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { 263 | switch (event.keyCode) { 264 | case 37: // left 265 | var prevHref = $('link[rel="prev"]').prop('href'); 266 | if (prevHref) { 267 | window.location.href = prevHref; 268 | return false; 269 | } 270 | case 39: // right 271 | var nextHref = $('link[rel="next"]').prop('href'); 272 | if (nextHref) { 273 | window.location.href = nextHref; 274 | return false; 275 | } 276 | } 277 | } 278 | }); 279 | } 280 | }; 281 | 282 | // quick alias for translations 283 | _ = Documentation.gettext; 284 | 285 | $(document).ready(function() { 286 | Documentation.init(); 287 | }); -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ansible-bootstrap documentation build configuration file, created by 4 | # sphinx-quickstart on Fri Mar 4 12:27:25 2016. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | 18 | # If extensions (or modules to document with autodoc) are in another directory, 19 | # add these directories to sys.path here. If the directory is relative to the 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. 21 | #sys.path.insert(0, os.path.abspath('.')) 22 | 23 | # -- General configuration ------------------------------------------------ 24 | 25 | # If your documentation needs a minimal Sphinx version, state it here. 26 | #needs_sphinx = '1.0' 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = [] 32 | 33 | # Add any paths that contain templates here, relative to this directory. 34 | templates_path = ['_templates'] 35 | 36 | # The suffix(es) of source filenames. 37 | # You can specify multiple suffix as a list of string: 38 | # source_suffix = ['.rst', '.md'] 39 | source_suffix = '.rst' 40 | 41 | # The encoding of source files. 42 | #source_encoding = 'utf-8-sig' 43 | 44 | # The master toctree document. 45 | master_doc = 'index' 46 | 47 | # General information about the project. 48 | project = u'ansible-bootstrap' 49 | copyright = u'2016, Larry Smith Jr.' 50 | author = u'Larry Smith Jr.' 51 | 52 | # The version info for the project you're documenting, acts as replacement for 53 | # |version| and |release|, also used in various other places throughout the 54 | # built documents. 55 | # 56 | # The short X.Y version. 57 | version = u'1.0' 58 | # The full version, including alpha/beta/rc tags. 59 | release = u'1.0' 60 | 61 | # The language for content autogenerated by Sphinx. Refer to documentation 62 | # for a list of supported languages. 63 | # 64 | # This is also used if you do content translation via gettext catalogs. 65 | # Usually you set "language" from the command line for these cases. 66 | language = None 67 | 68 | # There are two options for replacing |today|: either, you set today to some 69 | # non-false value, then it is used: 70 | #today = '' 71 | # Else, today_fmt is used as the format for a strftime call. 72 | #today_fmt = '%B %d, %Y' 73 | 74 | # List of patterns, relative to source directory, that match files and 75 | # directories to ignore when looking for source files. 76 | exclude_patterns = ['_build'] 77 | 78 | # The reST default role (used for this markup: `text`) to use for all 79 | # documents. 80 | #default_role = None 81 | 82 | # If true, '()' will be appended to :func: etc. cross-reference text. 83 | #add_function_parentheses = True 84 | 85 | # If true, the current module name will be prepended to all description 86 | # unit titles (such as .. function::). 87 | #add_module_names = True 88 | 89 | # If true, sectionauthor and moduleauthor directives will be shown in the 90 | # output. They are ignored by default. 91 | #show_authors = False 92 | 93 | # The name of the Pygments (syntax highlighting) style to use. 94 | pygments_style = 'sphinx' 95 | 96 | # A list of ignored prefixes for module index sorting. 97 | #modindex_common_prefix = [] 98 | 99 | # If true, keep warnings as "system message" paragraphs in the built documents. 100 | #keep_warnings = False 101 | 102 | # If true, `todo` and `todoList` produce output, else they produce nothing. 103 | todo_include_todos = False 104 | 105 | 106 | # -- Options for HTML output ---------------------------------------------- 107 | 108 | # The theme to use for HTML and HTML Help pages. See the documentation for 109 | # a list of builtin themes. 110 | html_theme = 'alabaster' 111 | 112 | # Theme options are theme-specific and customize the look and feel of a theme 113 | # further. For a list of options available for each theme, see the 114 | # documentation. 115 | #html_theme_options = {} 116 | 117 | # Add any paths that contain custom themes here, relative to this directory. 118 | #html_theme_path = [] 119 | 120 | # The name for this set of Sphinx documents. If None, it defaults to 121 | # " v documentation". 122 | #html_title = None 123 | 124 | # A shorter title for the navigation bar. Default is the same as html_title. 125 | #html_short_title = None 126 | 127 | # The name of an image file (relative to this directory) to place at the top 128 | # of the sidebar. 129 | #html_logo = None 130 | 131 | # The name of an image file (relative to this directory) to use as a favicon of 132 | # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 133 | # pixels large. 134 | #html_favicon = None 135 | 136 | # Add any paths that contain custom static files (such as style sheets) here, 137 | # relative to this directory. They are copied after the builtin static files, 138 | # so a file named "default.css" will overwrite the builtin "default.css". 139 | html_static_path = ['_static'] 140 | 141 | # Add any extra paths that contain custom files (such as robots.txt or 142 | # .htaccess) here, relative to this directory. These files are copied 143 | # directly to the root of the documentation. 144 | #html_extra_path = [] 145 | 146 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 147 | # using the given strftime format. 148 | #html_last_updated_fmt = '%b %d, %Y' 149 | 150 | # If true, SmartyPants will be used to convert quotes and dashes to 151 | # typographically correct entities. 152 | #html_use_smartypants = True 153 | 154 | # Custom sidebar templates, maps document names to template names. 155 | #html_sidebars = {} 156 | 157 | # Additional templates that should be rendered to pages, maps page names to 158 | # template names. 159 | #html_additional_pages = {} 160 | 161 | # If false, no module index is generated. 162 | #html_domain_indices = True 163 | 164 | # If false, no index is generated. 165 | #html_use_index = True 166 | 167 | # If true, the index is split into individual pages for each letter. 168 | #html_split_index = False 169 | 170 | # If true, links to the reST sources are added to the pages. 171 | #html_show_sourcelink = True 172 | 173 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 174 | #html_show_sphinx = True 175 | 176 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 177 | #html_show_copyright = True 178 | 179 | # If true, an OpenSearch description file will be output, and all pages will 180 | # contain a tag referring to it. The value of this option must be the 181 | # base URL from which the finished HTML is served. 182 | #html_use_opensearch = '' 183 | 184 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 185 | #html_file_suffix = None 186 | 187 | # Language to be used for generating the HTML full-text search index. 188 | # Sphinx supports the following languages: 189 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' 190 | # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' 191 | #html_search_language = 'en' 192 | 193 | # A dictionary with options for the search language support, empty by default. 194 | # Now only 'ja' uses this config value 195 | #html_search_options = {'type': 'default'} 196 | 197 | # The name of a javascript file (relative to the configuration directory) that 198 | # implements a search results scorer. If empty, the default will be used. 199 | #html_search_scorer = 'scorer.js' 200 | 201 | # Output file base name for HTML help builder. 202 | htmlhelp_basename = 'ansible-bootstrapdoc' 203 | 204 | # -- Options for LaTeX output --------------------------------------------- 205 | 206 | latex_elements = { 207 | # The paper size ('letterpaper' or 'a4paper'). 208 | #'papersize': 'letterpaper', 209 | 210 | # The font size ('10pt', '11pt' or '12pt'). 211 | #'pointsize': '10pt', 212 | 213 | # Additional stuff for the LaTeX preamble. 214 | #'preamble': '', 215 | 216 | # Latex figure (float) alignment 217 | #'figure_align': 'htbp', 218 | } 219 | 220 | # Grouping the document tree into LaTeX files. List of tuples 221 | # (source start file, target name, title, 222 | # author, documentclass [howto, manual, or own class]). 223 | latex_documents = [ 224 | (master_doc, 'ansible-bootstrap.tex', u'ansible-bootstrap Documentation', 225 | u'Larry Smith Jr.', 'manual'), 226 | ] 227 | 228 | # The name of an image file (relative to this directory) to place at the top of 229 | # the title page. 230 | #latex_logo = None 231 | 232 | # For "manual" documents, if this is true, then toplevel headings are parts, 233 | # not chapters. 234 | #latex_use_parts = False 235 | 236 | # If true, show page references after internal links. 237 | #latex_show_pagerefs = False 238 | 239 | # If true, show URL addresses after external links. 240 | #latex_show_urls = False 241 | 242 | # Documents to append as an appendix to all manuals. 243 | #latex_appendices = [] 244 | 245 | # If false, no module index is generated. 246 | #latex_domain_indices = True 247 | 248 | 249 | # -- Options for manual page output --------------------------------------- 250 | 251 | # One entry per manual page. List of tuples 252 | # (source start file, name, description, authors, manual section). 253 | man_pages = [ 254 | (master_doc, 'ansible-bootstrap', u'ansible-bootstrap Documentation', 255 | [author], 1) 256 | ] 257 | 258 | # If true, show URL addresses after external links. 259 | #man_show_urls = False 260 | 261 | 262 | # -- Options for Texinfo output ------------------------------------------- 263 | 264 | # Grouping the document tree into Texinfo files. List of tuples 265 | # (source start file, target name, title, author, 266 | # dir menu entry, description, category) 267 | texinfo_documents = [ 268 | (master_doc, 'ansible-bootstrap', u'ansible-bootstrap Documentation', 269 | author, 'ansible-bootstrap', 'One line description of project.', 270 | 'Miscellaneous'), 271 | ] 272 | 273 | # Documents to append as an appendix to all manuals. 274 | #texinfo_appendices = [] 275 | 276 | # If false, no module index is generated. 277 | #texinfo_domain_indices = True 278 | 279 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 280 | #texinfo_show_urls = 'footnote' 281 | 282 | # If true, do not generate a @detailmenu in the "Top" node's menu. 283 | #texinfo_no_detailmenu = False 284 | -------------------------------------------------------------------------------- /roles/ansible-config-interfaces/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | Configures network interfaces for either static, dhcp or manual. 5 | Ability to create VLAN, Bond and Bridge interfaces as well. 6 | 7 | Requirements 8 | ------------ 9 | 10 | All Interfaces, vlans, Bridges and Bond information must be defined either in 11 | group_vars/group or host_vars/host...Ensure that you do not define IP addresses 12 | in group_vars otherwise duplicate IP addresses will be present. 13 | 14 | Role Variables 15 | -------------- 16 | These variables for most occasions should remain as they are. The actual 17 | variables should be defined within host_vars/host for each host requiring 18 | configurations. 19 | ``` 20 | --- 21 | # defaults file for ansible-config-interfaces 22 | config_network_bonds: false #defines if kvm_network_bonds should be configured as defined...define in host_vars/host 23 | config_network_bridges: false #defines if kvm_network_bridges should be configured as defined...define in host_vars/host 24 | config_network_interfaces: false #defines if kvm_network_interfaces should be configured as defined...define in host_vars/host 25 | config_network_vlans: false #defines if kvm_network_vlans should be configured as defined...define in host_vars/host 26 | dns_nameservers: #defines all dns servers to configure...define here or globally in group_vars/all 27 | - '8.8.8.8' 28 | - '8.8.4.4' 29 | dns_search: '{{ pri_domain_name }}' #defines your global dns suffix search...define here or globally in group_vars/all 30 | enable_configured_interfaces_after_defining: false #defines if interfaces, bonds, bridges and vlans should be brought up after defining. 31 | kvm_mgmt_ip: '0.0.0.0' #defines management IP for var on network_bridges....This is for demo purposes only 32 | kvm_mgmt_gateway: '0.0.0.0' #defines management gateway for var on network_bridges....This is for demo purposes only 33 | kvm_nfs1_ip: '0.0.0.0' #defines IP address to define on Storage interface.....This is for demo purposes only 34 | network_bonds: #define network bonds and settings if desired (Define separately for each node in host_vars) - https://help.ubuntu.com/community/UbuntuBonding 35 | - name: 'bond0' 36 | configure: true 37 | comment: 'Management Networks' 38 | method: 'manual' 39 | slaves: 40 | - 'eth0' 41 | - 'eth1' 42 | primary: 'eth0' 43 | addl_settings: 44 | # - 'bond_mode balance-alb' 45 | - 'bond_miimon 100' 46 | - name: 'bond1' 47 | configure: true 48 | comment: 'Storage Networks' 49 | method: 'manual' 50 | slaves: 51 | - 'eth3' 52 | - 'eth4' 53 | primary: 'eth3' 54 | addl_settings: 55 | # - 'bond_mode balance-alb' 56 | - 'bond_miimon 100' 57 | - name: 'bond2' 58 | configure: true 59 | comment: 'VM Traffic Networks' 60 | method: 'manual' 61 | slaves: 62 | - 'eth2' 63 | - 'eth5' 64 | primary: 'eth2' 65 | addl_settings: 66 | - 'bond_mode balance-alb' 67 | - 'bond_miimon 100' 68 | network_bridges: #define network bridges and settings if desired (Define separately for each node in host_vars) - https://help.ubuntu.com/community/NetworkConnectionBridge 69 | - name: 'br0' 70 | configure: true 71 | comment: 'Management - VLAN106' 72 | method: 'static' 73 | address: '{{ kvm_mgmt_ip }}' 74 | netmask: '255.255.255.0' 75 | netmask_cidr: '24' 76 | gateway: '{{ kvm_mgmt_gateway }}' 77 | ports: 'bond0.106' 78 | addl_settings: 79 | - 'up route add default gw {{ kvm_mgmt_gateway }}' 80 | - 'bridge_stp off' 81 | - 'bridge_fd 0' 82 | - name: 'br1' 83 | configure: true 84 | comment: 'NFS-1 - VLAN127' 85 | method: 'static' 86 | address: '{{ kvm_nfs1_ip }}' 87 | netmask: '255.255.255.0' 88 | netmask_cidr: '24' 89 | gateway: 90 | ports: 'bond1.127' 91 | addl_settings: 92 | - 'bridge_stp off' 93 | - 'bridge_fd 0' 94 | - name: 'vmbr100' 95 | configure: true 96 | comment: 'Orange-DMZ - Virtual Networking' 97 | method: 'manual' 98 | address: 99 | netmask: 100 | netmask_cidr: 101 | gateway: 102 | ports: 'bond2.100' 103 | addl_settings: 104 | - 'bridge_stp off' 105 | - 'bridge_fd 0' 106 | - name: 'vmbr101' 107 | configure: true 108 | comment: 'Green-Servers - Virtual Networking' 109 | method: 'manual' 110 | address: 111 | netmask: 112 | netmask_cidr: 113 | gateway: 114 | ports: 'bond2.101' 115 | addl_settings: 116 | - 'bridge_stp off' 117 | - 'bridge_fd 0' 118 | network_interfaces: #define interfaces and settings. (Define separately for each node in host_vars) - Anything not defined can be added to addl_settings. 119 | - name: 'eth0' 120 | configure: true 121 | comment: 122 | method: 'manual' 123 | address: 124 | netmask: 125 | netmask_cidr: 126 | gateway: 127 | # wireless_network: false #defines if the interface is a wireless interface...not working so keep false or not defined 128 | # wpa_ssid: wireless #defines the wireless SSID to connect to 129 | # wpa_psk: wpapassword #defines the wireless key 130 | addl_settings: 131 | - 'bond_master bond0' 132 | - name: 'eth1' 133 | configure: true 134 | comment: 135 | method: 'manual' 136 | address: 137 | netmask: 138 | netmask_cidr: 139 | gateway: 140 | addl_settings: 141 | - 'bond_master bond0' 142 | - name: 'eth2' 143 | configure: true 144 | comment: 145 | method: 'manual' 146 | address: 147 | netmask: 148 | netmask_cidr: 149 | gateway: 150 | addl_settings: 151 | - 'bond_master bond2' 152 | - name: 'eth3' 153 | configure: true 154 | comment: 155 | method: 'manual' 156 | address: 157 | netmask: 158 | netmask_cidr: 159 | gateway: 160 | addl_settings: 161 | - 'bond_master bond1' 162 | - name: 'eth4' 163 | configure: true 164 | comment: 165 | method: 'manual' 166 | address: 167 | netmask: 168 | netmask_cidr: 169 | gateway: 170 | addl_settings: 171 | - 'bond_master bond1' 172 | - name: 'eth5' 173 | configure: true 174 | comment: 175 | method: 'manual' 176 | address: 177 | netmask: 178 | netmask_cidr: 179 | gateway: 180 | addl_settings: 181 | - 'bond_master bond2' 182 | network_vlans: #define vlans and settings if desired. (Define separately for each node in host_vars) 183 | - name: 'bond2.100' 184 | configure: true 185 | comment: 'Orange-DMZ' 186 | method: 'manual' 187 | address: 188 | netmask: 189 | netmask_cidr: 190 | gateway: 191 | vlan_device: 'bond2' 192 | addl_settings: 193 | - name: 'bond2.101' 194 | configure: true 195 | comment: 'Green-Servers' 196 | method: 'manual' 197 | address: 198 | netmask: 199 | netmask_cidr: 200 | gateway: 201 | vlan_device: 'bond2' 202 | addl_settings: 203 | - name: 'bond0.106' 204 | configure: true 205 | comment: 'Management' 206 | method: 'manual' 207 | address: 208 | netmask: 209 | netmask_cidr: 210 | gateway: 211 | vlan_device: 'bond0' 212 | addl_settings: 213 | - name: 'bond1.127' 214 | configure: true 215 | comment: 'NFS-1' 216 | method: 'manual' 217 | address: 218 | netmask: 219 | netmask_cidr: 220 | gateway: 221 | vlan_device: 'bond1' 222 | addl_settings: 223 | pri_domain_name: 'example.org' 224 | ``` 225 | 226 | Dependencies 227 | ------------ 228 | 229 | If interface is wireless you will need to define as such as well as provide the 230 | SSID and key. 231 | 232 | Example Playbook 233 | ---------------- 234 | 235 | - hosts: servers 236 | roles: 237 | - { role: mrlesmithjr.config-interfaces } 238 | 239 | Example /etc/network/interfaces generated from the example variables 240 | -------------------------------------------------------------------- 241 | ```` 242 | # Ansible managed: /etc/ansible/roles/mrlesmithjr.config-interfaces/templates/etc/network/interfaces.j2 modified on 2015-10-16 21:21:14 by root on node-1 243 | # Any changes made here will be lost 244 | 245 | auto lo 246 | iface lo inet loopback 247 | 248 | ########## Network Interfaces 249 | auto eth0 250 | iface eth0 inet manual 251 | bond_master bond0 252 | 253 | auto eth1 254 | iface eth1 inet manual 255 | bond_master bond0 256 | 257 | auto eth2 258 | iface eth2 inet manual 259 | bond_master bond2 260 | 261 | auto eth3 262 | iface eth3 inet manual 263 | bond_master bond1 264 | 265 | auto eth4 266 | iface eth4 inet manual 267 | bond_master bond1 268 | 269 | auto eth5 270 | iface eth5 inet manual 271 | bond_master bond2 272 | 273 | ########## End of Network Interfaces 274 | 275 | ########## Network Bonds 276 | # Management 277 | auto bond0 278 | iface bond0 inet manual 279 | bond_slaves eth0 eth1 280 | bond_primary eth0 281 | bond_miimon 100 282 | 283 | # Storage 284 | auto bond1 285 | iface bond1 inet manual 286 | bond_slaves eth3 eth4 287 | bond_primary eth3 288 | bond_mode balance-alb 289 | bond_miimon 100 290 | 291 | # VMs 292 | auto bond2 293 | iface bond2 inet manual 294 | bond_slaves eth2 eth5 295 | bond_primary eth2 296 | bond_mode balance-alb 297 | bond_miimon 100 298 | 299 | ########## End of Network Bonds 300 | 301 | ########## Network VLANS 302 | # Orange-DMZ 303 | auto vlan100 304 | iface vlan100 inet manual 305 | vlan_raw_device bond2 306 | 307 | # Green-Servers 308 | auto vlan101 309 | iface vlan101 inet manual 310 | vlan_raw_device bond2 311 | 312 | # Management 313 | auto vlan106 314 | iface vlan106 inet static 315 | address 10.0.106.51 316 | netmask 255.255.255.0 317 | gateway 10.0.106.51 318 | up route add default gw 10.0.106.1 319 | vlan_raw_device bond0 320 | 321 | # NFS-1 322 | auto vlan127 323 | iface vlan127 inet static 324 | address 10.0.127.151 325 | netmask 255.255.255.0 326 | vlan_raw_device bond1 327 | 328 | ########## End of Network VLANS 329 | 330 | ########## Network Bridges 331 | # Orange-DMZ - Virtual Networking 332 | auto vmbr100 333 | iface vmbr100 inet manual 334 | bridge_stp off 335 | bridge_fd 0 336 | bridge_ports vlan100 337 | 338 | # Green-Servers - Virtual Networking 339 | auto vmbr101 340 | iface vmbr101 inet manual 341 | bridge_stp off 342 | bridge_fd 0 343 | bridge_ports vlan101 344 | 345 | ########## End of Network Bridges 346 | 347 | dns-nameservers 192.168.70.240 192.168.70.241 348 | dns-search example.org 349 | ```` 350 | 351 | License 352 | ------- 353 | 354 | BSD 355 | 356 | Author Information 357 | ------------------ 358 | 359 | Larry Smith Jr. 360 | - @mrlesmithjr 361 | - http://everythingshouldbevirtual.com 362 | - mrlesmithjr [at] gmail.com 363 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # All Vagrant configuration is done below. The "2" in Vagrant.configure 5 | # configures the configuration version (we support older styles for 6 | # backwards compatibility). Please don't change it unless you know what 7 | # you're doing. 8 | 9 | # ---- Define number of nodes to spin up ---- 10 | N = 4 11 | 12 | # ---- Define any custom memory/cpu requirement ---- 13 | # if custom requirements are desired...ensure to set 14 | # custom_cpu_mem == true otherwise set to false 15 | # By default if custom requirements are defined and set below 16 | # any node not defined will be configured as the default... 17 | # which is 1vCPU/512mb...So if setting custom requirements 18 | # only define any node which requires more than the defaults. 19 | nodes = [ 20 | { 21 | :node => "node0", 22 | :box => "mrlesmithjr/trusty64", 23 | :cpu => 1, 24 | :mem => 1024 25 | } 26 | ] 27 | 28 | # ---- Define variables below ---- 29 | #Define if additional disks should be added (true|false) 30 | additional_disks = false 31 | additional_disks_controller = "SATA Controller" 32 | #Define the number of additional disks to add 33 | additional_disks_num = 1 34 | #Define disk size in GB 35 | additional_disks_size = 10 36 | #Define if additional network adapters should be created (true|false) 37 | additional_nics = true 38 | # Define specific network assignments for nodes 39 | additional_nic_assignments = [ 40 | { 41 | :auto_config => true, 42 | :ip => "192.168.250.10", 43 | :method => "static", 44 | # :network_name => "management", 45 | :node => "node0" 46 | }, 47 | { 48 | :auto_config => true, 49 | :ip => "192.168.1.10", 50 | :method => "static", 51 | :network_name => "net-01", 52 | :node => "node0" 53 | }, 54 | { 55 | :auto_config => true, 56 | :ip => "192.168.2.10", 57 | :method => "static", 58 | :network_name => "net-02", 59 | :node => "node0" 60 | }, 61 | { 62 | :auto_config => true, 63 | :ip => "192.168.3.10", 64 | :method => "static", 65 | :network_name => "net-03", 66 | :node => "node0" 67 | }, 68 | { 69 | :auto_config => true, 70 | :ip => "192.168.250.11", 71 | :method => "static", 72 | # :network_name => "management", 73 | :node => "node1" 74 | }, 75 | { 76 | :auto_config => true, 77 | :ip => "192.168.1.11", 78 | :method => "static", 79 | :network_name => "net-01", 80 | :node => "node1" 81 | }, 82 | { 83 | :auto_config => true, 84 | :ip => "192.168.250.12", 85 | :method => "static", 86 | # :network_name => "management", 87 | :node => "node2" 88 | }, 89 | { 90 | :auto_config => true, 91 | :ip => "192.168.2.12", 92 | :method => "static", 93 | :network_name => "net-02", 94 | :node => "node2" 95 | }, 96 | { 97 | :auto_config => true, 98 | :ip => "192.168.250.13", 99 | :method => "static", 100 | # :network_name => "management", 101 | :node => "node3" 102 | }, 103 | { 104 | :auto_config => true, 105 | :ip => "192.168.3.13", 106 | :method => "static", 107 | :network_name => "net-03", 108 | :node => "node3" 109 | } 110 | ] 111 | #Define if add'l network adapters are auto configured addresses (true|false) 112 | additional_nics_auto_config = true 113 | #Define if additional network adapters should be DHCP assigned (true|false) 114 | additional_nics_dhcp = false 115 | #Define the number of additional nics to add 116 | additional_nics_num = 4 117 | ansible_groups = { 118 | "quagga-routers" => ["node[0:#{N-1}]"] 119 | } 120 | #Define Vagrant box to load 121 | box = "mrlesmithjr/xenial64" 122 | #Define if custom cpu and memory requirements are needed (true|false) 123 | #defined within nodes variable above 124 | custom_cpu_mem = false 125 | #Define if running desktop OS (true|false) 126 | desktop = false 127 | enable_additional_nic_assignments = true 128 | #Define if custom boxes should be used...defined in nodes var.. 129 | enable_custom_boxes = false 130 | #Define if port forwards should be enabled (true|false) 131 | enable_port_forwards = false 132 | #Defines if nodes should be linked from master VM (true|false) 133 | linked_clones = false 134 | port_forwards = [ 135 | { 136 | :node => "node0", 137 | :guest => 3306, 138 | :host => 3306 139 | }, 140 | { 141 | :node => "node0", 142 | :guest => 80, 143 | :host => 8080 144 | }, 145 | { 146 | :node => "node0", 147 | :guest => 8000, 148 | :host => 8000 149 | } 150 | ] 151 | #Define if provisioners should run (true|false) 152 | provision_nodes = true 153 | #Define if IP's are random assigned if not DHCP (true|false) 154 | random_ips = false 155 | #Define number of CPU cores 156 | #will be ignored if custom_cpu_mem == true 157 | server_cpus = 1 158 | #Define amount of memory to assign to node(s) 159 | #will be ignored if custom_cpu_mem == true 160 | server_memory = 512 161 | #Define subnet for private_network (If not using DHCP) 162 | subnet = "192.168.202." 163 | #Define starting last octet of the subnet range to begin addresses for node(s) 164 | subnet_ip_start = 200 165 | 166 | Vagrant.configure(2) do |config| 167 | 168 | #Iterate over nodes 169 | (1..N).each do |node_id| 170 | nid = (node_id - 1) 171 | 172 | config.vm.define "node#{nid}" do |node| 173 | if enable_custom_boxes 174 | #Initially no so it can be set to yes if found in custom box defined 175 | box_set = "no" 176 | nodes.each do |cust_box| 177 | if cust_box[:node] == "node#{nid}" 178 | node.vm.box = cust_box[:box] 179 | box_set = "yes" 180 | end 181 | end 182 | if box_set == "no" 183 | node.vm.box = box 184 | end 185 | end 186 | if not enable_custom_boxes 187 | node.vm.box = box 188 | end 189 | node.vm.provider "virtualbox" do |vb| 190 | if linked_clones 191 | vb.linked_clone = true 192 | end 193 | if not custom_cpu_mem 194 | vb.customize ["modifyvm", :id, "--cpus", server_cpus] 195 | vb.customize ["modifyvm", :id, "--memory", server_memory] 196 | end 197 | if custom_cpu_mem 198 | nodes.each do |cust_node| 199 | if cust_node[:node] == "node#{nid}" 200 | vb.customize ["modifyvm", :id, "--cpus", cust_node[:cpu]] 201 | vb.customize ["modifyvm", :id, "--memory", cust_node[:mem]] 202 | end 203 | end 204 | end 205 | 206 | # Setup desktop environment 207 | if desktop 208 | vb.gui = true 209 | vb.customize ["modifyvm", :id, "--graphicscontroller", "vboxvga"] 210 | vb.customize ["modifyvm", :id, "--accelerate3d", "on"] 211 | vb.customize ["modifyvm", :id, "--ioapic", "on"] 212 | vb.customize ["modifyvm", :id, "--vram", "128"] 213 | vb.customize ["modifyvm", :id, "--hwvirtex", "on"] 214 | end 215 | 216 | # Add additional disks 217 | if additional_disks 218 | (1..additional_disks_num).each do |disk_num| 219 | dnum = (disk_num + 1) 220 | ddev = ("node#{nid}_Disk#{dnum}.vdi") 221 | unless File.exist?("#{ddev}") 222 | vb.customize ['createhd', '--filename', ("#{ddev}"), \ 223 | '--variant', 'Fixed', '--size', additional_disks_size * 1024] 224 | end 225 | vb.customize ['storageattach', :id, '--storagectl', \ 226 | "#{additional_disks_controller}", '--port', dnum, '--device', 0, \ 227 | '--type', 'hdd', '--medium', "node#{nid}_Disk#{dnum}.vdi"] 228 | end 229 | end 230 | end 231 | node.vm.hostname = "node#{nid}" 232 | 233 | # Define additional network adapters below 234 | if additional_nics 235 | if not enable_additional_nic_assignments 236 | if not additional_nics_dhcp 237 | (1..additional_nics_num).each do |nic_num| 238 | if random_ips 239 | nnum = Random.rand(0..50) 240 | if additional_nics_auto_config 241 | node.vm.network :private_network, \ 242 | ip: subnet+"#{subnet_ip_start + nid + nnum}" 243 | end 244 | if not additional_nics_auto_config 245 | node.vm.network :private_network, \ 246 | ip: subnet+"#{subnet_ip_start + nid + nnum}", 247 | auto_config: false 248 | end 249 | end 250 | if not random_ips 251 | if additional_nics_auto_config 252 | node.vm.network :private_network, \ 253 | ip: subnet+"#{subnet_ip_start + nid + nic_num}" 254 | end 255 | if not additional_nics_auto_config 256 | node.vm.network :private_network, \ 257 | ip: subnet+"#{subnet_ip_start + nid}", 258 | auto_config: false 259 | end 260 | end 261 | end 262 | end 263 | if additional_nics_dhcp 264 | (1..additional_nics_num).each do |nic_num| 265 | node.vm.network :private_network, type: "dhcp" 266 | end 267 | end 268 | end 269 | if enable_additional_nic_assignments 270 | additional_nic_assignments.each do |an| 271 | if an[:node] == "node#{nid}" 272 | if an[:network_name] == "None" 273 | node.vm.network :private_network, \ 274 | ip: an[:ip], \ 275 | auto_config: an[:auto_config] 276 | end 277 | if an[:network_name] != "None" 278 | node.vm.network :private_network, \ 279 | virtualbox__intnet: an[:network_name], \ 280 | ip: an[:ip], \ 281 | auto_config: an[:auto_config] 282 | end 283 | end 284 | end 285 | end 286 | end 287 | 288 | # Define port forwards below 289 | if enable_port_forwards 290 | port_forwards.each do |pf| 291 | if pf[:node] == "node#{nid}" 292 | node.vm.network :forwarded_port, guest: pf[:guest], \ 293 | host: pf[:host] 294 | end 295 | end 296 | end 297 | 298 | # Provisioners 299 | if provision_nodes 300 | if node_id == N 301 | node.vm.provision "ansible" do |ansible| 302 | ansible.limit = "all" 303 | #runs bootstrap Ansible playbook 304 | ansible.playbook = "bootstrap.yml" 305 | end 306 | node.vm.provision "ansible" do |ansible| 307 | ansible.limit = "all" 308 | #runs Ansible playbook for installing roles/executing tasks 309 | ansible.playbook = "playbook.yml" 310 | ansible.groups = ansible_groups 311 | end 312 | end 313 | end 314 | 315 | end 316 | end 317 | if provision_nodes 318 | #runs initial shell script 319 | config.vm.provision :shell, path: "bootstrap.sh", keep_color: "true" 320 | end 321 | end 322 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/underscore.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.3.1 2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. 3 | // Underscore is freely distributable under the MIT license. 4 | // Portions of Underscore are inspired or borrowed from Prototype, 5 | // Oliver Steele's Functional, and John Resig's Micro-Templating. 6 | // For all details and documentation: 7 | // http://documentcloud.github.com/underscore 8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== 9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, 10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= 11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/alabaster.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @import url("basic.css"); 19 | 20 | /* -- page layout ----------------------------------------------------------- */ 21 | 22 | body { 23 | font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; 24 | font-size: 17px; 25 | background-color: white; 26 | color: #000; 27 | margin: 0; 28 | padding: 0; 29 | } 30 | 31 | div.document { 32 | width: 940px; 33 | margin: 30px auto 0 auto; 34 | } 35 | 36 | div.documentwrapper { 37 | float: left; 38 | width: 100%; 39 | } 40 | 41 | div.bodywrapper { 42 | margin: 0 0 0 220px; 43 | } 44 | 45 | div.sphinxsidebar { 46 | width: 220px; 47 | } 48 | 49 | hr { 50 | border: 1px solid #B1B4B6; 51 | } 52 | 53 | div.body { 54 | background-color: #ffffff; 55 | color: #3E4349; 56 | padding: 0 30px 0 30px; 57 | } 58 | 59 | div.body > .section { 60 | text-align: left; 61 | } 62 | 63 | div.footer { 64 | width: 940px; 65 | margin: 20px auto 30px auto; 66 | font-size: 14px; 67 | color: #888; 68 | text-align: right; 69 | } 70 | 71 | div.footer a { 72 | color: #888; 73 | } 74 | 75 | 76 | div.relations { 77 | display: none; 78 | } 79 | 80 | 81 | div.sphinxsidebar a { 82 | color: #444; 83 | text-decoration: none; 84 | border-bottom: 1px dotted #999; 85 | } 86 | 87 | div.sphinxsidebar a:hover { 88 | border-bottom: 1px solid #999; 89 | } 90 | 91 | div.sphinxsidebar { 92 | font-size: 14px; 93 | line-height: 1.5; 94 | } 95 | 96 | div.sphinxsidebarwrapper { 97 | padding: 18px 10px; 98 | } 99 | 100 | div.sphinxsidebarwrapper p.logo { 101 | padding: 0; 102 | margin: -10px 0 0 0px; 103 | text-align: center; 104 | } 105 | 106 | div.sphinxsidebarwrapper h1.logo { 107 | margin-top: -10px; 108 | text-align: center; 109 | margin-bottom: 5px; 110 | text-align: left; 111 | } 112 | 113 | div.sphinxsidebarwrapper h1.logo-name { 114 | margin-top: 0px; 115 | } 116 | 117 | div.sphinxsidebarwrapper p.blurb { 118 | margin-top: 0; 119 | font-style: normal; 120 | } 121 | 122 | div.sphinxsidebar h3, 123 | div.sphinxsidebar h4 { 124 | font-family: 'Garamond', 'Georgia', serif; 125 | color: #444; 126 | font-size: 24px; 127 | font-weight: normal; 128 | margin: 0 0 5px 0; 129 | padding: 0; 130 | } 131 | 132 | div.sphinxsidebar h4 { 133 | font-size: 20px; 134 | } 135 | 136 | div.sphinxsidebar h3 a { 137 | color: #444; 138 | } 139 | 140 | div.sphinxsidebar p.logo a, 141 | div.sphinxsidebar h3 a, 142 | div.sphinxsidebar p.logo a:hover, 143 | div.sphinxsidebar h3 a:hover { 144 | border: none; 145 | } 146 | 147 | div.sphinxsidebar p { 148 | color: #555; 149 | margin: 10px 0; 150 | } 151 | 152 | div.sphinxsidebar ul { 153 | margin: 10px 0; 154 | padding: 0; 155 | color: #000; 156 | } 157 | 158 | div.sphinxsidebar ul li.toctree-l1 > a { 159 | font-size: 120%; 160 | } 161 | 162 | div.sphinxsidebar ul li.toctree-l2 > a { 163 | font-size: 110%; 164 | } 165 | 166 | div.sphinxsidebar input { 167 | border: 1px solid #CCC; 168 | font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; 169 | font-size: 1em; 170 | } 171 | 172 | div.sphinxsidebar hr { 173 | border: none; 174 | height: 1px; 175 | color: #AAA; 176 | background: #AAA; 177 | 178 | text-align: left; 179 | margin-left: 0; 180 | width: 50%; 181 | } 182 | 183 | /* -- body styles ----------------------------------------------------------- */ 184 | 185 | a { 186 | color: #004B6B; 187 | text-decoration: underline; 188 | } 189 | 190 | a:hover { 191 | color: #6D4100; 192 | text-decoration: underline; 193 | } 194 | 195 | div.body h1, 196 | div.body h2, 197 | div.body h3, 198 | div.body h4, 199 | div.body h5, 200 | div.body h6 { 201 | font-family: 'Garamond', 'Georgia', serif; 202 | font-weight: normal; 203 | margin: 30px 0px 10px 0px; 204 | padding: 0; 205 | } 206 | 207 | div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } 208 | div.body h2 { font-size: 180%; } 209 | div.body h3 { font-size: 150%; } 210 | div.body h4 { font-size: 130%; } 211 | div.body h5 { font-size: 100%; } 212 | div.body h6 { font-size: 100%; } 213 | 214 | a.headerlink { 215 | color: #DDD; 216 | padding: 0 4px; 217 | text-decoration: none; 218 | } 219 | 220 | a.headerlink:hover { 221 | color: #444; 222 | background: #EAEAEA; 223 | } 224 | 225 | div.body p, div.body dd, div.body li { 226 | line-height: 1.4em; 227 | } 228 | 229 | div.admonition { 230 | margin: 20px 0px; 231 | padding: 10px 30px; 232 | background-color: #FCC; 233 | border: 1px solid #FAA; 234 | } 235 | 236 | div.admonition tt.xref, div.admonition a tt { 237 | border-bottom: 1px solid #fafafa; 238 | } 239 | 240 | dd div.admonition { 241 | margin-left: -60px; 242 | padding-left: 60px; 243 | } 244 | 245 | div.admonition p.admonition-title { 246 | font-family: 'Garamond', 'Georgia', serif; 247 | font-weight: normal; 248 | font-size: 24px; 249 | margin: 0 0 10px 0; 250 | padding: 0; 251 | line-height: 1; 252 | } 253 | 254 | div.admonition p.last { 255 | margin-bottom: 0; 256 | } 257 | 258 | div.highlight { 259 | background-color: white; 260 | } 261 | 262 | dt:target, .highlight { 263 | background: #FAF3E8; 264 | } 265 | 266 | div.note { 267 | background-color: #EEE; 268 | border: 1px solid #CCC; 269 | } 270 | 271 | div.seealso { 272 | background-color: #EEE; 273 | border: 1px solid #CCC; 274 | } 275 | 276 | div.topic { 277 | background-color: #eee; 278 | } 279 | 280 | p.admonition-title { 281 | display: inline; 282 | } 283 | 284 | p.admonition-title:after { 285 | content: ":"; 286 | } 287 | 288 | pre, tt, code { 289 | font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 290 | font-size: 0.9em; 291 | } 292 | 293 | .hll { 294 | background-color: #FFC; 295 | margin: 0 -12px; 296 | padding: 0 12px; 297 | display: block; 298 | } 299 | 300 | img.screenshot { 301 | } 302 | 303 | tt.descname, tt.descclassname, code.descname, code.descclassname { 304 | font-size: 0.95em; 305 | } 306 | 307 | tt.descname, code.descname { 308 | padding-right: 0.08em; 309 | } 310 | 311 | img.screenshot { 312 | -moz-box-shadow: 2px 2px 4px #eee; 313 | -webkit-box-shadow: 2px 2px 4px #eee; 314 | box-shadow: 2px 2px 4px #eee; 315 | } 316 | 317 | table.docutils { 318 | border: 1px solid #888; 319 | -moz-box-shadow: 2px 2px 4px #eee; 320 | -webkit-box-shadow: 2px 2px 4px #eee; 321 | box-shadow: 2px 2px 4px #eee; 322 | } 323 | 324 | table.docutils td, table.docutils th { 325 | border: 1px solid #888; 326 | padding: 0.25em 0.7em; 327 | } 328 | 329 | table.field-list, table.footnote { 330 | border: none; 331 | -moz-box-shadow: none; 332 | -webkit-box-shadow: none; 333 | box-shadow: none; 334 | } 335 | 336 | table.footnote { 337 | margin: 15px 0; 338 | width: 100%; 339 | border: 1px solid #EEE; 340 | background: #FDFDFD; 341 | font-size: 0.9em; 342 | } 343 | 344 | table.footnote + table.footnote { 345 | margin-top: -15px; 346 | border-top: none; 347 | } 348 | 349 | table.field-list th { 350 | padding: 0 0.8em 0 0; 351 | } 352 | 353 | table.field-list td { 354 | padding: 0; 355 | } 356 | 357 | table.field-list p { 358 | margin-bottom: 0.8em; 359 | } 360 | 361 | table.footnote td.label { 362 | width: 0px; 363 | padding: 0.3em 0 0.3em 0.5em; 364 | } 365 | 366 | table.footnote td { 367 | padding: 0.3em 0.5em; 368 | } 369 | 370 | dl { 371 | margin: 0; 372 | padding: 0; 373 | } 374 | 375 | dl dd { 376 | margin-left: 30px; 377 | } 378 | 379 | blockquote { 380 | margin: 0 0 0 30px; 381 | padding: 0; 382 | } 383 | 384 | ul, ol { 385 | margin: 10px 0 10px 30px; 386 | padding: 0; 387 | } 388 | 389 | pre { 390 | background: #EEE; 391 | padding: 7px 30px; 392 | margin: 15px 0px; 393 | line-height: 1.3em; 394 | } 395 | 396 | dl pre, blockquote pre, li pre { 397 | margin-left: 0; 398 | padding-left: 30px; 399 | } 400 | 401 | dl dl pre { 402 | margin-left: -90px; 403 | padding-left: 90px; 404 | } 405 | 406 | tt, code { 407 | background-color: #ecf0f3; 408 | color: #222; 409 | /* padding: 1px 2px; */ 410 | } 411 | 412 | tt.xref, code.xref, a tt { 413 | background-color: #FBFBFB; 414 | border-bottom: 1px solid white; 415 | } 416 | 417 | a.reference { 418 | text-decoration: none; 419 | border-bottom: 1px dotted #004B6B; 420 | } 421 | 422 | a.reference:hover { 423 | border-bottom: 1px solid #6D4100; 424 | } 425 | 426 | a.footnote-reference { 427 | text-decoration: none; 428 | font-size: 0.7em; 429 | vertical-align: top; 430 | border-bottom: 1px dotted #004B6B; 431 | } 432 | 433 | a.footnote-reference:hover { 434 | border-bottom: 1px solid #6D4100; 435 | } 436 | 437 | a:hover tt, a:hover code { 438 | background: #EEE; 439 | } 440 | 441 | 442 | @media screen and (max-width: 870px) { 443 | 444 | div.sphinxsidebar { 445 | display: none; 446 | } 447 | 448 | div.document { 449 | width: 100%; 450 | 451 | } 452 | 453 | div.documentwrapper { 454 | margin-left: 0; 455 | margin-top: 0; 456 | margin-right: 0; 457 | margin-bottom: 0; 458 | } 459 | 460 | div.bodywrapper { 461 | margin-top: 0; 462 | margin-right: 0; 463 | margin-bottom: 0; 464 | margin-left: 0; 465 | } 466 | 467 | ul { 468 | margin-left: 0; 469 | } 470 | 471 | .document { 472 | width: auto; 473 | } 474 | 475 | .footer { 476 | width: auto; 477 | } 478 | 479 | .bodywrapper { 480 | margin: 0; 481 | } 482 | 483 | .footer { 484 | width: auto; 485 | } 486 | 487 | .github { 488 | display: none; 489 | } 490 | 491 | 492 | 493 | } 494 | 495 | 496 | 497 | @media screen and (max-width: 875px) { 498 | 499 | body { 500 | margin: 0; 501 | padding: 20px 30px; 502 | } 503 | 504 | div.documentwrapper { 505 | float: none; 506 | background: white; 507 | } 508 | 509 | div.sphinxsidebar { 510 | display: block; 511 | float: none; 512 | width: 102.5%; 513 | margin: 50px -30px -20px -30px; 514 | padding: 10px 20px; 515 | background: #333; 516 | color: #FFF; 517 | } 518 | 519 | div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, 520 | div.sphinxsidebar h3 a { 521 | color: white; 522 | } 523 | 524 | div.sphinxsidebar a { 525 | color: #AAA; 526 | } 527 | 528 | div.sphinxsidebar p.logo { 529 | display: none; 530 | } 531 | 532 | div.document { 533 | width: 100%; 534 | margin: 0; 535 | } 536 | 537 | div.footer { 538 | display: none; 539 | } 540 | 541 | div.bodywrapper { 542 | margin: 0; 543 | } 544 | 545 | div.body { 546 | min-height: 0; 547 | padding: 0; 548 | } 549 | 550 | .rtd_doc_footer { 551 | display: none; 552 | } 553 | 554 | .document { 555 | width: auto; 556 | } 557 | 558 | .footer { 559 | width: auto; 560 | } 561 | 562 | .footer { 563 | width: auto; 564 | } 565 | 566 | .github { 567 | display: none; 568 | } 569 | } 570 | 571 | 572 | /* misc. */ 573 | 574 | .revsys-inline { 575 | display: none!important; 576 | } 577 | 578 | /* Make nested-list/multi-paragraph items look better in Releases changelog 579 | * pages. Without this, docutils' magical list fuckery causes inconsistent 580 | * formatting between different release sub-lists. 581 | */ 582 | div#changelog > div.section > ul > li > p:only-child { 583 | margin-bottom: 0; 584 | } 585 | 586 | /* Hide fugly table cell borders in ..bibliography:: directive output */ 587 | table.docutils.citation, table.docutils.citation td, table.docutils.citation th { 588 | border: none; 589 | /* Below needed in some edge cases; if not applied, bottom shadows appear */ 590 | -moz-box-shadow: none; 591 | -webkit-box-shadow: none; 592 | box-shadow: none; 593 | } -------------------------------------------------------------------------------- /roles/ansible-bootstrap/docs/_build/html/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | /* -- relbar ---------------------------------------------------------------- */ 19 | 20 | div.related { 21 | width: 100%; 22 | font-size: 90%; 23 | } 24 | 25 | div.related h3 { 26 | display: none; 27 | } 28 | 29 | div.related ul { 30 | margin: 0; 31 | padding: 0 0 0 10px; 32 | list-style: none; 33 | } 34 | 35 | div.related li { 36 | display: inline; 37 | } 38 | 39 | div.related li.right { 40 | float: right; 41 | margin-right: 5px; 42 | } 43 | 44 | /* -- sidebar --------------------------------------------------------------- */ 45 | 46 | div.sphinxsidebarwrapper { 47 | padding: 10px 5px 0 10px; 48 | } 49 | 50 | div.sphinxsidebar { 51 | float: left; 52 | width: 230px; 53 | margin-left: -100%; 54 | font-size: 90%; 55 | } 56 | 57 | div.sphinxsidebar ul { 58 | list-style: none; 59 | } 60 | 61 | div.sphinxsidebar ul ul, 62 | div.sphinxsidebar ul.want-points { 63 | margin-left: 20px; 64 | list-style: square; 65 | } 66 | 67 | div.sphinxsidebar ul ul { 68 | margin-top: 0; 69 | margin-bottom: 0; 70 | } 71 | 72 | div.sphinxsidebar form { 73 | margin-top: 10px; 74 | } 75 | 76 | div.sphinxsidebar input { 77 | border: 1px solid #98dbcc; 78 | font-family: sans-serif; 79 | font-size: 1em; 80 | } 81 | 82 | div.sphinxsidebar #searchbox input[type="text"] { 83 | width: 170px; 84 | } 85 | 86 | div.sphinxsidebar #searchbox input[type="submit"] { 87 | width: 30px; 88 | } 89 | 90 | img { 91 | border: 0; 92 | max-width: 100%; 93 | } 94 | 95 | /* -- search page ----------------------------------------------------------- */ 96 | 97 | ul.search { 98 | margin: 10px 0 0 20px; 99 | padding: 0; 100 | } 101 | 102 | ul.search li { 103 | padding: 5px 0 5px 20px; 104 | background-image: url(file.png); 105 | background-repeat: no-repeat; 106 | background-position: 0 7px; 107 | } 108 | 109 | ul.search li a { 110 | font-weight: bold; 111 | } 112 | 113 | ul.search li div.context { 114 | color: #888; 115 | margin: 2px 0 0 30px; 116 | text-align: left; 117 | } 118 | 119 | ul.keywordmatches li.goodmatch a { 120 | font-weight: bold; 121 | } 122 | 123 | /* -- index page ------------------------------------------------------------ */ 124 | 125 | table.contentstable { 126 | width: 90%; 127 | } 128 | 129 | table.contentstable p.biglink { 130 | line-height: 150%; 131 | } 132 | 133 | a.biglink { 134 | font-size: 1.3em; 135 | } 136 | 137 | span.linkdescr { 138 | font-style: italic; 139 | padding-top: 5px; 140 | font-size: 90%; 141 | } 142 | 143 | /* -- general index --------------------------------------------------------- */ 144 | 145 | table.indextable { 146 | width: 100%; 147 | } 148 | 149 | table.indextable td { 150 | text-align: left; 151 | vertical-align: top; 152 | } 153 | 154 | table.indextable dl, table.indextable dd { 155 | margin-top: 0; 156 | margin-bottom: 0; 157 | } 158 | 159 | table.indextable tr.pcap { 160 | height: 10px; 161 | } 162 | 163 | table.indextable tr.cap { 164 | margin-top: 10px; 165 | background-color: #f2f2f2; 166 | } 167 | 168 | img.toggler { 169 | margin-right: 3px; 170 | margin-top: 3px; 171 | cursor: pointer; 172 | } 173 | 174 | div.modindex-jumpbox { 175 | border-top: 1px solid #ddd; 176 | border-bottom: 1px solid #ddd; 177 | margin: 1em 0 1em 0; 178 | padding: 0.4em; 179 | } 180 | 181 | div.genindex-jumpbox { 182 | border-top: 1px solid #ddd; 183 | border-bottom: 1px solid #ddd; 184 | margin: 1em 0 1em 0; 185 | padding: 0.4em; 186 | } 187 | 188 | /* -- general body styles --------------------------------------------------- */ 189 | 190 | a.headerlink { 191 | visibility: hidden; 192 | } 193 | 194 | h1:hover > a.headerlink, 195 | h2:hover > a.headerlink, 196 | h3:hover > a.headerlink, 197 | h4:hover > a.headerlink, 198 | h5:hover > a.headerlink, 199 | h6:hover > a.headerlink, 200 | dt:hover > a.headerlink, 201 | caption:hover > a.headerlink, 202 | p.caption:hover > a.headerlink, 203 | div.code-block-caption:hover > a.headerlink { 204 | visibility: visible; 205 | } 206 | 207 | div.body p.caption { 208 | text-align: inherit; 209 | } 210 | 211 | div.body td { 212 | text-align: left; 213 | } 214 | 215 | .field-list ul { 216 | padding-left: 1em; 217 | } 218 | 219 | .first { 220 | margin-top: 0 !important; 221 | } 222 | 223 | p.rubric { 224 | margin-top: 30px; 225 | font-weight: bold; 226 | } 227 | 228 | img.align-left, .figure.align-left, object.align-left { 229 | clear: left; 230 | float: left; 231 | margin-right: 1em; 232 | } 233 | 234 | img.align-right, .figure.align-right, object.align-right { 235 | clear: right; 236 | float: right; 237 | margin-left: 1em; 238 | } 239 | 240 | img.align-center, .figure.align-center, object.align-center { 241 | display: block; 242 | margin-left: auto; 243 | margin-right: auto; 244 | } 245 | 246 | .align-left { 247 | text-align: left; 248 | } 249 | 250 | .align-center { 251 | text-align: center; 252 | } 253 | 254 | .align-right { 255 | text-align: right; 256 | } 257 | 258 | /* -- sidebars -------------------------------------------------------------- */ 259 | 260 | div.sidebar { 261 | margin: 0 0 0.5em 1em; 262 | border: 1px solid #ddb; 263 | padding: 7px 7px 0 7px; 264 | background-color: #ffe; 265 | width: 40%; 266 | float: right; 267 | } 268 | 269 | p.sidebar-title { 270 | font-weight: bold; 271 | } 272 | 273 | /* -- topics ---------------------------------------------------------------- */ 274 | 275 | div.topic { 276 | border: 1px solid #ccc; 277 | padding: 7px 7px 0 7px; 278 | margin: 10px 0 10px 0; 279 | } 280 | 281 | p.topic-title { 282 | font-size: 1.1em; 283 | font-weight: bold; 284 | margin-top: 10px; 285 | } 286 | 287 | /* -- admonitions ----------------------------------------------------------- */ 288 | 289 | div.admonition { 290 | margin-top: 10px; 291 | margin-bottom: 10px; 292 | padding: 7px; 293 | } 294 | 295 | div.admonition dt { 296 | font-weight: bold; 297 | } 298 | 299 | div.admonition dl { 300 | margin-bottom: 0; 301 | } 302 | 303 | p.admonition-title { 304 | margin: 0px 10px 5px 0px; 305 | font-weight: bold; 306 | } 307 | 308 | div.body p.centered { 309 | text-align: center; 310 | margin-top: 25px; 311 | } 312 | 313 | /* -- tables ---------------------------------------------------------------- */ 314 | 315 | table.docutils { 316 | border: 0; 317 | border-collapse: collapse; 318 | } 319 | 320 | table caption span.caption-number { 321 | font-style: italic; 322 | } 323 | 324 | table caption span.caption-text { 325 | } 326 | 327 | table.docutils td, table.docutils th { 328 | padding: 1px 8px 1px 5px; 329 | border-top: 0; 330 | border-left: 0; 331 | border-right: 0; 332 | border-bottom: 1px solid #aaa; 333 | } 334 | 335 | table.field-list td, table.field-list th { 336 | border: 0 !important; 337 | } 338 | 339 | table.footnote td, table.footnote th { 340 | border: 0 !important; 341 | } 342 | 343 | th { 344 | text-align: left; 345 | padding-right: 5px; 346 | } 347 | 348 | table.citation { 349 | border-left: solid 1px gray; 350 | margin-left: 1px; 351 | } 352 | 353 | table.citation td { 354 | border-bottom: none; 355 | } 356 | 357 | /* -- figures --------------------------------------------------------------- */ 358 | 359 | div.figure { 360 | margin: 0.5em; 361 | padding: 0.5em; 362 | } 363 | 364 | div.figure p.caption { 365 | padding: 0.3em; 366 | } 367 | 368 | div.figure p.caption span.caption-number { 369 | font-style: italic; 370 | } 371 | 372 | div.figure p.caption span.caption-text { 373 | } 374 | 375 | 376 | /* -- other body styles ----------------------------------------------------- */ 377 | 378 | ol.arabic { 379 | list-style: decimal; 380 | } 381 | 382 | ol.loweralpha { 383 | list-style: lower-alpha; 384 | } 385 | 386 | ol.upperalpha { 387 | list-style: upper-alpha; 388 | } 389 | 390 | ol.lowerroman { 391 | list-style: lower-roman; 392 | } 393 | 394 | ol.upperroman { 395 | list-style: upper-roman; 396 | } 397 | 398 | dl { 399 | margin-bottom: 15px; 400 | } 401 | 402 | dd p { 403 | margin-top: 0px; 404 | } 405 | 406 | dd ul, dd table { 407 | margin-bottom: 10px; 408 | } 409 | 410 | dd { 411 | margin-top: 3px; 412 | margin-bottom: 10px; 413 | margin-left: 30px; 414 | } 415 | 416 | dt:target, .highlighted { 417 | background-color: #fbe54e; 418 | } 419 | 420 | dl.glossary dt { 421 | font-weight: bold; 422 | font-size: 1.1em; 423 | } 424 | 425 | .field-list ul { 426 | margin: 0; 427 | padding-left: 1em; 428 | } 429 | 430 | .field-list p { 431 | margin: 0; 432 | } 433 | 434 | .optional { 435 | font-size: 1.3em; 436 | } 437 | 438 | .sig-paren { 439 | font-size: larger; 440 | } 441 | 442 | .versionmodified { 443 | font-style: italic; 444 | } 445 | 446 | .system-message { 447 | background-color: #fda; 448 | padding: 5px; 449 | border: 3px solid red; 450 | } 451 | 452 | .footnote:target { 453 | background-color: #ffa; 454 | } 455 | 456 | .line-block { 457 | display: block; 458 | margin-top: 1em; 459 | margin-bottom: 1em; 460 | } 461 | 462 | .line-block .line-block { 463 | margin-top: 0; 464 | margin-bottom: 0; 465 | margin-left: 1.5em; 466 | } 467 | 468 | .guilabel, .menuselection { 469 | font-family: sans-serif; 470 | } 471 | 472 | .accelerator { 473 | text-decoration: underline; 474 | } 475 | 476 | .classifier { 477 | font-style: oblique; 478 | } 479 | 480 | abbr, acronym { 481 | border-bottom: dotted 1px; 482 | cursor: help; 483 | } 484 | 485 | /* -- code displays --------------------------------------------------------- */ 486 | 487 | pre { 488 | overflow: auto; 489 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 490 | } 491 | 492 | td.linenos pre { 493 | padding: 5px 0px; 494 | border: 0; 495 | background-color: transparent; 496 | color: #aaa; 497 | } 498 | 499 | table.highlighttable { 500 | margin-left: 0.5em; 501 | } 502 | 503 | table.highlighttable td { 504 | padding: 0 0.5em 0 0.5em; 505 | } 506 | 507 | div.code-block-caption { 508 | padding: 2px 5px; 509 | font-size: small; 510 | } 511 | 512 | div.code-block-caption code { 513 | background-color: transparent; 514 | } 515 | 516 | div.code-block-caption + div > div.highlight > pre { 517 | margin-top: 0; 518 | } 519 | 520 | div.code-block-caption span.caption-number { 521 | padding: 0.1em 0.3em; 522 | font-style: italic; 523 | } 524 | 525 | div.code-block-caption span.caption-text { 526 | } 527 | 528 | div.literal-block-wrapper { 529 | padding: 1em 1em 0; 530 | } 531 | 532 | div.literal-block-wrapper div.highlight { 533 | margin: 0; 534 | } 535 | 536 | code.descname { 537 | background-color: transparent; 538 | font-weight: bold; 539 | font-size: 1.2em; 540 | } 541 | 542 | code.descclassname { 543 | background-color: transparent; 544 | } 545 | 546 | code.xref, a code { 547 | background-color: transparent; 548 | font-weight: bold; 549 | } 550 | 551 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 552 | background-color: transparent; 553 | } 554 | 555 | .viewcode-link { 556 | float: right; 557 | } 558 | 559 | .viewcode-back { 560 | float: right; 561 | font-family: sans-serif; 562 | } 563 | 564 | div.viewcode-block:target { 565 | margin: -1px -10px; 566 | padding: 0 10px; 567 | } 568 | 569 | /* -- math display ---------------------------------------------------------- */ 570 | 571 | img.math { 572 | vertical-align: middle; 573 | } 574 | 575 | div.body div.math p { 576 | text-align: center; 577 | } 578 | 579 | span.eqno { 580 | float: right; 581 | } 582 | 583 | /* -- printout stylesheet --------------------------------------------------- */ 584 | 585 | @media print { 586 | div.document, 587 | div.documentwrapper, 588 | div.bodywrapper { 589 | margin: 0 !important; 590 | width: 100%; 591 | } 592 | 593 | div.sphinxsidebar, 594 | div.related, 595 | div.footer, 596 | #top-link { 597 | display: none; 598 | } 599 | } --------------------------------------------------------------------------------