com.github.woostju.ansible.command.FileCommand Maven / Gradle / Ivy
package com.github.woostju.ansible.command;
import java.util.List;
import org.assertj.core.util.Lists;
import com.github.woostju.ansible.Module;
/**
* Manage files and file properties
* Get more information from file module.
* @author jameswu
*
*/
public class FileCommand extends Command{
public FileCommand(List hosts, List module_args, List options) {
super(hosts, Module.file.toString(), module_args, options);
}
/**
*
* @param hosts target hosts
* @param path Path to the file being managed.
* @param state Choices: absent directory file hard link touch
*/
public FileCommand(List hosts, String path, FileCommandState state) {
this(hosts, Lists.newArrayList(), null);
this.getModuleArgs().add("path="+path);
this.getModuleArgs().add("state="+state.toString());
}
public static enum FileCommandState{
absent,
directory,
file,
hard,
link,
touch
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy