25 lines
561 B
Plaintext
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
|