有没有办法在一个可行的剧本中只运行一个任务?
例如,“roles/hadoop_primary/tasks/hadoop_master.yml”。我有“启动hadoop作业跟踪服务”任务。我能只运行一个任务吗?
hadoop_master。yml文件:
# Playbook for Hadoop master servers
- name: Install the namenode and jobtracker packages
apt: name={{item}} force=yes state=latest
with_items:
- hadoop-0.20-mapreduce-jobtracker
- hadoop-hdfs-namenode
- hadoop-doc
- hue-plugins
- name: start hadoop jobtracker services
service: name=hadoop-0.20-mapreduce-jobtracker state=started
tags:
debug