Disable locksmithd on CoreOS if coreos_auto_upgrade set to false (#3088)

* Disable locksmithd on CoreOS if coreos_auto_upgrade set to false

* change when format to support multiple-condition
This commit is contained in:
JohnZheng 2018-08-15 02:42:16 +08:00 committed by Chad Swenson
parent 0e3518f2ca
commit b50b3430be
3 changed files with 11 additions and 0 deletions

View file

@ -131,3 +131,6 @@ bin_dir: /usr/local/bin
# The read-only port for the Kubelet to serve on with no authentication/authorization. Uncomment to enable.
#kube_read_only_port: 10255
# Does coreos need auto upgrade, default is true
#coreos_auto_upgrade: true

View file

@ -4,3 +4,6 @@ pip_python_coreos_modules:
- six
override_system_hostname: true
coreos_auto_upgrade: true

View file

@ -62,3 +62,8 @@
with_items: "{{pip_python_coreos_modules}}"
environment:
PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}"
- name: Bootstrap | Disable auto-upgrade
shell: "systemctl stop locksmithd.service && systemctl mask --now locksmithd.service"
when:
- not coreos_auto_upgrade