2021-09-22 14:33:46 +00:00
|
|
|
Configure hosts file:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/hosts
|
2021-10-17 11:55:21 +00:00
|
|
|
- source: salt://hosts/files/hosts.jinja
|
2021-09-22 14:33:46 +00:00
|
|
|
- template: jinja
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: "0644"
|
|
|
|
|
|
|
|
Configure hostname file:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/hostname
|
2021-10-17 11:55:21 +00:00
|
|
|
- source: salt://hosts/files/hostname.jinja
|
2021-09-22 14:33:46 +00:00
|
|
|
- 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
|