ansible: check for bootstrap early
Change-Id: I45c5b6268115c6b48ea167da9ec57e36b8a6e5e7
This commit is contained in:
parent
43f0081f09
commit
e9cac575eb
@ -13,18 +13,25 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Bootstrap nodes
|
- name: Initialize nodes
|
||||||
hosts: all
|
hosts: all
|
||||||
strategy: free
|
strategy: free
|
||||||
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Wait for nodes to go up
|
||||||
|
wait_for_connection:
|
||||||
|
timeout: 300
|
||||||
- name: Disable swap
|
- name: Disable swap
|
||||||
become: true
|
become: true
|
||||||
shell: swapoff -a
|
shell: swapoff -a
|
||||||
|
|
||||||
- name: Enable forwarding
|
- name: Enable forwarding
|
||||||
become: true
|
become: true
|
||||||
shell: iptables -P FORWARD ACCEPT
|
shell: iptables -P FORWARD ACCEPT
|
||||||
|
|
||||||
|
- name: Bootstrap nodes
|
||||||
|
hosts: all
|
||||||
|
strategy: free
|
||||||
|
tasks:
|
||||||
- name: Add repository keys
|
- name: Add repository keys
|
||||||
become: true
|
become: true
|
||||||
apt_key:
|
apt_key:
|
||||||
@ -73,10 +80,6 @@
|
|||||||
hosts: masters[0]
|
hosts: masters[0]
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Wait for bootstrap node to go up
|
|
||||||
wait_for_connection:
|
|
||||||
timeout: 300
|
|
||||||
|
|
||||||
- name: Drop configuration file
|
- name: Drop configuration file
|
||||||
become: true
|
become: true
|
||||||
template:
|
template:
|
||||||
@ -185,7 +188,7 @@
|
|||||||
- name: Apply manifest
|
- name: Apply manifest
|
||||||
changed_when: false
|
changed_when: false
|
||||||
shell: |
|
shell: |
|
||||||
kubectl apply -f {{ manifest_path }}/kubernetes-dashboard.yaml
|
kubectl apply -f {{ manifest_path }}/kubernetes-dashboard.yaml
|
||||||
|
|
||||||
- name: Wait for all nodes to get ready
|
- name: Wait for all nodes to get ready
|
||||||
shell: kubectl get nodes
|
shell: kubectl get nodes
|
||||||
|
Loading…
Reference in New Issue
Block a user