geerlingguy / geerlingguy/ansible-for-devops

Trying to run Vagrant provision after making the ansible-playbook.yml file chapter one

Open
#608 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9.9k
Forks
3.8k
PR merge metrics
No merged PRs in 30d

Description

I am working through the Jeff geerling "ansible for dev ops book.
I have created a RHEL9 VM in virtual box and use am using vagrant.

When I run the vagrant provision command it errors out with the following:

> PS C:\Vagrant> vagrant provision
> ==> default: Running provisioner: ansible...
> Windows is not officially supported for the Ansible Control Machine.
> Please check https://docs.ansible.com/intro_installation.html#control-machine-requirements
> Vagrant gathered an unknown Ansible version:
>
>
> and falls back on the compatibility mode '1.8'.
>
> Alternatively, the compatibility mode can be specified in your Vagrantfile:
> https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode
> default: Running ansible-playbook...
> The Ansible software could not be found! Please verify
> that Ansible is correctly installed on your host system.
>
> If you haven't installed Ansible yet, please install Ansible
> on your host system. Vagrant can't do this for you in a safe and
> automated way.
> Please check https://docs.ansible.com for more information.

I added the lines below to the end of my vagrantfile on my windows 11 device:

> # Provisioning configuration for Ansible.
> config.vm.provision "ansible" do |ansible|
> ansible.playbook = "playbook.yml"
> end
> end

I also created the playbook.yml file below:

> ---
> - hosts: all
> become: yes
>
> tasks:
> - name: Ensure chrony (for time synchronization) is installed.
> dnf:
> name: chrony
> state: present
>
> - name: Ensure chrony is running.
> service:
> name: chronyd
> state: started
> enabled: yes

I installed ansible on my RHEL9 machine using `python3 - m pip install --user ansible`

I am new to Ansible and any help would be appreciated.

Am I missing something?

Thank you!!

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the Vagrantfile's Ansible provisioner and the referenced playbook.yml; start with the control-machine requirements and the location where Ansible was installed. Done means vagrant provision can find ansible-playbook and applies the playbook's chrony tasks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.