1
Science Saru's The Ghost in the Shell TV Anime Reveals New Teaser Video, Main Staff
(www.animenewsnetwork.com)
I try some tests based on your description, and I think I got a solution. Try to use host_vars
This is a playbook:
***
- name: Test for lemmy
hosts: your_hosts
vars:
networks:
ext:
ipv4: "127.0.0.1"
tasks:
- name: Use template
ansible.builtin.template:
src: test.j2
dest: "/etc/iptables/rules.v4"
owner: root
group: root
mode: "0644"
This is a template file test.j2
:
{% for rule in rules %}
{{ rule }}
{% endfor %}
This is a host2.yml
file in a host_vars
directory:
***
rules:
- "-A INPUT -p tcp -s {{ networks['ext']['ipv4'] }} --dport 6000 -j ACCEPT"
For another hosts you can create separate host files with variable rules
.
Which module do you use for inserting the template?
Open source. Because for me this term is the most general.
Can you share a content of
/etc/fstab
file? It is the first place I would check in your situation.