Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of openshift_serviceaccounts role #401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions templates/var/lib/ansible/playbooks/ipfailover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ cat << 'EOF' > /var/lib/os-apply-config/templates/var/lib/ansible/playbooks/ipfa
{{=<% %>=}}
- hosts: masters[0]
sudo: yes
roles:
- role: openshift_serviceaccounts
openshift_serviceaccounts_names:
- ipfailover
openshift_serviceaccounts_namespace: default
openshift_serviceaccounts_sccs:
- privileged

tasks:
- name: Create the ipfailover service account
oc_serviceaccount:
name: ipfailover
namespace: default

- name: Grant the ipfailover service account the appropriate scc
oc_adm_policy_user:
user: ipfailover
namespace: default
resource_kind: scc
resource_name: privileged

- name: Deploy Openshift IP failover for router
command: oadm ipfailover --create --service-account=ipfailover --interface=eth0 --selector='region=infra' --replicas={{ num_infra }} --virtual-ips="{{ router_vip }}" --credentials=/etc/origin/master/openshift-router.kubeconfig
when: ansible_first_run | default(false) | bool
Expand Down