首页 \ 问答 \ 如何使用Ansible等配置管理工具将代理和DNS设置应用于GNU / Linux Debian(How to apply proxy and DNS settings to GNU/Linux Debian using configuration management tool such as Ansible)

如何使用Ansible等配置管理工具将代理和DNS设置应用于GNU / Linux Debian(How to apply proxy and DNS settings to GNU/Linux Debian using configuration management tool such as Ansible)

我是配置管理工具的新手。 我想用Ansible。

我想将代理设置为几个GNU / Linux Debian(实际上是几个Raspbian)。

我想补充一下

export http_proxy=http://cache.domain.com:3128

/home/pi/.bashrc

我也想补充一下

Acquire::http::Proxy "http://cache.domain.com:3128";

/etc/apt.conf

我想将DNS设置为IP X1.X2.X3.X4创建一个/etc/resol.conf文件

nameserver X1.X2.X3.X4

我应该写什么剧本文件? 我该如何将这个剧本应用到我的服务器上?


I'm new to configuration management tool. I want to use Ansible.

I'd like to set proxy to several GNU/Linux Debian (in fact several Raspbian).

I'd like to append

export http_proxy=http://cache.domain.com:3128

to /home/pi/.bashrc

I also want to append

Acquire::http::Proxy "http://cache.domain.com:3128";

to /etc/apt.conf

I want to set DNS to IP X1.X2.X3.X4 creating a /etc/resol.conf file with

nameserver X1.X2.X3.X4

What playbook file should I write ? How should I apply this playbook to my servers ?


原文:https://stackoverflow.com/questions/19935225
更新时间:2023-09-19 07:09

最满意答案

使用RatingBar也可以查看结果

并通过以下方式设置值:

rate_bar.setRating(2f);

using RatingBar also to view the result

and set there the value by:

rate_bar.setRating(2f);

相关问答

更多
  • 使用RatingBar也可以查看结果 并通过以下方式设置值: rate_bar.setRating(2f); using RatingBar also to view the result and set there the value by: rate_bar.setRating(2f);
  • 按file_id分组,然后按平均顺序排序。 切断所有低于前5名的记录。 SELECT file_id, AVG(rating) as avg_rating FROM table GROUP BY file_id ORDER BY avg_rating DESC LIMIT 5 Group by a file_id and then simply order by the average. Cut off all records that fall below ...
  • 您可以对其进行分组,订购并获取第一个项目(并且您不再需要MoreLinq ): var result = item1.Union(item2) .GroupBy(e => e.id) .Select(g => g.OrderByDescending(e => e.Rating).First() ); You can group, order, and t ...
  • 如果您在点击之前将其用作预览,那么您可能希望使用如下的悬停功能: $('#stars .star').hover( function() { $(this).prevAll().andSelf().addClass('on'); $(this).nextAll().removeClass('on'); }, function() { $(this).parent().children().removeClass('on'); } ...
  • Mongoose / mongo让这非常容易。 您需要做的就是在服务器端路由中创建注释。 Comment.findOne({userId : request.auth.credentials._id}, function(err,data) { if (err) { // If err (doesn't find a comment made by that user) // Then create one } else { // If it hits here, it me ...
  • 简单清理您的项目并重新启动您的日食,希望它能正常工作。 Simple Clean your project and restart your eclipse, hopefully it works.
  • 我希望你已经找到了解决这个问题的方法,以防万一你不在这里: 将隐藏字段添加到评级控件所在的页面/用户控件,例如。 将以下脚本块添加到页面/用户控件: var ratingID =“”; //评级控制的客户ID var ratingClientID =“”; //评级控制的唯一ID var hfAverageRatingID =“”; //隐藏的字段ID 将下面的代码添加到外部js文件,然后在ScriptManagerProxy或ToolScriptManager控件中引用它: 变评; Sys.Applica ...
  • 这将输出仅缺少Carol评级的项目(user_id = 3需要作为参数传递): SELECT item.*, COUNT(rating.rating_value) AS rating_count FROM item INNER JOIN rating ON item.item_id = rating.item_id AND (3 NOT IN (SELECT r.user_id FROM rating AS r WHERE r.item_id = rating.ite ...
  • 你有SurveyQuestion POJO。 添加您的POJO新字段,您可以将其命名为评级 public class SurveyQuestion { public float rating = 0.0f; //this will be default value, if user has not rate, this value will be passed // Your other variabes, constructors etc. } 然后,您需要在RecyclerView适 ...
  • 将下面的内容添加到styles.xml中,并将样式设置为评级栏,如android:style =“@ style / myrating” ,宽度和高度设置为评级栏的wrap_content。