??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
σ ίUdac@`sWddlmZmZmZeZidd6dgd6dd6ZdZd Zdd l Z dd l Z dd l Z dd l m Z ydd lmZeZWnek r³eZnXdd lmZddlmZd ad„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$e%dkrSe$ƒnd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bys; --- module: proxmox short_description: management of instances in Proxmox VE cluster description: - allows you to create/delete/stop instances in Proxmox VE cluster - Starting in Ansible 2.1, it automatically detects containerization type (lxc for PVE 4, openvz for older) version_added: "2.0" options: api_host: description: - the host of the Proxmox VE cluster required: true api_user: description: - the user to authenticate with required: true api_password: description: - the password to authenticate with - you can use PROXMOX_PASSWORD environment variable vmid: description: - the instance id - if not set, the next available VM ID will be fetched from ProxmoxAPI. - if not set, will be fetched from PromoxAPI based on the hostname validate_certs: description: - enable / disable https certificate verification type: bool default: 'no' node: description: - Proxmox VE node, when new VM will be created - required only for C(state=present) - for another states will be autodiscovered pool: description: - Proxmox VE resource pool version_added: "2.3" password: description: - the instance root password - required only for C(state=present) hostname: description: - the instance hostname - required only for C(state=present) - must be unique if vmid is not passed ostemplate: description: - the template for VM creating - required only for C(state=present) disk: description: - hard disk size in GB for instance default: 3 cores: description: - Specify number of cores per socket. default: 1 version_added: 2.4 cpus: description: - numbers of allocated cpus for instance default: 1 memory: description: - memory size in MB for instance default: 512 swap: description: - swap memory size in MB for instance default: 0 netif: description: - specifies network interfaces for the container. As a hash/dictionary defining interfaces. mounts: description: - specifies additional mounts (separate disks) for the container. As a hash/dictionary defining mount points version_added: "2.2" ip_address: description: - specifies the address the container will be assigned onboot: description: - specifies whether a VM will be started during system bootup type: bool default: 'no' storage: description: - target storage default: 'local' cpuunits: description: - CPU weight for a VM default: 1000 nameserver: description: - sets DNS server IP address for a container searchdomain: description: - sets DNS search domain for a container timeout: description: - timeout for operations default: 30 force: description: - forcing operations - can be used only with states C(present), C(stopped), C(restarted) - with C(state=present) force option allow to overwrite existing container - with states C(stopped) , C(restarted) allow to force stop instance type: bool default: 'no' state: description: - Indicate desired state of the instance choices: ['present', 'started', 'absent', 'stopped', 'restarted'] default: present pubkey: description: - Public key to add to /root/.ssh/authorized_keys. This was added on Proxmox 4.2, it is ignored for earlier versions version_added: "2.3" unprivileged: version_added: "2.3" description: - Indicate if the container should be unprivileged type: bool default: 'no' notes: - Requires proxmoxer and requests modules on host. This modules can be installed with pip. requirements: [ "proxmoxer", "python >= 2.7", "requests" ] author: Sergei Antipov (@UnderGreen) sΤ # Create new container with minimal options - proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' # Create new container automatically selecting the next available vmid. - proxmox: node: 'uk-mc02' api_user: 'root@pam' api_password: '1q2w3e' api_host: 'node1' password: '123456' hostname: 'example.org' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' # Create new container with minimal options with force(it will rewrite existing container) - proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' force: yes # Create new container with minimal options use environment PROXMOX_PASSWORD variable(you should export it before) - proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' # Create new container with minimal options defining network interface with dhcp - proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}' # Create new container with minimal options defining network interface with static ip - proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' netif: '{"net0":"name=eth0,gw=192.168.0.1,ip=192.168.0.2/24,bridge=vmbr0"}' # Create new container with minimal options defining a mount with 8GB - proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz' mounts: '{"mp0":"local:8,mp=/mnt/test/"}' # Create new container with minimal options defining a cpu core limit - proxmox: vmid: 100 node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 password: 123456 hostname: example.org ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz' cores: 2 # Start container - proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: started # Start container with mount. You should enter a 90-second timeout because servers with additional disks take longer to boot. - proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: started timeout: 90 # Stop container - proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: stopped # Stop container with force - proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 force: yes state: stopped # Restart container(stopped or mounted container you can't restart) - proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: restarted # Remove container - proxmox: vmid: 100 api_user: root@pam api_password: 1q2w3e api_host: node1 state: absent N(t LooseVersion(t ProxmoxAPI(t AnsibleModule(t to_nativecC`sZy|jjjƒ}|SWn9tk rU}|jddt|ƒdtjƒƒnXdS(Ntmsgs2Unable to get next vmid. Failed with exception: %st exception(tclustertnextidtgett Exceptiont fail_jsonR t tracebackt format_exc(tmoduletproxmoxtvmidte((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pyt get_nextvmid7s cC`sIg|jjjddƒD],}d|kr|d|kr|d^qS(NttypetvmtnameR(Rt resourcesR(RthostnameR((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pytget_vmid@scC`s?g|jjjddƒD]"}|dt|ƒkr|^qS(NRRR(RRRtint(RRR((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pyt get_instanceDscC`sBg|j|ƒj|ƒjjƒD]}|d|kr"t^q"S(Ntvolid(tnodeststoragetcontentRtTrue(Rtnodet ostemplatettemplate_storetcnt((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pyt content_checkHscC`s0g|jjƒD]}|d|krt^qS(NR'(R#RR&(RR'tnd((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pyt node_checkLscC`s|jjƒ}t|dƒS(Ntversion(R.RR(Rt apireturn((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pytproxmox_versionPsc K`sΘ|j|ƒ} td„| jƒDƒƒ} tdkrΫ|| d<|| dWstlxctcpulimittrootfstnetiftmountstpubkeys4.2sssh-public-keystcpustdiskRR$tmemorytswapRtstoppedt exitstatustOKiiR sSReached timeout while waiting for creating VM. Last line in task before timeout: %s(R#tdicttitemstVZ_TYPEtupdateR0RtgetattrtcreatettasksRRR&RtlogttimetsleeptFalse( RRRR'R<R$R;R=R>ttimeouttkwargst proxmox_nodettaskid((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pytcreate_instanceUs8           0 ""   !cC`st|j|ddƒtƒ|ƒjjjƒ}xΥ|r |j|ddƒj|ƒjjƒddkr₯|j|ddƒj|ƒjjƒddkr₯tS|d8}|dkrω|j dd |j|ddƒj|ƒj jƒd ƒnt j dƒq5Wt S( NiR'RR?R@RAiR sSReached timeout while waiting for starting VM. Last line in task before timeout: %s(RFR#RDRtstarttpostRHRR&RRIRJRKRL(RRRRRMRP((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pytstart_instanceys2 33   2cC`sO|rAt|j|ddƒtƒ|ƒjjjddƒ}n2t|j|ddƒtƒ|ƒjjjƒ}xΥ|rJ|j|ddƒj|ƒjjƒddkrζ|j|ddƒj|ƒjjƒddkrζtS|d8}|dkr:|j d d |j|ddƒj|ƒj jƒd ƒnt j dƒqvWt S( NiR't forceStopiRR?R@RAR sSReached timeout while waiting for stopping VM. Last line in task before timeout: %s(RFR#RDRtshutdownRSRHRR&RRIRJRKRL(RRRRRMtforceRP((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pyt stop_instanceˆs;2 33   2cC`st|j|ddƒtƒ|ƒjjjƒ}xΥ|r |j|ddƒj|ƒjjƒddkr₯|j|ddƒj|ƒjjƒddkr₯tS|d8}|dkrω|j dd |j|ddƒj|ƒj jƒd ƒnt j dƒq5Wt S( NiR'RR?R@RAiR sUReached timeout while waiting for unmounting VM. Last line in task before timeout: %s(RFR#RDRtumountRSRHRR&RRIRJRKRL(RRRRRMRP((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pytumount_instancešs2 33   2c?C`s% tdtdtdtƒdtdtƒdtdtƒdtdtƒdtd d d d ƒd tƒdtƒdtdtƒdtƒdtƒdtd dd dƒd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nt|j|dd ƒtƒ|ƒjjjƒdJd/ks/ t|j|dd ƒtƒ|ƒjjjƒdJdOkrL |jd@td4dT|ƒnt!|||||d*|jd*ƒr¦ t|||||ƒr¦ |jd@td4dU|ƒnWq! tk rΦ }|jd4dV||fƒq! XnG|d.kr! yt||ƒ}|s |jd@td4dW|ƒnt|j|dd ƒtƒ|ƒjjjƒdJdKkrt |jd@td4dX|ƒnt|j|dd ƒtƒ|ƒjjjƒdJdOkrΝ |jd@td4dY|ƒnt|j|dd ƒtƒj"|ƒ}xξ|rζ |j|dd ƒj#|ƒjjƒdJd/kr‚ |j|dd ƒj#|ƒjjƒdZd[kr‚ |jd@td4d\|ƒn|d8}|dkrΦ |jd4d]|j|dd ƒj#|ƒj$jƒd ƒnt%j&dƒqω WWq! tk r }|jd4d^|t'|ƒfƒq! XndS(_Nt argument_spectapi_hosttrequiredtapi_usert api_passwordtno_logRtvalidate_certsRtbooltdefaulttnoR'tpooltpasswordRR(R<tstrt3tcoresR iR;R=iR>iR8RBR9t ip_addresstonbootR$tlocaltcpuunitsiθt nameservert searchdomainRMiRWtstatetpresenttchoicestabsentR?tstartedt restartedR:t unprivilegedR s"proxmoxer required for this modulet:tPROXMOX_PASSWORDsNYou should set api_password param or use PROXMOX_PASSWORD environment variabletusert verify_ssls4.0topenvzR5s:authorization on proxmox cluster failed with exception: %ss@Vmid could not be fetched => Hostname doesn't exist (action: %s)tchangeds6Vmid could not be fetched for the following action: %ss#VM with vmid = %s is already existss7VM with hostname %s already exists and has ID number %ssEnode, hostname, password and ostemplate are mandatory for creating vmsnode '%s' not exists in clusters4ostemplate '%s' not exists on node %s and storage %ssdeployed VM %s from template %ss.creation of %s VM %s failed with exception: %ss'VM with vmid = %s not exists in clusterRtrunningsVM %s is already runnings VM %s starteds+starting of VM %s failed with exception: %stmountedsVM %s is shutting downsNVM %s is already shutdown, but mounted. You can use force option to umount it.sVM %s is already shutdowns+stopping of VM %s failed with exception: %ssVM %s is not runningsVM %s is restarteds-restarting of VM %s failed with exception: %ssVM %s does not exists*VM %s is running. Stop it before deletion.s<VM %s is mounted. Stop it with force option before deletion.R@RAs VM %s removedsSReached timeout while waiting for removing VM. Last line in task before timeout: %ss+deletion of VM %s failed with exception: %s((R RBR&RLR1t HAS_PROXMOXERRtparamstsplittostenvirontKeyErrorR R0RRDRRRtlent exit_jsonR!R-R+RQR RFR#RtcurrentRRTRZRXtdeleteRHRIRJRKR (RRpR^R\R_RRaR'R<R;R=R>R$RR)RMRRthostsRRP((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pytmain©sB       $              (   +0- $            +$ <!! <   <%!! <<%!! <<) 33   2t__main__(&t __future__RRRRt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLESR‚RJRtdistutils.versionRt proxmoxerR R&Rt ImportErrorRLtansible.module_utils.basicR tansible.module_utils._textR R1RDRRR!R+R-R0RQRTRXRZRŠt__name__(((sF/usr/lib/python2.7/site-packages/ansible/modules/cloud/misc/proxmox.pyts>   Š            $    Β