我想用没有sudo密码的用户sa1运行ansible:
第一次OK:
[root@centos1 cp]# ansible cent2 -m shell -a "sudo yum -y install httpd"
cent2 | SUCCESS | rc=0 >>
Run Code Online (Sandbox Code Playgroud)
第二次失败:
[root@centos1 cp]# ansible cent2 -s -m yum -a "name=httpd state=absent"
cent2 | FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "",
"module_stdout": "sudo: a password is required\r\n",
"msg": "MODULE FAILURE",
"parsed": false
}
Run Code Online (Sandbox Code Playgroud)
请帮忙!
我id "@+id/call"
在single_item.xml
使用findVewById
它时(布局setcontextview(R.layout.main)
).应用程序崩溃.如何修复错误
这是我用来创建表的代码
private static final String DATABASE_CREATE =
"create table notes (_id integer primary key autoincrement,"
+ "title text not null, body text not null,email text not null,group text);";
Run Code Online (Sandbox Code Playgroud)
logcat显示:
11-23 08:22:32.992: ERROR/AndroidRuntime(1008): FATAL EXCEPTION: main
11-23 08:22:32.992: ERROR/AndroidRuntime(1008): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android/com.android.managecontact}: android.database.sqlite.SQLiteException: near "group": syntax error: , while compiling: SELECT _id, title, body, email, group FROM notes ORDER BY title
11-23 08:22:32.992: ERROR/AndroidRuntime(1008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
11-23 08:22:32.992: ERROR/AndroidRuntime(1008): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-23 08:22:32.992: ERROR/AndroidRuntime(1008): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-23 08:22:32.992: …
Run Code Online (Sandbox Code Playgroud)