Skip to content

Commit

Permalink
final tasks should not be done sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
marklee77 committed Nov 10, 2015
1 parent d16f727 commit c8ac8d1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
- hosts: localhost
become: False
sudo: False
gather_facts: False
tasks:
Expand Down Expand Up @@ -38,6 +37,7 @@

- hosts: controller
environment: openstack_no_http_proxy_environment
sudo: False
vars:
cirros_url:
http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
Expand All @@ -50,8 +50,6 @@
src: templates/admin.openrc
dest: "{{ ansible_env.PWD }}/admin.openrc"
mode: 0600
owner: "{{ ansible_ssh_user }}"
group: "{{ ansible_ssh_user }}"

- name: create demo tenant
keystone_user:
Expand Down Expand Up @@ -81,8 +79,6 @@
src: templates/demo.openrc
dest: "{{ ansible_env.PWD }}/demo.openrc"
mode: 0600
owner: "{{ ansible_ssh_user }}"
group: "{{ ansible_ssh_user }}"

- name: ensure that cirros image has been downloaded
environment: openstack_http_proxy_environment
Expand Down Expand Up @@ -174,7 +170,6 @@
state: present

- name: create ssh keypair
sudo_user: "{{ ansible_ssh_user }}"
command: ssh-keygen -q -f {{ ansible_env.PWD }}/.ssh/id_rsa -P ""
creates={{ ansible_env.PWD }}/.ssh/id_rsa

Expand Down Expand Up @@ -250,7 +245,7 @@
changed_when: false

- name: verify that virtual machine can be logged into via ssh
command: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no cirros@{{ demo_floating_ip.public_ip }} hostname
command: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no cirros@{{ demo_floating_ip.public_ip }} /bin/true
changed_when: false

- name: print success message
Expand Down

0 comments on commit c8ac8d1

Please sign in to comment.