Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/rtd/howto/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ How do I...?
:maxdepth: 1

Launch cloud-init with... <launching.rst>
Wait for cloud-init <wait_for_cloud_init.rst>
Re-run cloud-init <rerun_cloud_init.rst>
Change how often a module runs <module_run_frequency.rst>
Validate my user-data <debug_user_data.rst>
Expand Down
33 changes: 33 additions & 0 deletions doc/rtd/howto/wait_for_cloud_init.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. _wait_for_cloud_init:

How to wait for cloud-init
**************************

It is useful to be able to wait until cloud-init has completed running prior
to doing some other task.

CLI
===

Cloud-init's command ``cloud-init status --wait`` will exit once cloud-init has
completed.

SystemD
=======

Systems using systemd may be configured to start a service after cloud-init
completes. This may be accomplished by including
``After=cloud-init.target multi-user.target`` in the unit file. For example:

.. code-block::

[Unit]
Description=Example service
After=cloud-final.service multi-user.target

[Service]
Type=oneshot
ExecStart=sh -c 'echo "Howdy partner 🤠"'

[Install]
WantedBy=multi-user.target
10 changes: 9 additions & 1 deletion doc/rtd/reference/breaking_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@ anything that was installed to ``/lib`` is now installed to ``/usr/lib``.
This shouldn't affect any systemd-based distributions as they have all
transitioned to the ``/usr`` merge. However, this could affect older
stable releases, non-systemd and non-Linux distributions. See
`this commit <https://github.com/canonical/cloud-init/commit/0547349214fcfb827e58c1de5e4ad7d23d08cc7f>`_
`commit 054734921 <https://github.com/canonical/cloud-init/commit/0547349214fcfb827e58c1de5e4ad7d23d08cc7f>`_
for more details.

24.4
====

Cloud-init's `cloud-final.service` order was standardized. This caused a
change to the systemd boot order on some distributions. See
`commit 245f94674 <https://github.com/canonical/cloud-init/pull/5830/commits/245f94674f8c14cbe09d9944a12b994913720450>`_
for more details.

24.3
Expand Down