From e4978ea98d717614aca9c3007279a4e076f8951b Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Wed, 12 Oct 2016 17:58:03 -0400 Subject: [PATCH] Change example syntax on apt_repository module --- .../modules/packaging/os/apt_repository.py | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/packaging/os/apt_repository.py b/lib/ansible/modules/packaging/os/apt_repository.py index dac098dab2..aedf1cb2fb 100644 --- a/lib/ansible/modules/packaging/os/apt_repository.py +++ b/lib/ansible/modules/packaging/os/apt_repository.py @@ -84,22 +84,36 @@ requirements: EXAMPLES = ''' # Add specified repository into sources list. -apt_repository: repo='deb http://archive.canonical.com/ubuntu hardy partner' state=present +- apt_repository: + repo: 'deb http://archive.canonical.com/ubuntu hardy partner' + state: present # Add specified repository into sources list using specified filename. -apt_repository: repo='deb http://dl.google.com/linux/chrome/deb/ stable main' state=present filename='google-chrome' +- apt_repository: + repo: 'deb http://dl.google.com/linux/chrome/deb/ stable main' + state: present + filename: 'google-chrome' # Add source repository into sources list. -apt_repository: repo='deb-src http://archive.canonical.com/ubuntu hardy partner' state=present +- apt_repository: + repo: 'deb-src http://archive.canonical.com/ubuntu hardy partner' + state: present # Remove specified repository from sources list. -apt_repository: repo='deb http://archive.canonical.com/ubuntu hardy partner' state=absent +- apt_repository: + repo: 'deb http://archive.canonical.com/ubuntu hardy partner' + state: absent # Add nginx stable repository from PPA and install its signing key. # On Ubuntu target: -apt_repository: repo='ppa:nginx/stable' +- apt_repository: + repo: 'ppa:nginx/stable' + # On Debian target -apt_repository: repo='ppa:nginx/stable' codename='trusty' +- apt_repository: + repo: 'ppa:nginx/stable' + codename: 'trusty' + repo: 'ppa:nginx/stable' ''' import glob