Make the networkd role distro agnostic

To make this role distro agnostic all of the variable configs have
been moved into defaults which will source private variables when
available using distro specific configs. This change will make it
possible to run this role on any distro, even if there's no distro
specific variable files.

Change-Id: I547edd2052c7e136b79d99e1b8e75e3aee68689d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-05-14 15:26:00 -05:00
parent f402427b98
commit 1cb76ab4ca
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
5 changed files with 28 additions and 10 deletions

View File

@ -119,3 +119,24 @@ systemd_networks: []
# Cache: yes # Cache: yes
systemd_resolved: {} systemd_resolved: {}
# Enable or Disable the availability of systemd-resolved. This option is a
# Boolean variable.
systemd_resolved_available: "{{ _systemd_resolved_available | default(true) }}"
# Specify the command used to update the initramfs. By default this will run
# "/bin/true" which is done because the command required to run should never
# be assumed. Distro specific config is available in vars otherwise deployers
# can set this as needed.
systemd_networkd_update_initramfs: "{{ _systemd_networkd_update_initramfs | default('true') }}"
# Provide a list of packages that are to be installed before this role is
# executed.
# _systemd_networkd_distro_packages:
# - systemd-networkd
# - systemd-resolved
systemd_networkd_distro_packages: "{{ _systemd_networkd_distro_packages | default([]) }}"

View File

@ -15,6 +15,3 @@
## APT Cache options ## APT Cache options
cache_timeout: 600 cache_timeout: 600
# Supporting package required to make systemd-networkd function
systemd_networkd_distro_packages: []

View File

@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
systemd_networkd_distro_packages: _systemd_networkd_distro_packages:
- systemd-networkd - systemd-networkd
- systemd-resolved - systemd-resolved
systemd_resolved_available: true _systemd_resolved_available: true
systemd_networkd_update_initramfs: "dracut -f" _systemd_networkd_update_initramfs: "dracut -f"

View File

@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
systemd_resolved_available: false _systemd_resolved_available: false
systemd_networkd_update_initramfs: "dracut -f" _systemd_networkd_update_initramfs: "dracut -f"

View File

@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
systemd_resolved_available: true _systemd_resolved_available: true
systemd_networkd_update_initramfs: "/usr/sbin/update-initramfs -u" _systemd_networkd_update_initramfs: "/usr/sbin/update-initramfs -u"