-
-
Save wahello/c8c59f6523fe974dced068aea02d390c to your computer and use it in GitHub Desktop.
Revisions
-
Jose Luis Franco created this gist
Sep 8, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ --- - hosts: 127.0.0.1 connection: local gather_facts: no tasks: - name: Check if swift-storage services are deployed command: systemctl is-enabled --quiet "{{ item }}" register: swift_services_enabled ignore_errors: true with_items: - openstack-swift-account-auditor - openstack-swift-account-reaper - openstack-swift-account-replicator - openstack-swift-account - openstack-swift-container-auditor - openstack-swift-container-replicator - openstack-swift-container-updater - openstack-swift-container - openstack-swift-object-auditor - openstack-swift-object-expirer - openstack-swift-object-replicator - openstack-swift-object-updater - openstack-swift-object - debug: var: swift_services_enabled - name: Check that services are running command: systemctl is-active --quiet "{{ item.item }}" with_items: "{{ swift_services_enabled.results }}" when: item.rc == 0 - name: Stop and disable swift storage services service: name={{ item.item }} state=stopped enabled=no with_items: "{{ swift_services_enabled.results }}" when: item.rc == 0