From b8f2f3d0b63e36458631715885eadb4dbcb27154 Mon Sep 17 00:00:00 2001 From: "Agarwal, Ruchira(ra1926)" Date: Thu, 13 Sep 2018 18:49:45 +0000 Subject: add LCM ansible playbooks LCM Playbooks for TrafficManagement Change-Id: I90bae6929ce279a113636b3a075f76bd6ba44188 Issue-ID: SDNC-425 Signed-off-by: Agarwal, Ruchira(ra1926) Former-commit-id: 2e3233e42ba9d352a88453617ec75a7cdeb7d60c --- .../ansible-server/src/main/yml/ansible_postcheck_jq@0.00.yml | 10 ++++++++++ .../ansible-server/src/main/yml/ansible_precheck_jq@0.00.yml | 10 ++++++++++ .../src/main/yml/ansible_quiescetraffic@0.00.yml | 6 ++++++ .../ansible-server/src/main/yml/ansible_resumetraffic@0.00.yml | 6 ++++++ .../src/main/yml/ansible_upgradesw_insjq@0.00.yml | 9 +++++++++ .../src/main/yml/ansible_upgradesw_remjq@0.00.yml | 9 +++++++++ 6 files changed, 50 insertions(+) create mode 100755 installation/ansible-server/src/main/yml/ansible_postcheck_jq@0.00.yml create mode 100755 installation/ansible-server/src/main/yml/ansible_precheck_jq@0.00.yml create mode 100755 installation/ansible-server/src/main/yml/ansible_quiescetraffic@0.00.yml create mode 100755 installation/ansible-server/src/main/yml/ansible_resumetraffic@0.00.yml create mode 100755 installation/ansible-server/src/main/yml/ansible_upgradesw_insjq@0.00.yml create mode 100755 installation/ansible-server/src/main/yml/ansible_upgradesw_remjq@0.00.yml (limited to 'installation/ansible-server/src/main/yml') diff --git a/installation/ansible-server/src/main/yml/ansible_postcheck_jq@0.00.yml b/installation/ansible-server/src/main/yml/ansible_postcheck_jq@0.00.yml new file mode 100755 index 00000000..18d20edf --- /dev/null +++ b/installation/ansible-server/src/main/yml/ansible_postcheck_jq@0.00.yml @@ -0,0 +1,10 @@ +--- +- hosts: all + tasks: + - name: check jq is not installed + stat: + path: /usr/bin/jq + register: abc + - fail: + msg: "jq is not installed" + when: abc.stat.exists == false diff --git a/installation/ansible-server/src/main/yml/ansible_precheck_jq@0.00.yml b/installation/ansible-server/src/main/yml/ansible_precheck_jq@0.00.yml new file mode 100755 index 00000000..00470807 --- /dev/null +++ b/installation/ansible-server/src/main/yml/ansible_precheck_jq@0.00.yml @@ -0,0 +1,10 @@ +--- +- hosts: all + tasks: + - name: check jq is not installed + stat: + path: /usr/bin/jq + register: abc + - fail: + msg: "jq is already installed" + when: abc.stat.exists == true diff --git a/installation/ansible-server/src/main/yml/ansible_quiescetraffic@0.00.yml b/installation/ansible-server/src/main/yml/ansible_quiescetraffic@0.00.yml new file mode 100755 index 00000000..000bc488 --- /dev/null +++ b/installation/ansible-server/src/main/yml/ansible_quiescetraffic@0.00.yml @@ -0,0 +1,6 @@ +--- +- hosts: all + tasks: + - name: Set vG to vG-MUX interface down + shell: vppctl set int state GigabitEthernet0/4/0 down + become: true diff --git a/installation/ansible-server/src/main/yml/ansible_resumetraffic@0.00.yml b/installation/ansible-server/src/main/yml/ansible_resumetraffic@0.00.yml new file mode 100755 index 00000000..32ebfc94 --- /dev/null +++ b/installation/ansible-server/src/main/yml/ansible_resumetraffic@0.00.yml @@ -0,0 +1,6 @@ +--- +- hosts: all + tasks: + - name: Set vG to vG-MUX interface up + shell: vppctl set int state GigabitEthernet0/4/0 up + become: true diff --git a/installation/ansible-server/src/main/yml/ansible_upgradesw_insjq@0.00.yml b/installation/ansible-server/src/main/yml/ansible_upgradesw_insjq@0.00.yml new file mode 100755 index 00000000..ec1d2de6 --- /dev/null +++ b/installation/ansible-server/src/main/yml/ansible_upgradesw_insjq@0.00.yml @@ -0,0 +1,9 @@ +--- +- hosts: all + tasks: + - name: install jq package + apt: + name: jq + state: latest + update_cache: yes + become: true diff --git a/installation/ansible-server/src/main/yml/ansible_upgradesw_remjq@0.00.yml b/installation/ansible-server/src/main/yml/ansible_upgradesw_remjq@0.00.yml new file mode 100755 index 00000000..c5be6330 --- /dev/null +++ b/installation/ansible-server/src/main/yml/ansible_upgradesw_remjq@0.00.yml @@ -0,0 +1,9 @@ +--- +- hosts: all + tasks: + - name: remove jq package + apt: + name: jq + state: absent + update_cache: yes + become: true -- cgit 1.2.3-korg