diff --git a/inventory/host_vars/ch01.balsillie.house/ansible_become.yml b/inventory/host_vars/ch01.balsillie.house/ansible_become.yml new file mode 100644 index 0000000..75fbfde --- /dev/null +++ b/inventory/host_vars/ch01.balsillie.house/ansible_become.yml @@ -0,0 +1,3 @@ +ansible_become_method: ansible.builtin.sudo +ansible_sudo_user: root +ansible_sudo_pass: "{{ lookup('community.general.passwordstore', 'ansible/become-password') }}" diff --git a/inventory/host_vars/ch01.balsillie.house/ansible_connection.yml b/inventory/host_vars/ch01.balsillie.house/ansible_connection.yml new file mode 100644 index 0000000..be7fea2 --- /dev/null +++ b/inventory/host_vars/ch01.balsillie.house/ansible_connection.yml @@ -0,0 +1,4 @@ +ansible_connection: ansible.builtin.ssh +ansible_ssh_host: ch01.balsillie.house +ansible_ssh_port: 22 +ansible_ssh_user: ladmin diff --git a/inventory/inventory.yml b/inventory/inventory.yml new file mode 100644 index 0000000..3d18591 --- /dev/null +++ b/inventory/inventory.yml @@ -0,0 +1,5 @@ +all: + children: + container_hosts: + hosts: + ch01.balsillie.house: diff --git a/playbooks/container-host.yml b/playbooks/container-host.yml new file mode 100644 index 0000000..9549d07 --- /dev/null +++ b/playbooks/container-host.yml @@ -0,0 +1,12 @@ +--- + +- name: Configure container hosts + hosts: + - ch01.balsillie.house + gather_facts: false + tasks: + + - name: Ping + become: true + ansible.builtin.ping: + data: "pong"