我正在尝试使用 Ansible 来配置 Vagrant VM。VM 正在运行 CentOS 6.4。我正在使用以下(缩写)ansible playbook:
- hosts: default
vars:
home: '/home/vagrant'
curl_version: '7_19_7'
curl_url: 'https://github.com/bagder/curl/archive/curl-{{ curl_version }}.tar.gz'
curl_dir: '{{ home }}/curl-curl-{{ curl_version }}'
# user: vagrant
remote_user: vagrant
sudo: yes
tasks:
- name: Ensure required packages and installed and up to date - pt1
yum: pkg={{ item }} state=present
with_items:
- make
- gcc
- etc...
# Lots more yum tasks in here
- name: Ensure CURL source downloaded
get_url: url={{ curl_url }} dest=/home/vagrant/curl-{{ curl_version }}.tar …
Run Code Online (Sandbox Code Playgroud)