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

Got rid of pipe and grep #1461 #1472

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,17 @@
when:
- network_manager_conf_d_stat.stat.exists

- name: Reload NetworkManager service
block:
- name: Check if NetworkManager service is loaded
shell: >-
set -o pipefail &&
systemctl list-units --type=service --state=loaded | grep -q NetworkManager.service
args:
executable: /bin/bash
register: network_manager_service_status
changed_when: false
- name: Reload NetworkManager service
block:
- name: Populate service facts
service_facts:

- name: Reload NetworkManager service
systemd:
name: NetworkManager
state: reloaded
when:
- network_manager_service_status.rc == 0
when: copy_calico_network_manager_conf.changed
- name: Reload if NetworkManager service is running
systemd:
name: NetworkManager
state: reloaded
when: ansible_facts.services["NetworkManager.service"].state == "running"
when: copy_calico_network_manager_conf.changed

- name: Create calico deployment
template:
Expand All @@ -55,8 +48,4 @@
- name: Apply calico definition
environment:
KUBECONFIG: "/home/{{ admin_user.name }}/.kube/config"
shell: |
kubectl apply \
-f /home/{{ admin_user.name }}/calico.yml
args:
executable: /bin/bash
command: kubectl apply -f /home/{{ admin_user.name }}/calico.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@
- name: Apply canal deployment
environment:
KUBECONFIG: "/home/{{ admin_user.name }}/.kube/config"
shell: |
kubectl apply \
-f /home/{{ admin_user.name }}/canal.yml
args:
executable: /bin/bash
command: kubectl apply -f /home/{{ admin_user.name }}/canal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@
- name: Apply flannel definition
environment:
KUBECONFIG: "/home/{{ admin_user.name }}/.kube/config"
shell: |
kubectl apply \
-f /home/{{ admin_user.name }}/kube-flannel.yml
args:
executable: /bin/bash
command: kubectl apply -f /home/{{ admin_user.name }}/kube-flannel.yml