-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Added a BYO playbook for configuring NetworkManager on nodes #2771
Added a BYO playbook for configuring NetworkManager on nodes #2771
Conversation
2af4188
to
ef0d5af
Compare
|
||
- name: determine the default interface | ||
shell: "/sbin/ip route get to {{ default_route.stdout }} | awk '{print $3}'" | ||
register: default_interface |
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.
Isn't it simpler to use ansible_default_ipv4['interface'] ?
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 think I copied this step from where-ever else this project was looking up the default interface. If that variable is what we want (why not IPv6?) then I will switch it over, sure.
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.
We could get ipv6 as well, but as "/sbin/ip route list match 0.0.0.0/0" will return ip v4, I assumed that's what was required.
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 see, understood. @sdodson does using the ansible_default_ipv4['interface']
fact seem reasonable here for you as well?
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.
@stevekuznetsov it does.
state: present | ||
create: yes | ||
with_items: | ||
- regexp: '^USE_PEERDNS=' |
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.
What about:
lineinfile:
dest: '/etc/sysconfig/network-scripts/ifcfg-{{ default_interface.stdout }}'
regexp: '^{{ item }}='
line: '^{{ item }}=yes'
state: present
create: yes
with_items:
- 'USE_PEERDNS'
- 'NM_CONTROLLED'
So one can avoid repetition, and directly abstract the configuration we want to be at 'yes' ?
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.
Sure, that collapses nicely
In order to do a full install of OpenShfit using the byo/config.yml playbook, it is currently required that NetworkManager be installed and configured on the nodes prior to the installation. This playbook introduces a very simple default configuration that can be used to install, configure and enable NetworkManager on their nodes. Signed-off-by: Steve Kuznetsov <[email protected]>
ef0d5af
to
9af7aa9
Compare
@mscherer addressed your comments |
In order to do a full install of OpenShfit using the byo/config.yml
playbook, it is currently required that NetworkManager be installed
and configured on the nodes prior to the installation. This playbook
introduces a very simple default configuration that can be used to
install, configure and enable NetworkManager on their nodes.
Signed-off-by: Steve Kuznetsov [email protected]
@sdodson PTAL