From cd0602889d9495376d296c0e8f4aaffa863178a7 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 18 Apr 2013 22:36:06 -0400 Subject: [PATCH] Showcase the new-style lookup plugin access in the authorized_key docs rather than the old-style $FILE --- docsite/latest/rst/index.rst | 10 +++++----- library/authorized_key | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docsite/latest/rst/index.rst b/docsite/latest/rst/index.rst index 383374f73c..1d2ec82b64 100644 --- a/docsite/latest/rst/index.rst +++ b/docsite/latest/rst/index.rst @@ -7,15 +7,15 @@ Ansible Documentation :alt: ansiblefest 2013 :target: http://ansibleworks.com/fest -This page contains documentation about how to use `Ansible `_ and covers the latest version. For the current -released version, see `Ansible 1.1 Docs `_. You may also be interested in taking a class: +NOTE: This page contains documentation about how to use `Ansible `_ and covers the latest DEVELOPMENT version (1.2). For the current +released version, see `Ansible 1.1 Docs `_ instead. You might be one of them. We hope you find what you are looking for in the documentation, and would like to point out that you may also be interested in taking a class: .. image:: http://www.ansibleworks.com.s3-website-us-east-1.amazonaws.com/img/banners/training.png :alt: ansibleworks training :target: http://www.ansibleworks.com/training/ Before we dive into playbooks, configuration management, deployment, and orchestration, we'll learn how to get Ansible installed and some -basic information. We'll go over how to execute ad-hoc commands in parallel across your nodes using /usr/bin/ansible. We'll also see +basic information. We'll go over how to execute ad-hoc commands in parallel across your nodes using /usr/bin/ansible. We'll also see what sort of modules are available in Ansible's core (though you can also write your own, which we'll also show later). @@ -31,7 +31,7 @@ Overview ```````` .. image:: http://ansible.cc/img/ansible_arch.png - :alt: ansible architecture diagram + :alt: ansible architecture diagram :width: 566px :height: 439px @@ -41,7 +41,7 @@ Playbooks Playbooks are Ansible's orchestration language. At a basic level, playbooks can be used to manage configurations and deployments of remote machines. At a more advanced level, they can sequence multi-tier rollouts involving rolling updates, and can delegate actions -to other hosts, interacting with monitoring servers and load balancers along the way. You can start small and pick up more features +to other hosts, interacting with monitoring servers and load balancers along the way. You can start small and pick up more features over time as you need them. Playbooks are designed to be human-readable and are developed in a basic text language. There are multiple ways to organize playbooks and the files they include, and we'll offer up some suggestions on that and making the most out of Ansible. diff --git a/library/authorized_key b/library/authorized_key index b22afe19a2..fe88003823 100644 --- a/library/authorized_key +++ b/library/authorized_key @@ -65,10 +65,10 @@ author: Brad Olson EXAMPLES = ''' # Example using key data from a local file on the management machine -authorized_key: user=charlie key='$FILE(/home/charlie/.ssh/id_rsa.pub) +authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" # Using alternate directory locations: -authorized_key: user=charlie key='$FILE(/home/charlie/.ssh/id_rsa.pub)' sshdir='/etc/ssh/authorized_keys/charlie' manage_dir=no +authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" sshdir='/etc/ssh/authorized_keys/charlie' manage_dir=no ''' # Makes sure the public key line is present or absent in the user's .ssh/authorized_keys.