I am having a hard time building a complete image of RHEL 7 from a template using salt-cloud. I have been using RHEL 6 at our company to build them for a while and now we're migrate to RHEL 7. I can successfully build and image from the template but the network adapter and ip specs aren't being applied. This prevents the rhel scripts from running and installing salt-minion in the process. If anyone has an example profile and map files, it would help a lot. This is what I have
rhel7:
- SOADEV-192-rhel7test:
## Resource arguments
num_cpus: 2
memory: 8GB
devices:
network:
Network adapter 1:
name: DPortGroup-DEV
adapter_type: vmxnet3
switch_type: distributed
ip: x.x.x.x
gateway: [x.x.x.x]
subnet_mask: 255.255.255.0
script: RHEL7.sh
deploy: True
customization: True
ssh_username: xxxxxxx
password: xxxxxxxx
minion:
master: x.x.x.x
file_map:
/srv/salt/dev/files/meis-internal.repo: /etc/yum.repos.d/dev-internal.repo
/srv/salt/dev/files/rhel7-internal.repo: /etc/yum.repos.d/rhel7-internal.repo
/srv/salt/dev/files/saltstack.repo: /etc/yum.repos.d/saltstack.repo
/srv/salt/dev/files/resolv.conf: /etc/resolv.conf
#!/bin/bash
# This legacy script pre-dates the salt-bootstrap project. In most cases, the
# bootstrap-salt.sh script is the recommended script for installing salt onto
# a new minion. However, that may not be appropriate for all situations. This
# script remains to help fill those needs, and to provide an example for users
# needing to write their own deploy scripts.
#yum -y install salt-minion --enablerepo epel-testing
yum -y install salt-minion
mkdir -p /etc/salt/pki
echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem
echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub
cat > /etc/salt/minion <<EOF
{{minion}}
EOF
systemctl enable salt-minion.service
systemctl start salt-minion.service