Closed christianmagill closed 6 years ago
Did you edit the hosts
file and add your server under [debops_all_hosts]
and [wordpress]
?
Yes, Here's what that looks like...
# This is an Ansible inventory file in INI format. You can define a list of
# hosts and groups to be managed by this particular inventory.
# Hosts listed under [debops_all_hosts] will have common DebOps plays
# ran against them. It will include services such as iptables, DNS, Postfix,
# sshd configuration and more.
#
# View the list here:
# https://github.com/debops/debops-playbooks/blob/master/playbooks/common.yml
[debops_all_hosts]
server-01.serverbox.space
[wordpress]
server-01.serverbox.space
Ok, my bad. I should have seen it was ok. Let me try tonight and see.
Thanks, I appreciate it!
Ok, it works for me:
debops bootstrap -u root --limit dev.carlalexander.ca
Running Ansible playbook from:
/usr/local/share/debops/debops-playbooks/playbooks/bootstrap.yml ...
[DEPRECATION WARNING]: ANSIBLE_HOSTS option, The variable is misleading as it can be a list of hosts and/or paths to inventory sources , use ANSIBLE_INVENTORY instead. This
feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Could not match supplied host pattern, ignoring: debops_service_bootstrap
PLAY [Bootstrap Python support on a host] ****************************************************************************************************************************************
TASK [debops.bootstrap/raw : Update APT repositories, install mandatory packages] ************************************************************************************************
The authenticity of host 'dev.carlalexander.ca (206.189.234.229)' can't be established.
ECDSA key fingerprint is SHA256:6B/B3E28uH9037z/QFUi2yjWh+rbe+rfS0uuBaEckuU.
Are you sure you want to continue connecting (yes/no)? yes
changed: [dev.carlalexander.ca]
PLAY [Bootstrap host for Ansible management] *************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************
ok: [dev.carlalexander.ca]
TASK [debops.bootstrap : Make sure essential software is installed] **************************************************************************************************************
ok: [dev.carlalexander.ca] => (item=python)
ok: [dev.carlalexander.ca] => (item=python-apt)
changed: [dev.carlalexander.ca] => (item=python-pip)
ok: [dev.carlalexander.ca] => (item=sudo)
ok: [dev.carlalexander.ca] => (item=lsb-release)
ok: [dev.carlalexander.ca] => (item=dbus)
TASK [debops.bootstrap : Install custom Ansible local facts] *********************************************************************************************************************
changed: [dev.carlalexander.ca]
TASK [debops.bootstrap : Gather host facts] **************************************************************************************************************************************
ok: [dev.carlalexander.ca]
TASK [debops.bootstrap : Gather information about existing users] ****************************************************************************************************************
ok: [dev.carlalexander.ca]
TASK [debops.bootstrap : Gather information about existing home directories] *****************************************************************************************************
ok: [dev.carlalexander.ca] => (item=/var/localcarlalexander)
TASK [debops.bootstrap : Create required system groups] **************************************************************************************************************************
changed: [dev.carlalexander.ca] => (item=admins)
ok: [dev.carlalexander.ca] => (item=staff)
ok: [dev.carlalexander.ca] => (item=adm)
ok: [dev.carlalexander.ca] => (item=sudo)
TASK [debops.bootstrap : Create admin accounts] **********************************************************************************************************************************
changed: [dev.carlalexander.ca] => (item={u'name': u'carlalexander'})
TASK [debops.bootstrap : Set admin home directory group and permissions] *********************************************************************************************************
changed: [dev.carlalexander.ca] => (item=[{u'name': u'carlalexander'}, {'_ansible_parsed': True, u'stat': {u'exists': False}, '_ansible_item_result': True, '_ansible_no_log': False, 'failed': False, u'changed': False, 'item': u'/var/localcarlalexander', u'invocation': {u'module_args': {u'checksum_algorithm': u'sha1', u'get_checksum': True, u'follow': False, u'path': u'/var/localcarlalexander', u'get_md5': None, u'get_mime': True, u'get_attributes': True}}, '_ansible_ignore_errors': None}])
TASK [debops.bootstrap : Install ssh public key on admin accounts] ***************************************************************************************************************
changed: [dev.carlalexander.ca] => (item={'name': u'root'})
changed: [dev.carlalexander.ca] => (item={u'name': u'carlalexander'})
TASK [debops.bootstrap : Configure system group with passwordless access in sudo] ************************************************************************************************
changed: [dev.carlalexander.ca] => (item={u'regexp': u'^Defaults: %admins !?requiretty', u'line': u'Defaults: %admins !requiretty'})
changed: [dev.carlalexander.ca] => (item={u'regexp': u'^Defaults: %admins env_check\\s', u'line': u'Defaults: %admins env_check += "SSH_CLIENT"'})
changed: [dev.carlalexander.ca] => (item={u'regexp': u'^%admins\\s', u'line': u'%admins ALL = (ALL:ALL) NOPASSWD: SETENV: ALL'})
TASK [debops.bootstrap : Ensure /etc/sudoers includes /etc/sudoers.d] ************************************************************************************************************
ok: [dev.carlalexander.ca]
TASK [debops.bootstrap : Enforce new hostname] ***********************************************************************************************************************************
skipping: [dev.carlalexander.ca]
TASK [debops.bootstrap : Save hostname in /etc/hostname] *************************************************************************************************************************
skipping: [dev.carlalexander.ca]
TASK [debops.bootstrap : Save hostname and domain in /etc/hosts] *****************************************************************************************************************
changed: [dev.carlalexander.ca] => (item={u'insertafter': u'^127\\.0\\.0\\.1', u'ip_address': u'127.0.1.1', u'type': u'inet4'})
skipping: [dev.carlalexander.ca] => (item={u'ip_address': u'0::1', u'type': u'inet6', u'insertbefore': u'^::1'})
PLAY RECAP ***********************************************************************************************************************************************************************
dev.carlalexander.ca : ok=14 changed=9 unreachable=0 failed=0
Make sure essential software is installed ------------------------------ 65.78s
Update APT repositories, install mandatory packages -------------------- 53.45s
Install custom Ansible local facts -------------------------------------- 7.48s
Create required system groups ------------------------------------------- 7.16s
Configure system group with passwordless access in sudo ----------------- 5.38s
Install ssh public key on admin accounts -------------------------------- 3.78s
Gathering Facts --------------------------------------------------------- 3.65s
Gather host facts ------------------------------------------------------- 2.87s
Create admin accounts --------------------------------------------------- 1.98s
Set admin home directory group and permissions -------------------------- 1.90s
Here's the version details:
ansible-playbook --version
ansible-playbook 2.5.2
config file = /Users/carlalexander/Projects/carlalexander/debops/ansible.cfg
configured module search path = [u'/Users/carlalexander/Projects/carlalexander/debops/ansible/library', u'/usr/local/share/debops/debops-playbooks/playbooks/library', u'/usr/share/ansible/library']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.13 (default, Dec 18 2016, 07:03:39) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
The only thing I'm not sure from your original post is the Ubuntu version. Is it the default one?
Yes, it is the default version 16.04.4 x64
Did you install all this yesterday? Is DebOps up to date?
Yes, day before yesterday v0.4.2. Maybe there's an issue with the .space domain extension?
How did you install it? Is it the mono repo?
I followed the installation instructions in the wiki.
Does pip install debops
install the mono repo now @drybjed? I have an issue to support it. It's possible the project is broken with it right now.
I tried rerunning the debops bootstrap -u root -vvv
command again and I think it's working:
PLAY RECAP ***** server-01.serverbox.space : ok=29 changed=13 unreachable=0 failed=0
Install requested APT packages ----------------------------------------- 10.54s Ensure that requested UNIX system groups exist -------------------------- 8.92s Remove tmpfiles configuration if not specified -------------------------- 8.75s Remove sudo configuration if not specified ------------------------------ 7.32s Make sure essential software is installed ------------------------------- 3.60s Install ssh public key on admin accounts -------------------------------- 3.48s Save Python local facts ------------------------------------------------- 3.43s Save system groups local facts ------------------------------------------ 3.32s Configure sudo for UNIX system groups ----------------------------------- 3.28s Install custom Ansible local facts -------------------------------------- 3.23s
Did you get it to work @christianmagill?
Yes thanks! To be honest I’m not sure what the difference was, I ran the same command. As far as the mono repo, is there anything I should be doing to install that? Any particular benefits?
@carlalexander The pip install debops
now installs the scripts as well as a snapshot of the Ansible roles/playbooks from the monorepo at a particular release (ie. v0.7.2
is currently latest). You should be able to use the "snapshot" of DebOps right away, or you can run debops-update
to get the latest changes in the monorepo from GitHub.
I need to sort through all that soon. Glad this working now though. Closing 😄
Hi,
I'm attempting to setup my first installation/server.
Following the format
wordpress.example.com
I've:serverbox.space
server-01.serverbox.space
server-01.serverbox.space
under both sections.debops bootstrap -u root -vvv
Running the above command I receive two warnings:
[WARNING]: Could not match supplied host pattern, ignoring: debops_service_bootstrap
and
Here's the full log.
Much thanks for any help!