Skip to content

Commit

Permalink
Fix become and become_user
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Houseknecht committed Sep 28, 2017
1 parent d829ee3 commit e6b1d4b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 11 deletions.
3 changes: 0 additions & 3 deletions tasks/Debian_driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
dest: /usr/local/bin/docker-machine-driver-kvm
mode: 0755
become: yes
become_user: root

- name: Install packages
apt:
Expand All @@ -16,7 +15,6 @@
- libvirt-bin
- qemu-kvm
become: yes
become_user: root

- name: Get current user
command: whoami
Expand All @@ -28,7 +26,6 @@
groups: libvirt
append: yes
become: yes
become_user: root

- name: Refresh user groups
shell: newgrp libvirt
Expand Down
3 changes: 0 additions & 3 deletions tasks/RedHat_driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
dest: /usr/local/bin/docker-machine-driver-kvm
mode: 0755
become: yes
become_user: root

- name: Install packages
dnf:
Expand All @@ -16,7 +15,6 @@
- libvirt
- qemu-kvm
become: yes
become_user: root

- name: Get current user
command: whoami
Expand All @@ -28,7 +26,6 @@
groups: libvirt
append: yes
become: yes
become_user: root

- name: Refresh user groups
shell: newgrp libvirt
2 changes: 0 additions & 2 deletions tasks/add_hostname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
regexp: '{{ openshift_hostname }}'
state: absent
become: yes
become_user: root

- name: Add hostname
lineinfile:
dest: /etc/hosts
regexp: '^{{ default_ip.stdout }}'
line: "{{ default_ip.stdout }} {{ openshift_hostname }}"
become: yes
become_user: root

2 changes: 1 addition & 1 deletion tasks/copy_oc_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
mode: 0755
remote_src: yes
become: yes
become_user: root

1 change: 0 additions & 1 deletion tasks/install_minishift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
remote_src: yes
mode: 0775
become: yes
become_user: root

- name: Remove the temp directory
file:
Expand Down
5 changes: 4 additions & 1 deletion tasks/isrunning.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- name: Check if minishift is running
command: minishift status
register: minishift_state
ignore_errors: yes

- debug:
msg: "Minishift is already running. Use minishift_restart to continue."
Expand All @@ -20,13 +21,15 @@
when: minishift_state.stdout == 'Running'

- name: Deleting minishift
command: minishift delete
command: minishift delete --force
when: minishift_delete
ignore_errors: yes
become: yes

- name: Remove ~/.minishift
file:
path: ~/.minishift
state: absent
when: minishift_delete
become: yes

0 comments on commit e6b1d4b

Please sign in to comment.