Many real excitable systems can be descibed as inhomogeneous media, where the inhomogeneity is an important factor for the formation of spiral waves and the changing of their dynamics. In this paper, we investigate the effect of excitability obstacles on spiral-wave dynamics. For an excitability-reduced obstacle, the neighbor spiral tip is attracted into the obstacle. When more localized obstacles are placed, the attactive case depends on the distribution, size and excitability of the obstcales. On the basis of analyzing the small-value area of the inhibitor variable, we illustrate the mechanism of these behaviors occuring. For an excitability-enhanced obstacle, the nearby spiral tip is repelled. The tip motion after the repelsive effect depends on the type of the initial spiral wave, i.e. rigidily rotating spiral wave or meandering spiral wave. In the present of more localized obstacles, there exist different behaviors for different distributions, sizes and excitabilities of the obstcales, and different types of initial waves.