---

- name: Configuration for Stepup-VM
  hosts: all
  become: True
  gather_facts: False
  serial: 1

  tasks:
      - name: Set yum cache dir to /vagrant/yum/... dir (that is mounted on the host)
        lineinfile: dest=/etc/yum.conf regexp=^cachedir= line=cachedir=/vagrant/yum/$basearch/$releasever

      - name: Set keepcache=1
        lineinfile: dest=/etc/yum.conf regexp=^keepcache= line=keepcache=1

      - name: Exclude kernel packages in yum
        lineinfile: dest=/etc/yum.conf regexp=^exclude=kernel line=exclude=kernel*

---

- name: Configuration for Stepup-VM
  hosts: all
  become: True
  gather_facts: False
  serial: 1

  tasks:
      - name: Set yum cache dir to /vagrant/yum/... dir (that is mounted on the host)
        lineinfile: dest=/etc/yum.conf regexp=^cachedir= line=cachedir=/vagrant/yum/$basearch/$releasever

      - name: Set keepcache=1
        lineinfile: dest=/etc/yum.conf regexp=^keepcache= line=keepcache=1

      - name: Exclude kernel packages in yum
        lineinfile: dest=/etc/yum.conf regexp=^exclude=kernel line=exclude=kernel*

      - name: Create ens32 config in /etc/sysconfig/network-scripts/ifcfg-ens32
        copy:
            dest: /etc/sysconfig/network-scripts/ifcfg-ens32
            content: |
                DEVICE="ens32"
                BOOTPROTO=dhcp
                NM_CONTROLLED="no"
                PERSISTENT_DHCLIENT=1
                ONBOOT="yes"
                TYPE=Ethernet
                DEFROUTE=yes
                PEERDNS=yes
                PEERROUTES=yes
                IPV4_FAILURE_FATAL=yes
                IPV6INIT=yes
                IPV6_AUTOCONF=yes
                IPV6_DEFROUTE=yes
                IPV6_PEERDNS=yes
                IPV6_PEERROUTES=yes
                IPV6_FAILURE_FATAL=no
                NAME="ens32"
        notify: Restart networking

  handlers:
      - name: Restart networking
        action: service name=network state=restarted
Add configuration for the "ens32" network interface in the host. It's not setup in the box for VMWare Fusion and Vagrant doesn't seem to set it up. The "ens32" interface is used to access the internet, for VMware this is connected to a NAT'ed virtual network with DHCP enabled.
Add configuration for the "ens32" network interface in the host. It's not setup in the box for VMWare Fusion and Vagrant doesn't seem to set it up. The "ens32" interface is used to access the internet, for VMware this is connected to a NAT'ed virtual network with DHCP enabled.
