tlu/salt/states/hosts/init.sls
Jonas Forsberg 2c92cf35e9 .
2021-10-17 13:55:21 +02:00

25 lines
555 B
Plaintext

Configure hosts file:
file.managed:
- name: /etc/hosts
- source: salt://hosts/files/hosts.jinja
- template: jinja
- user: root
- group: root
- mode: "0644"
Configure hostname file:
file.managed:
- name: /etc/hostname
- source: salt://hosts/files/hostname.jinja
- template: jinja
- user: root
- group: root
- mode: "0644"
Run hostname command:
cmd.run:
- name: hostname {{ pillar['network']['hostname'] }}
- onchanges:
- file: Configure hosts file
- file: Configure hostname file