* Add TODO-proper fix for state - native salt fun.
But due bug[1] in saltstack - we can't enable
proper solution now
[1] 74599bbdfc
Related-PROD: PROD-20730
Change-Id: I11b6d81ae0f9a7864518f638e8fc423e4e087285
master
--- | --- | ||||
driver: | driver: | ||||
name: docker | name: docker | ||||
hostname: linux.ci.local | |||||
use_sudo: false | |||||
hostname: linux-formula | |||||
run_options: -v /dev/log:/dev/log:ro | |||||
provisioner: | provisioner: | ||||
name: salt_solo | name: salt_solo |
{%- endif %} | {%- endif %} | ||||
{# Change state to proper one, after releasing patch: | |||||
https://github.com/saltstack/salt/pull/45748/files/74599bbdfcf99f45d3a31296887097fade31cbf1 | |||||
linux_enforce_hostname: | linux_enforce_hostname: | ||||
cmd.wait: | |||||
network.system: | |||||
- enabled: True | |||||
- hostname: {{ network.hostname }} | |||||
- apply_hostname: True | |||||
- retain_settings: True | |||||
#} | |||||
linux_enforce_hostname: | |||||
cmd.run: | |||||
- name: hostname {{ network.hostname }} | - name: hostname {{ network.hostname }} | ||||
- unless: test "$(hostname)" = "{{ network.hostname }}" | - unless: test "$(hostname)" = "{{ network.hostname }}" | ||||
{# | |||||
linux_hostname_hosts: | |||||
host.present: | |||||
- ip: {{ grains.ip4_interfaces[network.get('default_interface', 'eth0')][0] }} | |||||
- names: | |||||
- {{ network.fqdn }} | |||||
- {{ network.hostname }} | |||||
#} | |||||
{%- if grains.get('noservices') %} | |||||
- onlyif: /bin/false | |||||
{%- endif %} | |||||
{%- endif %} | {%- endif %} |
{%- from "linux/map.jinja" import network with context %} | {%- from "linux/map.jinja" import network with context %} | ||||
include: | include: | ||||
{%- if network.hostname is defined %} | |||||
- linux.network.hostname | - linux.network.hostname | ||||
{%- endif %} | |||||
{%- if network.host|length > 0 or network.get('purge_hosts', True) %} | {%- if network.host|length > 0 or network.get('purge_hosts', True) %} | ||||
- linux.network.host | - linux.network.host | ||||
{%- endif %} | {%- endif %} |
linux: | linux: | ||||
network: | |||||
enabled: true | |||||
hostname: linux | |||||
fqdn: linux.ci.local | |||||
system: | system: | ||||
enabled: true | enabled: true | ||||
cluster: default | cluster: default | ||||
name: linux | name: linux | ||||
domain: local | |||||
domain: ci.local | |||||
environment: prd | environment: prd | ||||
hostname: system.pillar.local | |||||
purge_repos: true | purge_repos: true | ||||
directory: | directory: | ||||
/tmp/test: | /tmp/test: |