add note on how to avoid service start in apt

This commit is contained in:
Brian Coca 2017-10-05 10:29:53 -04:00 committed by Brian Coca
parent 5ccc1072ea
commit 9a8055a8e5

View file

@ -139,9 +139,9 @@ requirements:
- aptitude (before 2.4) - aptitude (before 2.4)
author: "Matthew Williams (@mgwilliams)" author: "Matthew Williams (@mgwilliams)"
notes: notes:
- Three of the upgrade modes (C(full), C(safe) and its alias C(yes)) - Three of the upgrade modes (C(full), C(safe) and its alias C(yes)) required C(aptitude) up to 2.3, since 2.4 C(apt-get) is used as a fall-back.
required C(aptitude) up to 2.3, since 2.4 C(apt-get) is used as a - apt starts newly installed services by default, this is what the underlying tooling does,
fall-back. to avoid this you can set the ``RUNLEVEL`` environment variable to 1.
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -150,10 +150,13 @@ EXAMPLES = '''
name: foo name: foo
update_cache: yes update_cache: yes
- name: Install apache service but avoid starting it immediately
apt: name=apache2 state=present
environment:
RUNLEVLEL: 1
- name: Remove "foo" package - name: Remove "foo" package
apt: apt: name=foo state=absent
name: foo
state: absent
- name: Install the package "foo" - name: Install the package "foo"
apt: apt:
@ -222,6 +225,7 @@ EXAMPLES = '''
- name: Remove dependencies that are no longer required - name: Remove dependencies that are no longer required
apt: apt:
autoremove: yes autoremove: yes
''' '''
RETURN = ''' RETURN = '''