Skip to content

Commit a06cdd9

Browse files
evgeniehelms
authored andcommitted
notify the mosquitto service of changes to the acl and certs
otherwise mosquitto might try to start *before* the certs or the acl file have been written, failing
1 parent 9319a59 commit a06cdd9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

manifests/plugin/remote_execution/mosquitto.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
owner => 'root',
5959
group => 'mosquitto',
6060
mode => '0640',
61+
notify => Class['mosquitto::service'],
6162
}
6263

6364
file { $mosquitto_ssl_dir:
@@ -74,6 +75,7 @@
7475
owner => 'root',
7576
group => 'mosquitto',
7677
mode => '0440',
78+
notify => Class['mosquitto::service'],
7779
}
7880

7981
file { "${mosquitto_ssl_dir}/ssl_key.pem":
@@ -82,6 +84,7 @@
8284
owner => 'root',
8385
group => 'mosquitto',
8486
mode => '0440',
87+
notify => Class['mosquitto::service'],
8588
}
8689

8790
file { "${mosquitto_ssl_dir}/ssl_ca.pem":
@@ -90,6 +93,7 @@
9093
owner => 'root',
9194
group => 'mosquitto',
9295
mode => '0440',
96+
notify => Class['mosquitto::service'],
9397
}
9498

9599
# Ensure certs were deployed before we try to source them

spec/classes/foreman_proxy__plugin__remote_execution__mosquitto_spec.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
:ensure => 'present',
4242
:owner => 'root',
4343
:group => 'mosquitto',
44-
:mode => '0640'
44+
:mode => '0640',
45+
:notify => 'Class[Mosquitto::Service]',
4546
})
4647
end
4748

@@ -62,7 +63,8 @@
6263
:source => '/etc/foreman-proxy/ssl_cert.pem',
6364
:owner => 'root',
6465
:group => 'mosquitto',
65-
:mode => '0440'
66+
:mode => '0440',
67+
:notify => 'Class[Mosquitto::Service]',
6668
})
6769
end
6870

@@ -73,7 +75,8 @@
7375
:source => '/etc/foreman-proxy/ssl_key.pem',
7476
:owner => 'root',
7577
:group => 'mosquitto',
76-
:mode => '0440'
78+
:mode => '0440',
79+
:notify => 'Class[Mosquitto::Service]',
7780
})
7881
end
7982

@@ -84,7 +87,8 @@
8487
:source => '/etc/foreman-proxy/ssl_ca.pem',
8588
:owner => 'root',
8689
:group => 'mosquitto',
87-
:mode => '0440'
90+
:mode => '0440',
91+
:notify => 'Class[Mosquitto::Service]',
8892
})
8993
end
9094
end

0 commit comments

Comments
 (0)