mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
Examples syntax batch4 (#5620)
* Change example syntax on authorized_key module * Change example syntax on cron module * Change example syntax on group module * Change example syntax on hostname module * Change example syntax on seboolean module * Change example syntax on selinux module * Change example syntax on service module * Change example syntax on sysctl module * Change example syntax on systemd module * Change example syntax on user module * Change example syntax on debug module * Change example syntax on fail module * Change example syntax on include module * Change example syntax on include_role module * Change example syntax on include_vars module * Change example syntax on pause module * Change example syntax on wait_for module * Change example syntax on apache2_module module * > Change example syntax on django_manage module * Change example syntax on htpasswd module
This commit is contained in:
parent
ad6999e2eb
commit
b56a9852ee
20 changed files with 261 additions and 87 deletions
|
@ -99,18 +99,20 @@ EXAMPLES = '''
|
|||
# Using github url as key source
|
||||
- authorized_key:
|
||||
user: charlie
|
||||
key: https://github.com/charlie.keys
|
||||
key: 'https://github.com/charlie.keys'
|
||||
|
||||
# Using alternate directory locations:
|
||||
- authorized_key:
|
||||
user: charlie
|
||||
key: "{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
|
||||
path: '/etc/ssh/authorized_keys/charlie'
|
||||
path: /etc/ssh/authorized_keys/charlie
|
||||
manage_dir: no
|
||||
|
||||
# Using with_file
|
||||
- name: Set up authorized_keys for the deploy user
|
||||
authorized_key: user=deploy key="{{ item }}"
|
||||
authorized_key:
|
||||
user: deploy
|
||||
key: "{{ item }}"
|
||||
with_file:
|
||||
- public_keys/doe-jane
|
||||
- public_keys/doe-john
|
||||
|
@ -124,13 +126,13 @@ EXAMPLES = '''
|
|||
# Using validate_certs:
|
||||
- authorized_key:
|
||||
user: charlie
|
||||
key: https://github.com/user.keys
|
||||
key: 'https://github.com/user.keys'
|
||||
validate_certs: no
|
||||
|
||||
# Set up authorized_keys exclusively with one key
|
||||
- authorized_key:
|
||||
user: root
|
||||
key: '{{ item }}'
|
||||
key: "{{ item }}"
|
||||
state: present
|
||||
exclusive: yes
|
||||
with_file:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue