tlu/salt/states/hostname/init.sls
2021-09-22 16:33:46 +02:00

25 lines
561 B
Plaintext

Configure hosts file:
file.managed:
- name: /etc/hosts
- source: salt://hostname/files/hosts.jinja
- template: jinja
- user: root
- group: root
- mode: "0644"
Configure hostname file:
file.managed:
- name: /etc/hostname
- source: salt://hostname/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