X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju-charms%2Flayers%2Fansible-charm%2Factions%2Fansible-playbook;fp=juju-charms%2Flayers%2Fansible-charm%2Factions%2Fansible-playbook;h=0000000000000000000000000000000000000000;hb=5c78e636753044e1cd39b06fb154556e090591a3;hp=6133ca5969a0227fe3dd0f7fbe2bb3ff481d3072;hpb=f52f42c54c8c4b9d249401a22648e8660c587750;p=osm%2Fdevops.git diff --git a/juju-charms/layers/ansible-charm/actions/ansible-playbook b/juju-charms/layers/ansible-charm/actions/ansible-playbook deleted file mode 100755 index 6133ca59..00000000 --- a/juju-charms/layers/ansible-charm/actions/ansible-playbook +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python3 -# -# OSM devops/juju-charms - Ansible charm inside OSM devops -# -# Copyright 2017-2018 Universidad Carlos III de Madrid -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import sys -sys.path.append('lib') - -from charms.reactive import main -from charms.reactive import set_state -from charmhelpers.core.hookenv import action_fail, action_name - -""" -`set_state` only works here because it's flushed to disk inside the `main()` -loop. remove_state will need to be called inside the action method. -""" -set_state('actions.{}'.format(action_name())) - -try: - main() -except Exception as e: - action_fail(repr(e))