added clovermine config

local
Glenn K. Lockwood 7 years ago
parent fb388d02a1
commit 3368d28ae5
  1. 15
      README.md
  2. 4
      hosts
  3. 3
      roles/common/vars/main.yml
  4. 3
      site.yml

@ -22,3 +22,18 @@ You can ensure that Ansible is able to configure using the following:
$ ansible -i hosts all -m ping $ ansible -i hosts all -m ping
$ ansible -i hosts -u pi --sudo-user root all -a "/usr/bin/id -u" $ ansible -i hosts -u pi --sudo-user root all -a "/usr/bin/id -u"
## Running the Playbook
Authentication will be an issue since the configuration disables the default
user (`pi`) and adds new privileged users. This means that you will probably
have to specify different `--sudo-user` options depending on how far into the
configuration you got. For example, assuming the `pi` user still exists,
$ ansible-playbook --inventory-file hosts --limit clovermine --ask-sudo-pass --sudo --sudo-user pi site.yml
You will be asked for the sudo password, which is the same as `pi`'s password
(which defaults to `raspberry`). Once the users are set up and `pi` is no
longer a valid user.
$ ansible-playbook -i hosts -l clovermine -K -s -U glock site.yml

@ -1 +1,3 @@
cloverfield ansible_host=192.168.1.153 ansible_connection=local cloverfield ansible_host=192.168.1.153
clovermine ansible_host=192.168.1.154
clovermill ansible_host=192.168.1.149

@ -1,8 +1,9 @@
--- ---
### Hosts that must be present in /etc/hosts ### Hosts that must be present in /etc/hosts
etc_hosts_contents: etc_hosts_contents:
- { name: 'cloverfield', ip: '192.168.1.153' }
- { name: 'clovermill', ip: '192.168.1.149' } - { name: 'clovermill', ip: '192.168.1.149' }
- { name: 'cloverfield', ip: '192.168.1.153' }
- { name: 'clovermine', ip: '192.168.1.154' }
### Users that must be present on the system ### Users that must be present on the system
create_users: create_users:

@ -1,7 +1,4 @@
--- ---
- hosts: all - hosts: all
remote_user: pi
sudo: yes
sudo_user: root
roles: roles:
- role: common - role: common

Loading…
Cancel
Save