-
Notifications
You must be signed in to change notification settings - Fork 4
Pxe toucheup #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CarlFK
wants to merge
21
commits into
master
Choose a base branch
from
pxe-toucheup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pxe toucheup #3
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f6248d9
smooth over rough edges to make testing and extension easier
CarlFK 0c6df08
fix missing space typo
CarlFK 064e19b
tweak the regex to only catch the first append line in txt.cfg.
CarlFK 7a7757f
setup preseed for both jessie and xenial (sort of).
CarlFK 9f3f49a
use CarlFK's pending PR repos
CarlFK cc25503
use default protocol (httl) and max the installer debug level
CarlFK 5eae9b1
Debian installer constructs FQDN, so resolve it too.
CarlFK 783185c
hammer in ansible 2.2, make elegant later.
CarlFK 0e3e70a
Fix line-oh.
CarlFK 8c64cc7
use correct git command to checkout a branch.
CarlFK d4a102b
only test dc roles
CarlFK f9671dc
move disk=hda to boot params for on the fly adjustment.
CarlFK 6ef063b
sda is a better default than hda.
CarlFK 3275ffa
grub-ipxe makes testing pxe easier
CarlFK fc635af
chagne ansible_distribution to distro so that a Ubuntu box can instal…
CarlFK 157e33c
stretch not jessie
CarlFK 42025c6
ansible in main repos is 2.2.x, that's good.
CarlFK f018e67
Add dupport for minicom
CarlFK a5d09fe
run preseed so we cna see stdout.
CarlFK c54c339
moved things to be easeir to read
CarlFK fd59a81
default and document distro var
CarlFK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -8,3 +8,6 @@ dhcp-boot=pxelinux.0 | |
| dhcp-authoritative | ||
| enable-tftp | ||
| tftp-root=/srv/tftp | ||
| no-hosts | ||
| host-record={{ inventory_hostname }},{{ eth_local_ip_address }} | ||
| host-record={{ inventory_hostname }}.{{ domain }},{{ eth_local_ip_address }} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the point of having the machine return itself in DNS, but nothing else? |
||
This file contains hidden or 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,3 +1,4 @@ | ||
| --- | ||
| - name: restart systemd-journald | ||
| command: systemctl restart systemd-journald | ||
| when: ansible_env.ANSIBLE_UNDER_DI is undefined |
This file contains hidden or 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 hidden or 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,38 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -eufx | ||
|
|
||
| # This script setups ansible and runs it | ||
| # It should be ran at the end of the basic installation of a machine | ||
|
|
||
| # apt install -y software-properties-common | ||
| # apt-add-repository --yes --update "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" | ||
| # apt-add-repository --yes --update ppa:ansible/ansible | ||
|
|
||
| apt install -y ansible git eatmydata | ||
|
|
||
| # We clone our ansible repository and copy the ansible config files | ||
|
|
||
| # git clone https://anonscm.debian.org/git/debconf-video/ansible.git /root/debconf-ansible | ||
| git clone https://github.com/CarlFK/video-stack-deploy.git /root/debconf-ansible | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This, and many other things in this file, should be templated. |
||
| cd /root/debconf-ansible | ||
| git checkout pxe-toucheup | ||
| cd - | ||
|
|
||
| git clone https://github.com/xfxf/av-foss-stack.git /root/lca2017-av | ||
|
|
||
| ln -s /root/lca2017-av/inventory/ansible-up.sh /usr/local/sbin/ansible-up | ||
|
|
||
| # not sure why sometimes this is only needed when I run from a prompt in the installer shell, | ||
| # but the istaller doesn't. or something. I'm not sure when it is needed. | ||
| mkdir /dev/shm | ||
| echo "none /dev/shm tmpfs rw,nosuid,nodev,noexec,noauto 0 0" >> /etc/fstab | ||
| mount /dev/shm | ||
|
|
||
| # Aaaand we run ansible | ||
| eatmydata ansible-playbook \ | ||
| -vvvv \ | ||
| --connection=local \ | ||
| --limit=$(hostname) \ | ||
| --inventory-file=/root/lca2017-av/inventory/hosts \ | ||
| /root/debconf-ansible/site.yml | ||
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're using our static hosts stuff, then we'll probably want to serve those over DNS too. wouldn't we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a bit of a contradiction. or redundancy. it is either addressing a case that will never exist, or addressing the case where things are broken. If /etc/hosts is in place, then we don't need dns.
however, even with static, dns can serve everything by putting a 2nd almost copy of the data in a file. almost = different IP for $server
I like putting the name:IP data in it's own file that is just for the dns, not also /etc/hosts.
Mainly because of waning $server:IP to be defined as something other than 127.0.1.1 like it is in /etc/hosts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That. You saw how it was useful at LCA, when we didn't have a global network, yet. Things still worked inside rooms. And we could ssh into things by hostname, because there was DNS with this stuff in it.
Sure. But we can just solve all of this by changing the server's IP in its own /etc/hosts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the server's IP in its own /etc/hosts
I went down that path and got angry :p
d-i builds this:
juser@dc10b:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 dc10b
is ...1.1 needed?
I made a task using lineinfile but my code kept adding additional "ip \t host" lines each time I re-ran. so I switched to not using etc/hosts and using a separate file for dnsmasq and was happy.
I have mixed feelings about dnsmasq using etc/hosts.
give me the ansible to just solve all of this and I'll give it a whirl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only effects the dhcp server. it separates the dns config from the servers etc/hosts, andI am ok with that.
replacing "127.0.1.1 dc10b" is too hard for me, and I don't see much benefit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't like this change, I find it useful to be able to ssh into machines by hostname, on the video network.