summaryrefslogtreecommitdiffstats
path: root/roles/flannel
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2016-04-25 16:18:37 -0400
committerJason DeTiberus <detiber@gmail.com>2016-04-25 16:18:37 -0400
commit4e01bd4a87088f53af309b36ce4da431888fcaf4 (patch)
tree557c508905cf93d2f37928b9fbc8600d2a416bdb /roles/flannel
parent3262718f8fc4658a3b223823244f1f78cb0eb6c8 (diff)
parenta5386b0f51a2b20f0b5c382663bb5827438da437 (diff)
downloadopenshift-4e01bd4a87088f53af309b36ce4da431888fcaf4.tar.gz
openshift-4e01bd4a87088f53af309b36ce4da431888fcaf4.tar.bz2
openshift-4e01bd4a87088f53af309b36ce4da431888fcaf4.tar.xz
openshift-4e01bd4a87088f53af309b36ce4da431888fcaf4.zip
Merge pull request #1804 from abutcher/v2-sudo
Replace deprecated sudo with become.
Diffstat (limited to 'roles/flannel')
-rw-r--r--roles/flannel/handlers/main.yml4
-rw-r--r--roles/flannel/tasks/main.yml12
2 files changed, 8 insertions, 8 deletions
diff --git a/roles/flannel/handlers/main.yml b/roles/flannel/handlers/main.yml
index f9b9ae7f1..981ea5c7a 100644
--- a/roles/flannel/handlers/main.yml
+++ b/roles/flannel/handlers/main.yml
@@ -1,8 +1,8 @@
---
- name: restart flanneld
- sudo: true
+ become: yes
service: name=flanneld state=restarted
- name: restart docker
- sudo: true
+ become: yes
service: name=docker state=restarted
diff --git a/roles/flannel/tasks/main.yml b/roles/flannel/tasks/main.yml
index aa27b674e..6b6dfb423 100644
--- a/roles/flannel/tasks/main.yml
+++ b/roles/flannel/tasks/main.yml
@@ -1,11 +1,11 @@
---
- name: Install flannel
- sudo: true
+ become: yes
action: "{{ ansible_pkg_mgr }} name=flannel state=present"
when: not openshift.common.is_containerized | bool
- name: Set flannel etcd url
- sudo: true
+ become: yes
lineinfile:
dest: /etc/sysconfig/flanneld
backrefs: yes
@@ -13,7 +13,7 @@
line: '\1{{ etcd_hosts|join(",") }}'
- name: Set flannel etcd key
- sudo: true
+ become: yes
lineinfile:
dest: /etc/sysconfig/flanneld
backrefs: yes
@@ -21,7 +21,7 @@
line: '\1{{ flannel_etcd_key }}'
- name: Set flannel options
- sudo: true
+ become: yes
lineinfile:
dest: /etc/sysconfig/flanneld
backrefs: yes
@@ -29,7 +29,7 @@
line: '\1--iface {{ flannel_interface }} --etcd-cafile={{ etcd_peer_ca_file }} --etcd-keyfile={{ etcd_peer_key_file }} --etcd-certfile={{ etcd_peer_cert_file }}'
- name: Enable flanneld
- sudo: true
+ become: yes
service:
name: flanneld
state: started
@@ -37,7 +37,7 @@
register: start_result
- name: Remove docker bridge ip
- sudo: true
+ become: yes
shell: ip a del `ip a show docker0 | grep "inet[[:space:]]" | awk '{print $2}'` dev docker0
notify:
- restart docker