-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
360 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,3 +106,4 @@ pip-selfcheck.json | |
| .retry | ||
| group_vars/vmware | ||
| *.ova | ||
| *.iso | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| --- | ||
| - name: generate dhcpd.hosts entries | ||
| hosts: srlab | ||
| gather_facts: no | ||
| vars_files: group_vars/vmware | ||
| tasks: | ||
| - name: gather facts | ||
| delegate_to: localhost | ||
| vmware_guest_facts: | ||
| hostname: "{{ vcenter_hostname }}" | ||
| username: "{{ vcenter_username }}" | ||
| password: "{{ vcenter_password }}" | ||
| # esxi_hostname: "{{ esxi_hostname }}" | ||
| validate_certs: False | ||
| # datastore: "host 2 - datastore 2" | ||
| datacenter: "NS Lab" | ||
| # cluster: "NS Lab" | ||
| name: "{{ inventory_hostname }}-vcp" | ||
| register: facts | ||
| - name: edit dhcpd.hosts | ||
| blockinfile: | ||
| path: /etc/dhcp/dhcpd.hosts | ||
| block: | | ||
| host {{ inventory_hostname }} { | ||
| hardware ethernet {{ facts.instance.hw_eth0.macaddress }}; | ||
| fixed-address {{ ansible_host }}; | ||
| option JUNOS.transfer-mode "http"; | ||
| option JUNOS.config-file-name "{{ inventory_hostname }}.conf"; | ||
| } | ||
| marker: "# {mark} ANSIBLE MANAGED BLOCK {{ inventory_hostname }}" | ||
| delegate_to: dhcpd | ||
| become: True | ||
| - name: restart dhcpd | ||
| systemd: | ||
| name: isc-dhcp-server | ||
| state: restarted | ||
| delegate_to: dhcpd | ||
| become: True | ||
| run_once: True | ||
| - name: deploy vmx configs | ||
| template: | ||
| src: templates/vmx_base.conf.j2 | ||
| dest: "/var/www/html/{{ inventory_hostname }}.conf" | ||
| mode: 0644 | ||
| delegate_to: dhcpd | ||
| become: True |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,32 @@ | ||
| --- | ||
| # This playbook just apply debops.dhcpd Role to a target node. | ||
| - name: Infrastructure Services [DHCP server] | ||
| - name: Deploy Infrastructure Services [DHCP server] | ||
| hosts: dhcpd | ||
| become: True | ||
|
|
||
| vars_files: | ||
| - vars-dhcpd.yml | ||
|
|
||
| roles: | ||
| - role: debops.dhcpd | ||
| tags: dhcpd | ||
| tasks: | ||
| - name: Install ISC dhcpd | ||
| apt: | ||
| name: isc-dhcp-server | ||
| update_cache: yes | ||
| - name: copy dhcpd.conf | ||
| template: | ||
| src: templates/dhcpd.conf.j2 | ||
| dest: /etc/dhcp/dhcpd.conf | ||
| mode: 0644 | ||
| - name: create dhcpd.hosts | ||
| copy: | ||
| content: "" | ||
| dest: /etc/dhcp/dhcpd.hosts | ||
| force: no | ||
| mode: 0644 | ||
| - name: restart dhcpd | ||
| service: | ||
| name: isc-dhcp-server | ||
| state: restarted | ||
| - name: Install nginx | ||
| apt: | ||
| name: nginx | ||
| update_cache: yes | ||
| - name: start nginx | ||
| service: | ||
| name: nginx | ||
| state: started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.