diff options
author | Bogdan Dobrelya <bdobreli@redhat.com> | 2018-01-15 09:45:14 +0100 |
---|---|---|
committer | Bogdan Dobrelya <bdobreli@redhat.com> | 2018-02-09 17:59:31 +0100 |
commit | d03e39704e8148fa1cf1869c0e5003ecf48c4f57 (patch) | |
tree | 333ba660afe1d560161f9b023368c66c9aa0fc48 /playbooks/openstack | |
parent | 16bdfc74b34277cccb62935cc361ff7c486ae92d (diff) | |
download | openshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.tar.gz openshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.tar.bz2 openshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.tar.xz openshift-d03e39704e8148fa1cf1869c0e5003ecf48c4f57.zip |
Fix cloud init runcmd templating
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Diffstat (limited to 'playbooks/openstack')
-rw-r--r-- | playbooks/openstack/advanced-configuration.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/playbooks/openstack/advanced-configuration.md b/playbooks/openstack/advanced-configuration.md index 6fbfca3dc..df53f3681 100644 --- a/playbooks/openstack/advanced-configuration.md +++ b/playbooks/openstack/advanced-configuration.md @@ -291,15 +291,15 @@ possible, like this `provision_install_custom.yml` example playbook: The playbook leverages a two existing provider interfaces: `provision.yml` and `install.yml`. For some cases, like SSH keys configuration and coordinated reboots of servers, the cloud-init runcmd directive may be a better choice though. User specified -shell commands for cloud-init need to be lists, for example: +shell commands for cloud-init need to be either strings or lists, for example: ``` - openshift_openstack_cloud_init_runcmd: - - ['echo', 'foo'] - - ['reboot'] + - set -vx + - systemctl stop sshd # fences off ansible playbooks as we want to reboot later + - ['echo', 'foo', '>', '/tmp/foo'] + - [ ls, /tmp/foo, '||', true ] + - reboot # unfences ansible playbooks to continue after reboot ``` -The commands should not use JSON escaped characters: `> < & '`. So the command -`['foo', '>', '"bar"', '<', "'baz'", "&"]` is a bad one, while -`['echo', '"${HOME}"']` is OK. **Note** To protect Nova servers from recreating when the user-data changes via `openshift_openstack_cloud_init_runcmd`, the |