Ver Fonte

Switch to using hostnamectl as it works on atomic and rhel7

Scott Dodson há 9 anos atrás
pai
commit
95223c4b92
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      roles/openshift_common/tasks/main.yml

+ 2 - 1
roles/openshift_common/tasks/main.yml

@@ -38,5 +38,6 @@
     set_hostname_default: "{{ not openshift.common.version_greater_than_3_1_or_1_1 }}"
 
 - name: Set hostname
-  hostname: name={{ openshift.common.hostname }}
+  command: >
+    hostnamectl set-hostname {{ openshift.common.hostname }}
   when: openshift_set_hostname | default(set_hostname_default) | bool