Skip to content

Commit 3736c35

Browse files
kaizhang-shanxiYongzhi Pan
authored andcommitted
make compatible with centos7.3
1 parent 3de01d5 commit 3736c35

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

playbooks/roles/bootstrap-binary-stop/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
- name: stop deployd service
1616
service: name=deployd state=stopped
17-
when: deployd|success
17+
when: deployd.stat.exists
1818

1919
- name: test if networkd binary path exists
2020
stat: path=/usr/bin/networkd

playbooks/roles/mysql/tasks/main.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
- name: initialize databases
1414
command: |
1515
docker exec mysql_container mysql -uroot -e "
16-
CREATE DATABASE console;
17-
CREATE USER console@'%' identified by 'console';
18-
GRANT ALL ON console.* to console@'%';
16+
CREATE DATABASE IF NOT EXISTS console;
17+
GRANT ALL ON console.* TO console@'%' IDENTIFIED BY 'console';
1918
FLUSH PRIVILEGES;
2019
"

playbooks/roles/prepare/tasks/main.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,24 @@
99
- name: enable selinux
1010
selinux: policy=targeted state=permissive
1111

12+
- name: get stat of nscd.service
13+
stat: path=/etc/systemd/system/nscd.service
14+
register: nscd
15+
ignore_errors: yes
16+
1217
- name: disable nscd
1318
service: name=nscd enabled=no state=stopped
19+
when: nscd.stat.exists
1420

1521
- name: load node info from etcd
1622
command: etcdctl get /lain/nodes/nodes/{{ node_name }}:{{ node_ip }}:{{ ssh_port }}
1723
register: result
1824
ignore_errors: yes
1925

26+
- name: delete any interface calico created previously
27+
command: for interface in $(ip link show | grep cali | awk '{print $2}' | awk -F':' '{print $1}'); do ip link delete ${interface}; done
28+
ignore_errors: yes
29+
2030
- set_fact:
2131
node_info: "{{result.stdout|from_json}}"
2232
when: result|success and result.stdout != ""

playbooks/roles/registry/tasks/push.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
- name: restart calico-felix
2+
service: name=calico-felix state=restarted
3+
ignore_errors: yes
4+
15
- name: wait_for registry ready
26
command: curl -m 2 http://registry.lain/v2/
37
register: result

0 commit comments

Comments
 (0)