Massimiliano (Max)
04/12/2023, 12:20 PMrequire 'facter`
Facter::Util::Resolution.exec('cat /var/lib/nomad/server/node-id')
Thanks @Massimiliano (Max)Massimiliano (Max)
04/12/2023, 12:36 PM$nomad_server_regex = 'nomad-server0'
$iface = 'eth0'
$nomad_server_inventory = puppetdb_query(
"inventory[facts.networking.hostname, facts.networking.interfaces.${iface}.ip, facts.nomad_node_id] {
facts.networking.hostname ~ '${nomad_server_regex}' and facts.agent_specified_environment = '${facts['agent_specified_environment']}'
}"
)
$peer_json_content = $nomad_server_inventory.map |$item| {
" {
\"id\": \"${item['facts.nomad_node_id']}\",
\"address\": \"${item["facts.networking.interfaces.${iface}.ip"]}:8300\",
\"non_voter\": false
}"
}.join(",\n")
file { '/tmp/peers.json':
owner => 'root',
group => 'root',
mode => '0640',
content => "[\n${peer_json_content}\n]";
}Massimiliano (Max)
04/12/2023, 12:49 PM/tmp/peers.json
the Bolt task will stop nomad, put the file in the proper location (/var/lib/nomad/server/raft/peers.json) and start nomad.
When nomad starts, the json file will be deleted
I'm not using bolt, but I can have a look on to some other bolt taskSlackbot
04/12/2023, 1:22 PMma_garvo
04/12/2023, 1:26 PMWim Korevaar
04/12/2023, 1:53 PMMassimiliano (Max)
04/12/2023, 3:26 PM<https://github.com/voxpupuli/puppet-nomad/issues/77>
I'm not great at unit test.... I take my time and I do it slowly.
If PuppetDB is needed, and I am using the function puppetdb_query, do we skip all the test?
p.s.: if needed, I can even add an alternative, to let the user supply a hash with IPs and corresponding node-idraphaelp
04/12/2023, 7:04 PMbinford2k
04/12/2023, 10:35 PMDavid Sandilands
04/12/2023, 11:24 PMfirewall resource, which is used to manage and configure firewall rules from within the Puppet DSL
Key features/changes:
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v4.1.0 to v5.0.0
Feedback
https://github.com/puppetlabs/firewall/issues
puppetlabs-ha-proxy v7.0.0
HAProxy is a daemon for load-balancing and proxying TCP- and HTTP-based services. This module lets you use Puppet to configure HAProxy servers and backend member servers.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v6.5.0 to v7.0.0
Feedback
https://github.com/puppetlabs/ha-proxy/issues
puppetlabs-motd v7.0.0
A simple module to demonstrate managing /etc/motd or Windows Logon Message as a template
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Removed
• Remove support for RedHat6 / OracleLinux6 / Scientific6
• Dropping Support for Debian 9
Full changelog v6.3.0 to v7.0.0
Feedback
https://github.com/puppetlabs/motd/issues
puppetlabs-registry v5.0.0
This module provides a native type and provider to manage keys and values in the Windows Registry
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v4.1.2 to v5.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-registry/issues
puppetlabs-accounts v8.0.0
The accounts module manages resources related to login and service accounts.
This module works on many UNIX/Linux operating systems. It does not support configuring accounts on Microsoft Windows platforms.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full Changelog v7.3.1 to v8.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-accounts/issues
puppetlabs-exec v3.0.0
This module provides the exec task. This task allows you to run an arbitary command with arguments.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v2.2.1 to v3.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-exec/issues
puppetlabs-scheduled_tasks v3.2.0
This module adds a new scheduled_task provider capable of using the more modern Version 2 Windows API for task management
Key features/changes
Added
• Control scheduled task description field
Full changelog v3.1.1 to v3.2.0
Feedback
https://github.com/puppetlabs/puppetlabs-scheduled_task/issues
puppetlabs-ntp v7.0.0
The ntp module installs, configures, and manages the NTP service across a range of operating systems and distributions.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelogv9.2.2 to v10.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-ntp/issues
puppetlabs-facter_tasks v2.0.1
This task allows you to discover facts about remote machines in your infrastructure.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v1.3.1 to v2.0.1
Feedback
https://github.com/puppetlabs/puppetlabs-ntp/issuesDavid Sandilands
04/12/2023, 11:25 PMfirewall resource, which is used to manage and configure firewall rules from within the Puppet DSL
Key features/changes:
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v4.1.0 to v5.0.0
Feedback
https://github.com/puppetlabs/firewall/issues
puppetlabs-ha-proxy v7.0.0
HAProxy is a daemon for load-balancing and proxying TCP- and HTTP-based services. This module lets you use Puppet to configure HAProxy servers and backend member servers.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v6.5.0 to v7.0.0
Feedback
https://github.com/puppetlabs/ha-proxy/issues
puppetlabs-motd v7.0.0
A simple module to demonstrate managing /etc/motd or Windows Logon Message as a template
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Removed
• Remove support for RedHat6 / OracleLinux6 / Scientific6
• Dropping Support for Debian 9
Full changelog v6.3.0 to v7.0.0
Feedback
https://github.com/puppetlabs/motd/issues
puppetlabs-registry v5.0.0
This module provides a native type and provider to manage keys and values in the Windows Registry
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v4.1.2 to v5.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-registry/issues
puppetlabs-accounts v7.0.0
The accounts module manages resources related to login and service accounts.
This module works on many UNIX/Linux operating systems. It does not support configuring accounts on Microsoft Windows platforms.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full Changelog v7.3.1 to v8.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-accounts/issues
puppetlabs-exec v7.0.0
This module provides the exec task. This task allows you to run an arbitary command with arguments.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v2.2.1 to v3.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-exec/issues
puppetlabs-scheduled_tasks v7.0.0
This module adds a new scheduled_task provider capable of using the more modern Version 2 Windows API for task management
Key features/changes
Added
• Control scheduled task description field
Full changelog v3.1.1 to v3.2.0
Feedback
https://github.com/puppetlabs/puppetlabs-scheduled_task/issues
puppetlabs-ntp v7.0.0
The ntp module installs, configures, and manages the NTP service across a range of operating systems and distributions.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelogv9.2.2 to v10.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-ntp/issues
puppetlabs-facter_tasks v7.0.0
This task allows you to discover facts about remote machines in your infrastructure.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v1.3.1 to v2.0.1
Feedback
https://github.com/puppetlabs/puppetlabs-ntp/issuesDavid Sandilands
04/12/2023, 11:26 PMfirewall resource, which is used to manage and configure firewall rules from within the Puppet DSL
Key features/changes:
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v4.1.0 to v5.0.0
Feedback
https://github.com/puppetlabs/firewall/issues
puppetlabs-ha-proxy v7.0.0
HAProxy is a daemon for load-balancing and proxying TCP- and HTTP-based services. This module lets you use Puppet to configure HAProxy servers and backend member servers.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v6.5.0 to v7.0.0
Feedback
https://github.com/puppetlabs/ha-proxy/issues
puppetlabs-motd v7.0.0
A simple module to demonstrate managing /etc/motd or Windows Logon Message as a template
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Removed
• Remove support for RedHat6 / OracleLinux6 / Scientific6
• Dropping Support for Debian 9
Full changelog v6.3.0 to v7.0.0
Feedback
https://github.com/puppetlabs/motd/issues
puppetlabs-registry v5.0.0
This module provides a native type and provider to manage keys and values in the Windows Registry
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v4.1.2 to v5.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-registry/issues
puppetlabs-accounts v8.0.0
The accounts module manages resources related to login and service accounts.
This module works on many UNIX/Linux operating systems. It does not support configuring accounts on Microsoft Windows platforms.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full Changelog v7.3.1 to v8.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-accounts/issues
puppetlabs-exec v3.0.0
This module provides the exec task. This task allows you to run an arbitary command with arguments.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v2.2.1 to v3.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-exec/issues
puppetlabs-scheduled_tasks v3.2.0
This module adds a new scheduled_task provider capable of using the more modern Version 2 Windows API for task management
Key features/changes
Added
• Control scheduled task description field
Full changelog v3.1.1 to v3.2.0
Feedback
https://github.com/puppetlabs/puppetlabs-scheduled_task/issues
puppetlabs-ntp v7.0.0
The ntp module installs, configures, and manages the NTP service across a range of operating systems and distributions.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelogv9.2.2 to v10.0.0
Feedback
https://github.com/puppetlabs/puppetlabs-ntp/issues
puppetlabs-facter_tasks v2.0.1
This task allows you to discover facts about remote machines in your infrastructure.
Key features/changes
Added
• Add Support for Puppet 8 / Drop Support for Puppet 6
Full changelog v1.3.1 to v2.0.1
Feedback
https://github.com/puppetlabs/puppetlabs-ntp/issuesSlackbot
04/12/2023, 11:56 PMDr Bunsen Honeydew
04/13/2023, 11:45 AMSlackbot
04/13/2023, 1:16 PMP. Aiello
04/13/2023, 2:34 PMSlackbot
04/13/2023, 4:51 PMbinford2k
04/13/2023, 4:56 PMvchepkov
04/13/2023, 5:10 PMpuppetfile-updater (0.6.0)binford2k
04/13/2023, 5:14 PMbastelfreak
04/13/2023, 5:15 PMSlackbot
04/13/2023, 5:22 PMJoel Wilson
04/13/2023, 5:22 PMSlackbot
04/14/2023, 7:19 AMSlackbot
04/14/2023, 8:26 AMPinky
04/14/2023, 8:27 AM.each function. e.g
exec { 'after_user':
command => 'test 1 = 2',
notify => thefollowingblock,
}
$alluser.each |$user| {
exec { "test_${user}":
command => "test ${user} = 'a'",
refreshonly => true,
}
}
Or the other way around, where a following ressource requires the exec inside the .each functionPinky
04/14/2023, 8:27 AM.each function. e.g
exec { 'after_user':
command => 'test 1 = 2',
notify => thefollowingblock,
}
$alluser.each |$user| {
exec { "test_${user}":
command => "test ${user} = 'a'",
refreshonly => true,
}
}
Or the other way around, where a following ressource requires the exec inside the preceeding .each functionPinky
04/14/2023, 8:27 AM.each function. e.g
exec { 'after_user':
command => 'test 1 = 2',
notify => thefollowingblock,
}
$alluser.each |$user| {
exec { "test_${user}":
command => "test ${user} = 'a'",
refreshonly => true,
}
}
Or the other way around, where a following ressource requires the exec inside the previous .each functionPinky
04/14/2023, 8:28 AM.each function. e.g
exec { 'after_user':
command => 'test 1 = 2',
notify => thefollowingblock,
}
$alluser.each |$user| {
exec { "test_${user}":
command => "test ${user} = 'a'",
refreshonly => true,
}
}
Or the other way around, where a ressource requires the exec inside the previous .each functionPinky
04/14/2023, 8:29 AM.each function. e.g
exec { 'before_user':
command => 'test 1 = 2',
notify => `thefollowingblock`,
}
$alluser.each |$user| {
exec { "test_${user}":
command => "test",
refreshonly => true,
}
}
Or the other way around, where a ressource requires the exec inside the previous .each function