0344c32678
Nailgun-agent provided the parameter for the config and restarts mcollective after update. But in some cases (see description of the related bug) such behavior may cause deployment failure. So now the data is supplied by astute in provision info and is placed into config on its creation as other parameters. Change-Id: I3670e571c13808da2b54bd6238d228e7cdb0ef96 Related-Bug: #1518306 Depends-On: I753eb76ed9c3b80f249c0c4b86ef48ef49274990
108 lines
2.8 KiB
Django/Jinja
108 lines
2.8 KiB
Django/Jinja
#cloud-config
|
|
resize_rootfs: false
|
|
growpart:
|
|
mode: false
|
|
disable_ec2_metadata: true
|
|
disable_root: false
|
|
|
|
# password: RANDOM
|
|
# chpasswd: { expire: True }
|
|
|
|
ssh_pwauth: false
|
|
ssh_authorized_keys:
|
|
{% for key in common.ssh_auth_keys %}
|
|
- {{ key }}
|
|
{% endfor %}
|
|
|
|
# set the locale to a given locale
|
|
# default: en_US.UTF-8
|
|
locale: en_US.UTF-8
|
|
|
|
timezone: {{ common.timezone }}
|
|
|
|
hostname: {{ common.hostname }}
|
|
fqdn: {{ common.fqdn }}
|
|
|
|
# add entries to rsyslog configuration
|
|
rsyslog:
|
|
- filename: 10-log2master.conf
|
|
content: |
|
|
$template LogToMaster, "<%PRI%>1 %$NOW%T%TIMESTAMP:8:$%Z %HOSTNAME% %APP-NAME% %PROCID% %MSGID% -%msg%\n"
|
|
*.* @{{ common.master_ip }};LogToMaster
|
|
|
|
runcmd:
|
|
{% if puppet.enable != 1 %}
|
|
- service puppet stop
|
|
- chkconfig puppet off
|
|
{% endif %}
|
|
{% if mcollective.enable != 1 %}
|
|
- service mcollective stop
|
|
- chkconfig mcollective off
|
|
{% else %}
|
|
- chkconfig mcollective on
|
|
- service mcollective restart
|
|
{% endif %}
|
|
- iptables -t filter -F INPUT
|
|
- iptables -t filter -F FORWARD
|
|
- service iptables save
|
|
|
|
# that module's missing in 0.6.3, but existent for >= 0.7.3
|
|
write_files:
|
|
- content: |
|
|
---
|
|
url: {{ common.master_url }}
|
|
path: /etc/nailgun-agent/config.yaml
|
|
- content: target
|
|
path: /etc/nailgun_systemtype
|
|
|
|
mcollective:
|
|
conf:
|
|
main_collective: mcollective
|
|
collectives: mcollective
|
|
libdir: /usr/libexec/mcollective
|
|
logfile: /var/log/mcollective.log
|
|
loglevel: debug
|
|
daemonize: 1
|
|
direct_addressing: 1
|
|
ttl: 4294957
|
|
securityprovider: psk
|
|
plugin.psk: {{ mcollective.pskey }}
|
|
identity: {{ mcollective.identity }}
|
|
{% if mcollective.connector == 'stomp' %}
|
|
connector = stomp
|
|
plugin.stomp.host: {{ mcollective.host }}
|
|
plugin.stomp.port: {{ mcollective.port|default(61613) }}
|
|
plugin.stomp.user: {{ mcollective.user }}
|
|
plugin.stomp.password: {{ mcollective.password }}
|
|
{% else %}
|
|
connector: rabbitmq
|
|
plugin.rabbitmq.vhost: {{ mcollective.vhost }}
|
|
plugin.rabbitmq.pool.size: 1
|
|
plugin.rabbitmq.pool.1.host: {{ mcollective.host }}
|
|
plugin.rabbitmq.pool.1.port: {{ mcollective.port|default(61613) }}
|
|
plugin.rabbitmq.pool.1.user: {{ mcollective.user }}
|
|
plugin.rabbitmq.pool.1.password: {{ mcollective.password }}
|
|
plugin.rabbitmq.heartbeat_interval: 30
|
|
{% endif %}
|
|
factsource: yaml
|
|
plugin.yaml: /etc/mcollective/facts.yaml
|
|
|
|
puppet:
|
|
conf:
|
|
main:
|
|
logdir: /var/log/puppet
|
|
rundir: /var/run/puppet
|
|
ssldir: $vardir/ssl
|
|
pluginsync: true
|
|
prerun_command: /bin/true
|
|
postrun_command: /bin/true
|
|
agent:
|
|
classfile: $vardir/classes.txt
|
|
localconfig: $vardir/localconfig
|
|
server: {{ puppet.master }}
|
|
report: false
|
|
configtimeout: 600
|
|
|
|
|
|
final_message: "YAY! The system is finally up, after $UPTIME seconds"
|