我的剧本有以下片段。它正确地安装了软件,但是当我重新运行playbook时,“configure”和“make install”步骤将再次运行。重演显示了两个变化。脚本完成后,计算机的状态是正确的,但我不想重新运行这些步骤。如何跳过已运行的步骤?
- name: Install smalt
block:
# Download and uncompress smalt
- unarchive:
src="https://sourceforge.net/projects/smalt/files/smalt-0.7.6-static.tar.gz"
dest="{{ansible_user_dir}}/software"
creates="{{ansible_user_dir}}/software/smalt-0.7.6"
copy=no
- name: configure
command: ./configure
args:
chdir: "{{ansible_user_dir}}/software/smalt-0.7.6"
- make:
chdir: "{{ansible_user_dir}}/software/smalt-0.7.6"
- make:
chdir: "{{ansible_user_dir}}/software/smalt-0.7.6"
target: install
become: yes