Re: installing paddles via ansible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One additional trick to avoid the creation of the host file and install paddles on the same host that is running ansible:

ansible-playbook -i paddles, -c local paddles.yml

On 25/03/2016 18:19, Loic Dachary wrote:
> Hi Thierry,
> 
> Thanks for the hand holding today and congrats on your first paddles installation :-) To summarize what we did:
> 
> * git clone --recursive -b stable-1.9 https://github.com/ansible/ansible.git
> * cd ansible ; source hacking/env-setup
> * cd ceph-cm-ansible
> * cat > /etc/ansible/secrets/paddles.yml <<EOF
> ---
> db_pass: toto
> EOF
> * cat > host <<EOF
> [paddles]
> 149.202.170.114
> [paddles:vars]
> ansible_ssh_user=ubuntu
> ansible_ssh_keys=/home/loic/.ssh/id_rsa
> EOF
> ansible-playbook -v -i host paddles.yml
> 
> firefox http://149.202.170.114:8080/
> {"_help_": {"docs": "https://github.com/ceph/paddles";, "extensions": {"Chrome": "https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc";, "Firefox": "https://addons.mozilla.org/en-US/firefox/addon/jsonview/"}}, "last_job": " ago", "last_run": " ago"}
> 
> The fixes we made have been added to a pull request at https://github.com/ceph/ceph-cm-ansible/pull/219
> 
> I'll also remember that:
> 
> * Whenever an error message such as:
> 
> TASK: [paddles | Set paddles_address] ***************************************** 
> fatal: [149.202.170.114] => error while evaluating conditional: not paddles_address.startswith('http')
> 
> is displayed, finding the file responsible for it is best served by grepping the string after the | "Set paddles_address" in this case. There is no way to ask ansible to display the line and the file where the error happens, in the same way a compiler would.
> 
> * I discovered the expected structure of the secret file content by checking out the secret ansible secret repository, running find | grep paddles and uncrypting the secret file using the password found on a secret machine to which I luckily had access. But I did not show you the secret password so it's still a secret.
> 
> Cheers
> 
> On 02/03/2016 13:09, Loic Dachary wrote:
>> Hi Zack,
>>
>> I'm running ansible to deploy paddles as follows. I am missing secrets. But I have no secrets :-) This is just a standalone instance for tests, what would be the minimal way to define the secrets paddle needs ?
>>
>> Thanks in advance for your help !
>>
>> $ cat host
>> [paddles]
>> 167.114.243.17
>> [paddles:vars]
>> ansible_ssh_user=ubuntu
>> ansible_ssh_keys=/home/loic/.ssh/id_rsa
>>
>> (virtualenv)loic@fold:~/software/ceph/ceph-cm-ansible$ ansible-playbook -i host paddles.yml 
>>
>> PLAY ***************************************************************************
>>
>> TASK [setup] *******************************************************************
>> ok: [167.114.243.17]
>>
>> TASK [users : Merge extra_admin_users into managed_admin_users] ****************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Remove managed_admin_users from managed_users] *******************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Filter the managed_users list] ***********************************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Filter the managed_admin_users list] *****************************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Create all admin users with sudo access.] ************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{managed_admin_users}}'). This feature will be removed in a future release. 
>> Deprecation warnings can be disabled by setting deprecation_warnings=False in 
>> ansible.cfg.
>>
>> TASK [users : Create all users without sudo access.] ***************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{managed_users}}'). This feature will be removed in a future release. 
>> Deprecation warnings can be disabled by setting deprecation_warnings=False in 
>> ansible.cfg.
>>
>> TASK [users : Update authorized_keys for each user.] ***************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{managed_users|list + managed_admin_users|list}}'). This feature will be 
>> removed in a future release. Deprecation warnings can be disabled by setting 
>> deprecation_warnings=False in ansible.cfg.
>>
>> TASK [users : Filter the revoked_users list] ***********************************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Remove revoked users] ********************************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{revoked_users}}'). This feature will be removed in a future release. 
>> Deprecation warnings can be disabled by setting deprecation_warnings=False in 
>> ansible.cfg.
>>
>> TASK [common : Log the OS name, version and release] ***************************
>> ok: [167.114.243.17] => {
>>     "msg": "Host 167.114.243.17 is running Ubuntu 14.04 (trusty)"
>> }
>>
>> TASK [common : Including major version specific variables.] ********************
>> ok: [167.114.243.17] => (item=/home/loic/software/ceph/ceph-cm-ansible/roles/common/vars/empty.yml)
>>
>> TASK [common : include] ********************************************************
>> skipping: [167.114.243.17]
>>
>> TASK [common : include] ********************************************************
>> included: /home/loic/software/ceph/ceph-cm-ansible/roles/common/tasks/apt_systems.yml for 167.114.243.17
>>
>> TASK [common : Get the current timezone] ***************************************
>> ok: [167.114.243.17]
>>
>> TASK [common : Set the timezone in /etc/timezone] ******************************
>> skipping: [167.114.243.17]
>>
>> TASK [common : Inform the OS of the new timezone] ******************************
>> skipping: [167.114.243.17]
>>
>> TASK [common : include] ********************************************************
>> included: /home/loic/software/ceph/ceph-cm-ansible/roles/common/tasks/kerberos.yml for 167.114.243.17
>>
>> TASK [common : Install Kerberos Packages (RedHat)] *****************************
>> skipping: [167.114.243.17]
>>
>> TASK [common : Update apt cache.] **********************************************
>> ok: [167.114.243.17]
>>
>> TASK [common : Install Kerberos Packages (Debian)] *****************************
>> changed: [167.114.243.17]
>>
>> TASK [common : Add krb5 config file] *******************************************
>> changed: [167.114.243.17]
>>
>> TASK [users : Merge extra_admin_users into managed_admin_users] ****************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Remove managed_admin_users from managed_users] *******************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Filter the managed_users list] ***********************************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Filter the managed_admin_users list] *****************************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Create all admin users with sudo access.] ************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{managed_admin_users}}'). This feature will be removed in a future release. 
>> Deprecation warnings can be disabled by setting deprecation_warnings=False in 
>> ansible.cfg.
>>
>> TASK [users : Create all users without sudo access.] ***************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{managed_users}}'). This feature will be removed in a future release. 
>> Deprecation warnings can be disabled by setting deprecation_warnings=False in 
>> ansible.cfg.
>>
>> TASK [users : Update authorized_keys for each user.] ***************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{managed_users|list + managed_admin_users|list}}'). This feature will be 
>> removed in a future release. Deprecation warnings can be disabled by setting 
>> deprecation_warnings=False in ansible.cfg.
>>
>> TASK [users : Filter the revoked_users list] ***********************************
>> skipping: [167.114.243.17]
>>
>> TASK [users : Remove revoked users] ********************************************
>> [DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
>> playbooks so that the environment value uses the full variable syntax 
>> ('{{revoked_users}}'). This feature will be removed in a future release. 
>> Deprecation warnings can be disabled by setting deprecation_warnings=False in 
>> ansible.cfg.
>>
>> TASK [paddles : Include secrets] ***********************************************
>> fatal: [167.114.243.17]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"}
>>  [WARNING]: Failure when attempting to use callback plugin
>> (</home/loic/software/ceph/ceph-cm-
>> ansible/callback_plugins/failure_log.CallbackModule object at 0x7ff9c738af10>):
>> runner_on_failed() takes at least 3 arguments (3 given)
>>
>>
>> NO MORE HOSTS LEFT *************************************************************
>> 	to retry, use: --limit @paddles.retry
>>
>> PLAY RECAP *********************************************************************
>> 167.114.243.17             : ok=9    changed=2    unreachable=0    failed=1   
>>
>>
> 

-- 
Loïc Dachary, Artisan Logiciel Libre
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux