Added substitution variable support.
[snaps.git] / snaps / provisioning / ansible_pb / ubuntu-network-setup / playbooks / configure_host.yml
1 # Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs")
2 #                    and others.  All rights reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 ---
16 - name: Configure NIC
17   hosts: all
18   become: yes
19   become_method: sudo
20   become_user: root
21
22   tasks:
23    - name: Setup /etc/network/interfaces.d/{{nic_name}}.cfg file
24      action: template owner=root group=root mode=644 src=../templates/ethN.cfg dest=/etc/network/interfaces.d/{{nic_name}}.cfg
25    - name : Restart Network
26      command: service networking restart