Code Monkey home page Code Monkey logo

Comments (6)

elJoeyJojo avatar elJoeyJojo commented on August 16, 2024

Actually I realized that my Kickstart Finish Template is actually not the same as the one I mentioned:

<%#
kind: finish
name: Kickstart default finish
oses:
- CentOS 4
- CentOS 5
- CentOS 6
- CentOS 7
- Fedora 16
- Fedora 17
- Fedora 18
- Fedora 19
- Fedora 20
%>
<% if @host.subnet.respond_to?(:dhcp_boot_mode?) -%>
<%= snippet 'kickstart_networking_setup' %>
service network restart
<% end -%>

<%
  rhel_compatible = @host.operatingsystem.family == 'Redhat' && @host.operatingsystem.name != 'Fedora'
  os_major = @host.operatingsystem.major.to_i
  pm_set = @host.puppetmaster.empty? ? false : true
  puppet_enabled = pm_set || @host.params['force-puppet'] && @host.params['force-puppet'] == 'true'
%>

<% if @host.provision_method == 'image' && !root_pass.empty? -%>
# Install the root password
echo 'root:<%= root_pass -%>' | /usr/sbin/chpasswd -e
<% end -%>

<% if rhel_compatible -%>
<%= snippet 'epel' -%>
<% end -%>

<% if puppet_enabled -%>
<% if @host.params['enable-puppetlabs-repo'] && @host.params['enable-puppetlabs-repo'] == 'true' -%>
<% if @host.operatingsystem.name == 'Fedora' -%>
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-fedora-<%= os_major -%>.noarch.rpm
<% else -%>
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-<%= os_major -%>.noarch.rpm
<% end -%>
<% end -%>
yum -t -y -e 0 install puppet
<% end -%>

#update local time
echo "updating system time"
/usr/sbin/ntpdate -sub <%= @host.params['ntp-server'] || '0.fedora.pool.ntp.org' %>
/usr/sbin/hwclock --systohc

<% if @host.info['parameters']['realm'] && @host.otp && @host.realm && @host.realm.realm_type == 'FreeIPA' -%>
<%= snippet 'freeipa_register' %>
<% end -%>

# update all the base packages from the updates repository
yum -t -y -e 0 update

<% if puppet_enabled %>
echo "Configuring puppet"
cat > /etc/puppet/puppet.conf << EOF
<%= snippet 'puppet.conf' %>
EOF

# Setup puppet to run on system reboot
<% if @host.operatingsystem.name == 'Fedora' -%>
puppet_unit=puppet
/usr/bin/systemctl list-unit-files | grep -q puppetagent && puppet_unit=puppetagent
/usr/bin/systemctl enable ${puppet_unit}
<% else -%>
/sbin/chkconfig --level 345 puppet on
<% end -%>

/usr/bin/puppet agent --config /etc/puppet/puppet.conf -o --tags no_such_tag <%= @host.puppetmaster.blank? ? '' : "--server #{@host.puppetmaster}" %> --no-daemonize
<% end -%>

exit 0

from community-templates.

ekohl avatar ekohl commented on August 16, 2024

I took the liberty to edit your messages to show up as code blocks to make the issue readable.

Are you sure the host has a puppetmaster assigned?

from community-templates.

elJoeyJojo avatar elJoeyJojo commented on August 16, 2024

image

so you were totally right and THANK YOU for editing my message so that they showed as code. I was sure I had done that but I guess I didn't.

I recently upgraded to a newer version of Foreman and in previous Foreman version you didn't have to hit the "Inherit" button when assigning the Puppet Master/Puppet CA so when I was provisioning them I chose the right Puppet Master but I never hit "inherit" so the changes were never being made and these VMs ended up without a Puppet Master. THANK YOU! I wouldn't never thought of checking there!

from community-templates.

mmoll avatar mmoll commented on August 16, 2024

@elJoeyJojo is this ok to close then?

from community-templates.

elJoeyJojo avatar elJoeyJojo commented on August 16, 2024

Yes please and thank you @ekohl

from community-templates.

ekohl avatar ekohl commented on August 16, 2024

No problem :)

from community-templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.