Where is the correct place to set net.netfilter.nf_conntrack_buckets?

I think that sysctl parameter is for viewing only. You’ll want to use the /sys/module/nf_conntrack/parameters/hashsize interface for runtime changes, and the hashsize module option to set it during initial module load. You’d want an entry in a /etc/modprobe.d/ file that looks something like this: options nf_conntrack hashsize=XXXXX

How do I print the current hostname of a host in ansible

You have to use the template-module for this. Here’s an example task: – name: Create motd template: src: “motd.j2” dest: “/etc/motd” The file motd.j2 (placed in the templates-subdirectory of your role) could then look like this: Welcome to host {{ansible_hostname}}! {{ansible_hostname}} will then be replaced with the hostname. Be sure to “gather facts” in your … Read more