我使用ansible > win_package 方法安装visual studio 2013,2015,2017 和2019。对于VS2017和2019的安装,win_package通知有变化,但服务器上没有变化。该任务的运行时间不到 1 分钟,而实际安装需要 5-10 分钟。这可能是什么原因?
另外,这个github线程也有类似的问题,但是没有解决方法。 https://github.com/ansible/ansible/issues/51385
add_filter( 'nav_menu_css_class', 'add_my_class_to_nav_menu', 10, 2 );
function add_my_class_to_nav_menu( $classes, $item ){
$classes[] = 'nav-item';
return $classes;
}
add_filter( 'nav_menu_link_attributes', 'add_link_atts');
function add_link_atts($atts) {
$atts['class'] = 'nav-link js-scroll-trigger';
return $atts;
}
VS INSTALLER TASK
- name: VS Installer
win_package:
path: 'D:\Software\VisualStudio\ansible\install\{{ item.year }}\{{ item.installer_name }}'
creates_path: "{{ item.create_path }}"
state: present
arguments: "{{ item.args }}"
loop: "{{ visualstudio }}"
VARIABLES FILE
- year: "2017"
eng_serv_path: network file share
create_path: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe'
installer_name: vs_enterprise.exe
product_key: product key
version: enterprise
args: '--in D:\Software\VisualStudio\ansible\install\2017\Response_vs2017.json'
- year: "2019"
eng_serv_path: network file share
create_path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe'
installer_name: vs_enterprise__25978676.1624374836.exe
product_key: product key
version: enterprise
args: '--in D:\Software\VisualStudio\ansible\install\2019\Response_vs2019.json'
答案 0 :(得分:0)
我发现的解决方案不是使用响应文件,而是直接传递参数并且它起作用了