From: Alfredo Deza Date: Mon, 20 Jun 2016 12:43:30 +0000 (-0400) Subject: ansible: add a sample playbook X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd55f4a324543ff75348a8941a48ee657f3695c3;p=ceph-build.git ansible: add a sample playbook Signed-off-by: Alfredo Deza --- diff --git a/ansible/deploy_graphite.yml b/ansible/deploy_graphite.yml new file mode 100644 index 000000000..8d478edab --- /dev/null +++ b/ansible/deploy_graphite.yml @@ -0,0 +1,11 @@ +--- + +- hosts: all + user: vagrant + roles: + - graphite + vars: + fqdn: "graphite.local" + app_name: "graphite" + development_server: true + graphite_api_key: "secret" diff --git a/ansible/roles/graphite/tasks/main.yml b/ansible/roles/graphite/tasks/main.yml index e3d8b0d62..cc1603a4f 100644 --- a/ansible/roles/graphite/tasks/main.yml +++ b/ansible/roles/graphite/tasks/main.yml @@ -2,7 +2,11 @@ - name: "Build hosts file" sudo: yes - lineinfile: dest=/etc/hosts regexp=".*{{ fqdn }}$" line="127.0.1.1 {{ fqdn }}" state=present + lineinfile: + dest: /etc/hosts + regexp: ".*{{ fqdn }}$" + line: "127.0.1.1 {{ fqdn }}" + state: present - name: Set Hostname with hostname command sudo: yes